/* called by: entrance ctrl of the object 'track'- j( J$ J' X* e) l. g) p) p% z
*/
; N; l+ [% X0 E8 H" |& Bis& t5 G$ Y$ [0 B/ u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( W* Y1 ]) J* B# r$ G0 ~
do
. K: p* o2 J! p; |/ Z0 y' z: R Lan := rootfolder.Internal.Tools.AOLlanguage;$ e0 H9 K/ h V2 O- ]
if current = @.Destination -- else return
+ U* ^/ e1 b+ P- V then
- \% U: Y" H7 f4 l @.Destination := void;# z/ z7 `, B- T6 E2 O0 S
if @.occupied then- n, n9 p( b/ o+ e
part := @.cont;
) E0 X! n" x2 ?! P' f \ @.transpOrder := void;
4 J9 G# s( |! v$ u c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ C y' y2 [2 J [2 m8 d @,root.eventcontroller.simTime);3 |$ ?0 ~- @- p4 {( }
@.HasOrder := false;! u7 g: c# h) o+ g; w
@.DrivingHome := true;
% e6 N% X. |- B rgManager.tryToStartTransOrder;! L+ j8 {( l7 J
if @.Destination = void! ]' m) l! C& e3 h+ c& C4 u$ z m, Y
then -- no transport order for vehicle @
$ {3 c7 @' ^+ z& { u& Q6 s/ u @.Destination :=6 P# Y9 B7 |) U5 ^+ L
rgManager.nearestFreeStation(@,track.~);
: F, b3 u# W$ F/ \( ` newDirection(@);
) u0 t" J, }+ {" c1 i0 S if @.Destination /= void then3 q- F; P' j3 q- o
@.Destination.NumReservation :=' \7 v4 l$ i7 k5 N
@.Destination.NumReservation + 1;
# _: g, e" N4 z5 j2 @ ^0 _ end;) t, r; j7 A8 ^) p% g
@.CurrIcon := "drivingHome";/ Y3 x- E/ _. Z" J4 f4 L; Q
@.DrivingHome := true;
$ {( T; y' W. A7 ^) F( Q5 ` end;
: W. O- ], { s4 l6 ~$ j! H2 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ y* d: W! b3 D/ M part := @.transpOrder;
. l8 `: |6 ]5 Z8 v1 v" u part.move(@);-- load part
0 ?) t6 Z$ J/ C9 V" ` @.CurrIcon := "load";
- G! w3 r' w5 R* f6 f6 _$ V, I GlobalDistObj := part.globDestination;
% ^3 q" @3 Y8 s& \. O0 {4 t assignLObj := rgmanager.rgAssignL;
" n# F: d) K- J/ t N/ T: N row := assignLObj.getRowNo(GlobalDistObj);# k3 _6 D# T: [! W b
if Row = -1 then -- since 706 C7 \0 R* t7 w6 Z9 d5 p" C# W
if lan=1 then
( w2 X; t; r4 \0 ]1 Y# y J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; \2 ~3 z+ U1 l: O6 [5 K) E# @
to_str("in der Andockstation: \"",?.~.name,"\""));
. d% o/ M( ^7 e' @. {* | else
) W, p' z7 }% F9 N8 H" I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 U6 T& c, e( E) @# b5 _' q1 I
to_str("in docking station: \"",?.~.name,"\""));
; r- U$ F; k; Y' o: h; t7 t' R& o end;+ C- f, e3 D9 i l! I
else0 ?: Q, j+ R$ \0 G
@.Destination := assignLObj[1,row];/ G1 i6 F/ |" g0 F: |9 O
end;
$ R" M& J4 ~1 h- B# [) W newDirection(@);
" s& p- O1 \; o- ^( ]* Z# U. h @.HasOrder := true;3 ]4 h% Y; c ^' u T
end;$ r9 Z- w N6 B }; b0 C$ P
end;$ q4 Y4 u8 x1 k% G4 g( e" |# r: M
end; -- of the method$ b& j' ?/ z; h, V
|