/* called by: entrance ctrl of the object 'track'
7 B8 F5 r; d) ?6 d, N*/
# W+ T" l, n8 K' W$ n+ zis
) ^ T2 j' l4 B) O part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 _# p6 Z* h, M ^; g. e5 |
do, z `1 i+ `7 F' x0 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 y0 C/ l7 c, D7 v/ e! a5 K if current = @.Destination -- else return
2 x5 `% F& i' R4 V2 ~' W% ^! r then/ ~) l: z( J% s6 z7 ]* O+ e! b/ _
@.Destination := void;$ z6 A; G# g) O" O5 e
if @.occupied then
# x+ C' [5 e$ Q, G) @/ j part := @.cont;" Y. @( b1 H7 O" }& _# m
@.transpOrder := void;
8 e% z f9 y* x1 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z0 F0 A$ ?+ h: L } @,root.eventcontroller.simTime);
& p4 Z! O/ i8 U3 B4 H* o& W @.HasOrder := false;7 Q+ N) r8 I. M4 A( T+ c! p' L
@.DrivingHome := true;8 E) q5 E# {% k
rgManager.tryToStartTransOrder;7 t- n6 i$ t0 H* O
if @.Destination = void& B) F% f) }7 g
then -- no transport order for vehicle @
6 r8 c7 G1 v5 {! W2 B7 t9 @3 ?0 L @.Destination :=
1 j6 O! Z1 K5 G9 N rgManager.nearestFreeStation(@,track.~);
* q( P" Q0 m2 W/ C* c newDirection(@); 4 R( v! T; K( @* B) D J; I
if @.Destination /= void then3 K) A6 }* H" U V, _, j3 k( Z( n' j
@.Destination.NumReservation :=
d' F3 S# F* d. }. p" N% Y ?- E @.Destination.NumReservation + 1;9 @4 [4 `- M. B- U, z. v
end;
' h- f, [& v+ r; g: L% z @.CurrIcon := "drivingHome";
, V* C& b( i: E; Z" W @.DrivingHome := true;
3 z2 s! |6 ]- F5 Y end;$ `* k3 N, ~; e8 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 c, F' `" S2 J, t# `( |
part := @.transpOrder;* O6 E* w* h( i9 P# v1 B2 T
part.move(@);-- load part
8 m$ @4 T' ?- @/ Z3 \7 V4 n @.CurrIcon := "load";
: w& R6 Y8 V2 Z p GlobalDistObj := part.globDestination;
* G$ c7 y( ~0 w9 W7 S/ ] assignLObj := rgmanager.rgAssignL;
, F: q r3 P3 n3 ?1 y row := assignLObj.getRowNo(GlobalDistObj);+ r: y% b _7 A3 S4 o4 U
if Row = -1 then -- since 70
( V9 g8 R$ @/ N) B/ A if lan=1 then+ L1 Z0 `' R5 W1 t* F! g: U x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 r# U' v2 U4 g' a! w3 j
to_str("in der Andockstation: \"",?.~.name,"\""));5 e! \( M* S n* [) \( _
else
1 u) ~; e7 M& w' N2 O* l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 q7 h! T3 D0 I/ n/ u
to_str("in docking station: \"",?.~.name,"\"")); w. A1 N6 N& n I3 s7 T
end; t. D$ ?& W- R8 W* t+ t
else% f6 y5 x/ p' D( @1 T5 Z) R3 ]5 Z
@.Destination := assignLObj[1,row];
! i3 ?, g2 |8 x end; : E5 ~8 u/ k! U) V
newDirection(@);
! }; z# S0 s# \# R6 | @.HasOrder := true;: G" N" z+ C2 Y/ j8 @, A
end;
9 y/ j; ^. u- e+ Z- D, w g end;& j3 X% C: }( S2 p( M. T' V
end; -- of the method
$ l8 Q& K$ j3 ?* |, k/ D) @ |