/* called by: entrance ctrl of the object 'track'& R4 l9 B6 P5 k2 q! n
*/4 T5 ], h8 {6 ^2 [0 Y$ W% [- x3 O: @
is* d- B0 n7 h0 C7 d+ K
part, GlobalDistObj, assignLObj:object;row,Lan:integer; i, [6 L* I! V. j
do1 h% a9 u* v& |$ B
Lan := rootfolder.Internal.Tools.AOLlanguage;3 T! ]; }: m4 o" ^9 o! |7 J
if current = @.Destination -- else return
+ ]6 N) I1 q. |$ \/ D [# o6 @ then' u, K3 e# C1 {) r
@.Destination := void;
. |9 S# z6 `' D0 Z% m0 F- w if @.occupied then/ R8 r2 q6 z/ U) F; A
part := @.cont;
! e/ |% k B3 ^ @.transpOrder := void;9 I, X( ?9 z% z1 U3 ?# D `5 r3 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* [# z2 ~' Y% g/ b
@,root.eventcontroller.simTime);; R! t6 Q% p3 ~
@.HasOrder := false;
* n( _0 d1 w1 i+ B0 _/ @ @.DrivingHome := true;
7 j* P. o |, {8 B, O0 C3 A# a rgManager.tryToStartTransOrder;
2 \0 H6 q7 t6 T% v; }; D3 E/ ] if @.Destination = void
3 S' J! K& A$ {) l then -- no transport order for vehicle @
' M1 o- W* Q, M @.Destination :=
. `. {; X2 m3 F% _, ?& C B) f rgManager.nearestFreeStation(@,track.~);
9 c; h/ S% @ p" H5 F newDirection(@);
" f8 l$ C' ?' P- F, }3 Q* O! R$ ] if @.Destination /= void then( x) @& R* B* L3 W
@.Destination.NumReservation :=
$ `% a8 Q, k# k8 e, E% W/ P @.Destination.NumReservation + 1;
/ z J y6 q$ ?/ \ end; }7 V: g7 ]$ o1 p5 X4 |3 W
@.CurrIcon := "drivingHome";
, a9 G$ F/ p6 p8 n7 W5 V4 m$ | @.DrivingHome := true;7 _/ t" T) C: R
end;9 y* B9 l2 t' W" @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 k) ?% [4 `; z d f0 } part := @.transpOrder;
/ g0 ^1 t+ p U6 U+ b ~( V part.move(@);-- load part( f' h) M: C- r% m4 F( O- a4 a
@.CurrIcon := "load";1 p9 T9 X) O0 T$ `( R
GlobalDistObj := part.globDestination;
# `+ E' o/ f6 y! v0 H6 {2 P assignLObj := rgmanager.rgAssignL;* I( w8 Z# `) V0 U9 C; `1 N
row := assignLObj.getRowNo(GlobalDistObj);
9 f5 x$ U' l* h/ i0 x$ T$ o if Row = -1 then -- since 70. R3 K2 v4 r# i/ l7 b
if lan=1 then$ l5 |" m f6 N. C- S' ~+ }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* k; x, X; W* m8 k, u6 J; G! ~
to_str("in der Andockstation: \"",?.~.name,"\""));
. i& w* N; _$ Z) y& K else6 D& j' Q0 S+ a, }4 G, x$ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 d) P8 o, P3 L1 n
to_str("in docking station: \"",?.~.name,"\"")); 9 Y7 s# E# a" {$ y
end;. f( S2 d9 p6 ^4 M5 Y
else
! l: H0 C4 e' g' c3 Z0 Z# i @.Destination := assignLObj[1,row];, @$ u1 N% g: N3 D
end;
: b3 `* \: p: q$ u% F5 K4 q. n newDirection(@);
# A* Y5 R6 v( A& Y8 S' \ @.HasOrder := true;
, i6 `6 f( ~: L1 {3 v( w( R. k end;1 y+ r% m0 i) f8 \" M) c
end;; Z3 |! l8 |) v0 ~! q
end; -- of the method
6 @! N. ]2 g, Q P# K |