/* called by: entrance ctrl of the object 'track'
8 L. a1 [8 d3 r* H*/: Z9 N* v) O% D1 O0 L) A
is3 v. E. o* ^. O/ Q) q+ q$ c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# F0 H" |0 d: X2 M5 Odo
& {, u" v9 x7 Y6 Z9 X) q Lan := rootfolder.Internal.Tools.AOLlanguage;
O- S' t2 W+ j( C% A9 H if current = @.Destination -- else return
# _) _+ B) Z& g+ [$ W; Q then1 I5 n# r8 i7 F% Z7 W
@.Destination := void;
" f. n. d$ ^: H if @.occupied then# V" T4 s4 y. e3 }
part := @.cont;5 J+ k9 T$ d/ `4 u$ Y3 H
@.transpOrder := void;6 E+ g. o& \+ i: U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 t d3 k% w+ O- ]7 I" `7 ^
@,root.eventcontroller.simTime);9 f1 M# I! J3 I- i
@.HasOrder := false;3 _" p- f, _6 B/ P: G
@.DrivingHome := true;
1 J5 U9 B7 d( p# I rgManager.tryToStartTransOrder;
3 Z! x- k7 Y/ i, v4 N" j if @.Destination = void: T8 f1 e1 d* t7 U( d
then -- no transport order for vehicle @2 s. P0 j5 M, G) C G
@.Destination :=0 x4 }' b2 ^" z2 @1 m
rgManager.nearestFreeStation(@,track.~);" T7 c8 K1 X [' Y
newDirection(@);
' H' x, {7 e# K- t4 v" b if @.Destination /= void then
5 |) O" Z0 f) j5 |4 c) u% `" T2 Q @.Destination.NumReservation :=/ K; ]) i/ i, Z4 z8 I
@.Destination.NumReservation + 1;
1 d& F6 q) H- v' {; M end;) Y7 ]; j. x9 C* v N9 X
@.CurrIcon := "drivingHome";% \+ `0 R! b0 _5 x! \8 P2 |
@.DrivingHome := true;
! i+ A1 u$ R$ _% N, O1 p- w end;
) E- _3 n6 K* P: K; L$ F& i5 v8 M) T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# u3 {4 M$ K& G2 j part := @.transpOrder;
. ~" d* B- j3 y part.move(@);-- load part
5 k6 I2 g$ C5 K6 X8 y% @ @.CurrIcon := "load";
7 L9 R- q- c) E4 ^ GlobalDistObj := part.globDestination;* d$ B ~' t+ v0 @
assignLObj := rgmanager.rgAssignL;
( S1 g L# h! I/ i8 p" O! J- F7 d6 o row := assignLObj.getRowNo(GlobalDistObj);
5 ?0 X+ V+ x$ [: X/ M if Row = -1 then -- since 70. Q( i& ~9 _ J5 j7 v5 K
if lan=1 then( T6 T( d6 |- M7 [9 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: @6 B" X3 d0 W9 [ to_str("in der Andockstation: \"",?.~.name,"\""));" P9 H* {+ F& v% R' b6 w
else0 a5 C' b- z: ^+ K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ?+ f0 v4 J3 @% L) s to_str("in docking station: \"",?.~.name,"\"")); / M( D+ W) V* k$ I/ l
end;
9 h* Q; ^$ T1 t: e3 l else
8 C. B5 p& {" ]$ ^) e5 ` @.Destination := assignLObj[1,row];
# R$ [) d; W& h# E: k end; : g) z8 J0 g' D2 R8 A
newDirection(@);
- q3 w2 T/ q, i' V @.HasOrder := true;% v3 a5 V m* b7 J1 P! V0 I, d
end;! N. x" {/ ]7 P/ S
end;( `% ~9 h. T. m" Y- N
end; -- of the method1 _+ [9 J6 V! |5 `! Y {' i) l
|