/* called by: entrance ctrl of the object 'track'/ B0 j" @- c% [1 Y4 `8 i
*/& K. p+ { t* c. M# ^
is5 D4 f% f" H! Y/ n/ Y9 a: x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 Y0 H; \% a; G& _do7 W& Q! o* }- ?- l2 ~8 J D
Lan := rootfolder.Internal.Tools.AOLlanguage;4 b4 r" n2 Y8 z( V* y0 r
if current = @.Destination -- else return& d5 U0 @- p9 U+ E2 Q& Y/ h
then x {- |" M5 m7 b: o! d5 P' C
@.Destination := void;" B0 |6 z# `8 p
if @.occupied then$ u& B4 X, D7 q! b
part := @.cont;
$ } } S, F. p @.transpOrder := void;2 ]$ X4 ~. C1 a' D; H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: t. m% f9 y& x
@,root.eventcontroller.simTime);
8 a, v. O" C8 \$ |. W- d8 K @.HasOrder := false;- V6 R; s# w& N7 U/ [6 `7 ]. d
@.DrivingHome := true;
3 w) L. L0 S$ H+ k' Y$ Z rgManager.tryToStartTransOrder;8 v2 z; N# x, P1 M9 E9 }- p
if @.Destination = void
8 k' u1 n3 {0 A& u/ d7 I then -- no transport order for vehicle @
9 W' M- q x3 S) w' W2 ] @.Destination :=/ P1 e# Y9 i" n# A
rgManager.nearestFreeStation(@,track.~);
, n- Y+ g3 {1 G( I5 B6 _ newDirection(@);
' l- f) I! ]3 F, w9 }5 m! l# M! | if @.Destination /= void then. a$ V7 P7 e; k
@.Destination.NumReservation :=" k6 ~% _$ ?1 y8 E) e" x1 N
@.Destination.NumReservation + 1;- _6 E* N( R! q. b/ ]
end;$ Y7 R1 w- v/ b# h I1 h8 W
@.CurrIcon := "drivingHome";
& s5 G; ~9 ^& } Z4 K @.DrivingHome := true;
% B/ t2 @8 T5 M/ I7 P* r: v! ~ end;2 Z; C/ w, p& M9 \) R1 u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
E9 B* h" g: S/ L+ N' Y( D part := @.transpOrder;3 A& |6 Z7 b' l- K, _' O
part.move(@);-- load part
$ G/ K( w9 s! p0 G! j4 | @.CurrIcon := "load";) @! w. X8 d" Q7 f" |% X0 P
GlobalDistObj := part.globDestination;* e C5 `; W# c5 w2 x
assignLObj := rgmanager.rgAssignL;, Q U) P7 s5 |- _( r, Q
row := assignLObj.getRowNo(GlobalDistObj);9 \+ \) B7 v; Z7 c2 G) e
if Row = -1 then -- since 70
1 J6 I' D9 I* s0 a9 I: e+ E if lan=1 then0 F- b$ q8 ^9 I8 N* T( q/ q3 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! Z0 R/ l9 m- E* S: C
to_str("in der Andockstation: \"",?.~.name,"\""));% P3 {8 a9 V* u6 Q
else
) x/ a! F8 W0 F! k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {7 R1 d# F9 x& b; C+ ? to_str("in docking station: \"",?.~.name,"\"")); ) v; e$ X: E k4 M
end;5 R9 B9 [# g* @1 K5 a1 I
else
$ k# d) c' [1 [8 o @.Destination := assignLObj[1,row]; [* U0 _5 |0 \8 T3 q2 A+ ]' O
end;
$ f% U7 b$ Z3 m. H: b, a newDirection(@);
5 @2 M. s! D5 ^. L) N5 y& n @.HasOrder := true;# g1 N3 D4 A' m! Q- h
end;
. a7 Z2 d( }# z' J1 F5 c4 B" X& { end;$ l! E( @! |1 Y( X! D
end; -- of the method
0 V0 A1 @5 r1 h) K! x |