/* called by: entrance ctrl of the object 'track'. \6 s6 K O; T% ^$ G( ~
*/* ~( M% M) b7 n n
is
2 ]5 p2 O7 j9 Q9 _) U7 x; ^, | part, GlobalDistObj, assignLObj:object;row,Lan:integer;! H' u% ~; u1 _* A0 Y/ D8 n
do
. ?( ]/ |- A$ o0 a2 s# M Lan := rootfolder.Internal.Tools.AOLlanguage;
9 o% P: k/ j" C* O if current = @.Destination -- else return
2 ]3 a8 R3 I# q- {$ p# H; W* ? then' x2 }3 ?4 K7 l- Y- h
@.Destination := void;
* K& U q9 e/ A1 c. S& | if @.occupied then h3 v6 \" l3 X$ e# b/ ^# n
part := @.cont;' o7 b) A$ ~/ x F6 i _
@.transpOrder := void;
5 u4 X. X; j" ~" A- I3 j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: j8 M; x. p2 v3 V$ u& B @,root.eventcontroller.simTime);
; b. @! W7 g0 [' j2 K: b @.HasOrder := false;
2 H2 j5 y- I" ~* D5 ^4 ` @.DrivingHome := true;- i( d8 ?2 m! G7 F; _' N
rgManager.tryToStartTransOrder;/ ~- u1 V' y9 U( a6 l; |* \# Y+ Q
if @.Destination = void. \( k+ c+ ?$ u: \
then -- no transport order for vehicle @
# u4 d1 F7 {* [$ H0 g) b$ h6 R; X$ { @.Destination :=$ m. C- H4 _- h0 z& y+ z7 e( {
rgManager.nearestFreeStation(@,track.~);. _4 d* }: I4 H( b6 N0 b8 N
newDirection(@);
1 b2 w, r5 x0 d6 Q if @.Destination /= void then
' k( o7 K* B/ f, ~) S @.Destination.NumReservation :=; N7 f4 k) \) _3 W# {
@.Destination.NumReservation + 1;
$ S/ u0 V; ~% F% Z( ] | end;
% v5 k; l; I+ T1 Z3 O @.CurrIcon := "drivingHome";
! Q7 \0 b6 m+ p3 G @.DrivingHome := true;
/ j9 \ Q( l7 [' T) n) H1 v end;
& U3 j$ K. s3 t# J! W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 d- O/ T. A: C A9 h9 Z part := @.transpOrder;6 `9 F( F- n5 g3 M! l/ @/ k8 i" m
part.move(@);-- load part5 o" L J+ L6 R3 M7 r# d) C
@.CurrIcon := "load";
, [: K6 n' U+ V GlobalDistObj := part.globDestination;
9 R7 m# e& M5 C* N) O assignLObj := rgmanager.rgAssignL;
; ]/ ]) _( [8 S row := assignLObj.getRowNo(GlobalDistObj);
% A, X! E. C2 W# H& X if Row = -1 then -- since 70! n3 e( a! Z' M1 x: T
if lan=1 then& U# M# u) T2 x8 N, ?+ J7 z ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" `/ h. ~% m' T' R# u* z4 |+ F to_str("in der Andockstation: \"",?.~.name,"\""));
7 S7 n( T9 p3 ~$ z% N else
/ X5 O6 U' b {) M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
x" T# a$ S4 q* h to_str("in docking station: \"",?.~.name,"\"")); # Q$ t; L! q4 h; V. N
end;1 f5 Q' C# F9 l
else* H! C0 `' i6 p8 T o7 U) t) e
@.Destination := assignLObj[1,row];+ R7 ]6 h* i3 A" n" l
end; + R* V; K9 a' T
newDirection(@);
: i7 o% U, m2 Z+ h @.HasOrder := true;
4 u; ?( {2 x, z1 g F# g4 @ end;
; ?$ r* G5 ?5 U9 ?- J end;
3 o/ r5 u9 K Y; n6 {) Oend; -- of the method x% P+ }: c' @" A
|