/* called by: entrance ctrl of the object 'track': l& H I9 j# s
*/
; F0 D3 W4 \" bis
2 m5 I$ a6 S+ h i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) t3 i6 S2 k1 a! _# s5 n6 W- Y8 o, Wdo
. }$ O* T* H' _+ ~" }- p. M Lan := rootfolder.Internal.Tools.AOLlanguage;2 K* ~3 }) Y0 U2 \
if current = @.Destination -- else return5 L1 \: a! K3 J b- B; e) j' c; U
then
! l: A3 E z0 B2 C& g @.Destination := void;! F* X- \9 `, D3 z" Y
if @.occupied then
! D5 [9 U5 G/ U+ g2 z part := @.cont;4 W8 q$ {4 R- |0 R" T8 u% o% c0 a
@.transpOrder := void;
) c3 F( v+ b- l/ ]8 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% g! t$ n# m8 Z/ S4 R. m2 y" @4 Z @,root.eventcontroller.simTime);+ V' R* `8 s5 s7 A$ O
@.HasOrder := false;
/ f# S0 P( |, Q3 w3 [/ Y+ M8 s* I7 W @.DrivingHome := true;$ ?7 f+ R1 L2 H% G- a% ^* Y" ]
rgManager.tryToStartTransOrder;" b$ z' D- c( C8 I- |* ^
if @.Destination = void
# o4 Y: w% I: P$ L9 T then -- no transport order for vehicle @
! z- m. T# B. S6 s. Z @.Destination :=
, e6 @4 V. L5 [3 W6 N' B& O rgManager.nearestFreeStation(@,track.~);
3 r: ?+ R; k7 X$ C2 q6 z% @) R$ B newDirection(@);
) k1 ~ ~4 k+ ?* F if @.Destination /= void then: y% I2 }; G" }2 j
@.Destination.NumReservation :=
/ v& k% n6 ^/ `3 ^, z: F Y5 a @.Destination.NumReservation + 1;
! J ~5 G& L9 K& Y ] end;
3 ~! p5 y5 s f% E% n" z0 [$ s @.CurrIcon := "drivingHome";
; B; U1 \( u- f% O1 T2 f5 U @.DrivingHome := true;- y! [, Z1 v5 Q* A/ _
end;
, K& `5 x5 w$ K5 N6 Q; s& T else -- the vehicle @ is empty, both vehicle and part are in the same dock station; ?5 c3 P u/ X6 d
part := @.transpOrder; u0 V' S' h% O9 V
part.move(@);-- load part
( h9 A7 H* h' y: k) z3 ~ @.CurrIcon := "load";
) D3 X# B4 D& P+ h$ g B GlobalDistObj := part.globDestination;
! q4 V+ d& y1 W7 C& L assignLObj := rgmanager.rgAssignL;" Y3 j, o6 l2 ?( a" ]5 s
row := assignLObj.getRowNo(GlobalDistObj);
: ]4 r# @5 _$ g/ O$ L# K if Row = -1 then -- since 70
- Q; o! k: K; N9 ~- i if lan=1 then" u# ?& e* b& O# I# v9 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 e( [* s) w, |
to_str("in der Andockstation: \"",?.~.name,"\""));0 P5 d1 `* q& Y& K" k D, ]" w4 W
else+ E( t$ z$ K5 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, O. s& k2 y8 c6 x, z; d' c" p to_str("in docking station: \"",?.~.name,"\""));
$ s |9 U% y, X- x! c end;
' h! X; \6 ]. d+ o6 S else
& i% K! W3 T5 F7 a# v7 b+ x @.Destination := assignLObj[1,row];
# T$ h. S0 u2 i/ n5 B' p end; 6 t9 w0 j+ @7 ~) j4 l) j6 u
newDirection(@);
1 D1 }0 y% ]) C4 R. D @.HasOrder := true;
@! q% U6 i7 b4 M' m/ R+ L end;5 P4 T7 Q; G- n2 Z! Q
end;' t1 Q3 I) J L; T& `
end; -- of the method
/ ?5 x3 Z5 y/ z% }+ u |