/* called by: entrance ctrl of the object 'track'; _) ]4 |5 r6 E- Y) g
*/: f5 Z& c0 V t% w! P
is, y6 D! t+ _! X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 Z) |( E" m$ b; ^
do
' I' ^; _: O$ `- W Lan := rootfolder.Internal.Tools.AOLlanguage;
4 J6 [$ Q9 S% _6 F( Z1 l. v+ T [ if current = @.Destination -- else return; m" k7 A2 g( T/ l5 {
then# Y' }9 P+ C; {2 O/ z; ~
@.Destination := void;+ v' {/ [, z$ F! v5 B
if @.occupied then; F; [! S3 p# t o( y
part := @.cont;6 P- e! d1 M( S$ S% A; a) I
@.transpOrder := void; v3 n; l( l: W' b: |, R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; Y2 a% S/ h* k- z, @8 ~% k( }$ _ @,root.eventcontroller.simTime);7 |, E' Y8 e$ r; B
@.HasOrder := false;
0 d5 }# r9 g; i3 b) T0 J3 R @.DrivingHome := true;# G8 j6 |% x6 Z" M! ~
rgManager.tryToStartTransOrder;
4 J1 E3 k: W; `4 k: v5 U2 i if @.Destination = void
# _/ i5 u2 a i% W3 X8 p2 P then -- no transport order for vehicle @2 A/ ]: ?5 c0 Y/ ]7 |- u3 h
@.Destination :=. K* y) i% t7 N
rgManager.nearestFreeStation(@,track.~);
+ b0 J3 [* h4 @' d& e; ]+ y. Q newDirection(@);
1 {* Q# a; h; m if @.Destination /= void then$ O$ K1 Q. o9 l1 ^" A
@.Destination.NumReservation :=. _; M; O2 ~, c% Y$ p
@.Destination.NumReservation + 1;
8 y" O6 Y3 Q4 W& Z. ^ `6 k end;
6 ]* z# l3 @& ~% j @.CurrIcon := "drivingHome";* A$ H$ f: O" q# [" \
@.DrivingHome := true;# }% _1 B- z9 e9 L- m+ \
end;
T0 _+ |) |: K* B" ~# F5 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) P+ i7 V/ }' O1 c part := @.transpOrder;
. k: T4 p9 |2 _: h- E' R3 a part.move(@);-- load part+ B- \/ s0 N, X( J* K/ w' o1 ] b/ `- h
@.CurrIcon := "load";
4 J9 T& ~7 ?* l. W7 l: }0 G GlobalDistObj := part.globDestination;% m; A. \1 {4 s$ E2 \% {' k
assignLObj := rgmanager.rgAssignL;
7 N8 v3 [* D6 B4 y$ `- a row := assignLObj.getRowNo(GlobalDistObj); U) H. h; Q) `7 C) G+ h
if Row = -1 then -- since 703 _4 D8 q# i2 T2 x! g9 T5 ]; [; e, O
if lan=1 then
' F2 U, ]; |- K4 b9 o V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), V; m: M# Q/ ]1 {7 @
to_str("in der Andockstation: \"",?.~.name,"\""));
/ s# c/ D% n# d6 ^& c else Q. w6 F# |& Z* `0 o( \* {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% e* i8 [/ ^6 [: w% M. h& B
to_str("in docking station: \"",?.~.name,"\""));
1 D1 j: k% p/ e' ~' Z+ [* n end;
9 M/ U3 h* s: f. c; N else
5 P' o h0 t) i7 g5 c @.Destination := assignLObj[1,row];' j1 A$ t* X- V A
end; 2 P& C2 v, ]2 u C/ Z
newDirection(@);- r7 P2 t4 ]( ]4 J
@.HasOrder := true;; Z! A* i$ ~0 E
end;
, S$ A( ~3 _% @8 H' e6 B: ~/ d end;
2 r% V L1 n+ l, i) Z/ x, f$ ]end; -- of the method
) a S4 ~ M2 Z& K# G( Z |