/* called by: entrance ctrl of the object 'track'
2 S! x) ]: G$ n6 W" P I# U*/
6 p& G9 l1 V0 k" U! Z8 x0 ris
1 J. w# l3 i, Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Q; I0 r y4 Z* c: @
do
8 F8 s" n, i' L. _+ w2 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
% t: l. }; w4 e$ x: r if current = @.Destination -- else return0 h F- P8 I. J$ F9 q H' _
then
+ N/ R7 r$ O* l7 l' K2 V @.Destination := void;
o- N9 Z$ o/ G8 F+ g if @.occupied then
5 \% V5 Z2 R6 k& { part := @.cont;
) X/ F1 X: w/ p2 B8 `+ E @.transpOrder := void;/ k% H" Q0 \; ^0 @ v+ v4 n8 s3 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ F$ B u& @! K
@,root.eventcontroller.simTime);
& ~" P1 E/ r4 h @.HasOrder := false;
- A ]9 ?8 ^: D- ^ @.DrivingHome := true;6 L. s1 b W) X* j6 e
rgManager.tryToStartTransOrder;6 U% e2 k) O1 V2 K; a6 @
if @.Destination = void) _6 j. R; V8 n, V
then -- no transport order for vehicle @
7 e0 ^$ a9 ~# z+ L" t) ^! u& ?: n @.Destination :=
# T3 I. [; F; y0 m rgManager.nearestFreeStation(@,track.~);* L4 l* I2 Y8 [7 k& W8 H7 z
newDirection(@);
4 y8 E) @1 t+ e" @ a, R if @.Destination /= void then
- \& V1 U$ u2 s& h @.Destination.NumReservation :=
2 `3 Y+ H) ^7 U$ s" `9 D! G7 M, d& [0 j @.Destination.NumReservation + 1;
# E* V( G6 T2 m, y6 Z# H$ ^ end;
8 a. s4 f) p7 o9 i: J ] d @.CurrIcon := "drivingHome";6 w. F" `: `( V+ V6 x$ m' R# c4 Q
@.DrivingHome := true;. w+ i/ X* q* ?
end;
' _9 K4 f5 ?1 W) Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- V! {7 d$ H) ~! q8 P6 b { part := @.transpOrder;
) D# F6 |5 Z I, }( I3 J& ?0 [& B+ ` part.move(@);-- load part
. B' l; S: M+ l: i$ \6 U @.CurrIcon := "load";
& K: n: }& {. ~% B2 p4 ? GlobalDistObj := part.globDestination;
9 F# ?' X; ?8 c8 O. h9 e assignLObj := rgmanager.rgAssignL;% U* f0 M* d( n
row := assignLObj.getRowNo(GlobalDistObj);& R# M4 X$ P5 w2 y( F. }4 z
if Row = -1 then -- since 70
: H( s; v& j( J/ P if lan=1 then# ?& x; L) f& D3 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 D4 y; P/ w7 \" p% Z
to_str("in der Andockstation: \"",?.~.name,"\""));
8 X M* D& d1 P% C3 B; C; p else8 J: J, T v( Q: l3 b; F+ K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% }* X/ ?/ b4 i* f$ v% |7 v to_str("in docking station: \"",?.~.name,"\""));
6 a% F1 [- A) O4 Q end;
! y0 a7 |: m. ?0 e9 _' X else3 V" p* Q8 I: \; u! p1 g
@.Destination := assignLObj[1,row];
# M9 \2 r. x# e* p end; * H+ l$ a" r) E
newDirection(@);
2 H) h( K) h9 _ @.HasOrder := true;- k7 I/ O* g4 A; ~& q9 J
end;
/ n. Q! J6 i- Q, Y0 }3 \& d end;' Z& ^. o9 [+ R4 h$ Y8 h: P
end; -- of the method
e9 y6 @ s! H# n z |