/* called by: entrance ctrl of the object 'track'7 a' l8 G6 v6 Z7 z8 l/ T
*/
. U& k8 ^& N$ y2 K: d: {is
8 H% N* C2 M' R7 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P6 C& ?+ o$ T
do: L+ M/ c9 ~2 d1 t2 G* i
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 _. ~1 \+ C; x- p( A) Z7 ? if current = @.Destination -- else return
& Z. c3 |8 m0 [7 ] then
" ^' o- s5 n$ i* X! ^' f( r+ W @.Destination := void;
' K8 i7 n2 c: J& k R if @.occupied then
/ a. [+ z% H l part := @.cont;
/ o+ p0 F |: E% W- D9 R @.transpOrder := void; n2 T" ?1 X0 D, m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% n- Y) S# X9 Q# l6 m% ]
@,root.eventcontroller.simTime);
" M- A* Q0 T* m6 N/ j j @.HasOrder := false;! C1 m- V& n- V1 t; ~' I
@.DrivingHome := true;. Y7 N( D, @* T* N3 D
rgManager.tryToStartTransOrder;" |2 M& c3 @8 p' F5 U
if @.Destination = void
6 @# c' {5 r& y" y. o1 g5 ]4 t then -- no transport order for vehicle @$ T4 J: I1 m: H+ W6 l
@.Destination :=
6 S. a& E% v0 s" E rgManager.nearestFreeStation(@,track.~);8 k+ f% A1 }- m" ]5 S0 }
newDirection(@);
. q' k3 K _: _% k if @.Destination /= void then
- \1 V, _$ ~8 w. p( _) u @.Destination.NumReservation :=
$ ~) P$ @! ?7 G8 x! \- A @.Destination.NumReservation + 1;4 o2 [, c- _ Z0 L9 I$ h
end;
- q7 |3 u* ]) \7 z @.CurrIcon := "drivingHome";# |+ I# C. h* z n& f
@.DrivingHome := true;, o) v& K1 c2 X. P! D0 @
end;9 T; R) I6 `; \$ t2 T% e! L, t0 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. x- r( F1 |& v+ v part := @.transpOrder;9 q. R' o+ V* H* X
part.move(@);-- load part4 O0 M' X5 a0 o! G5 ?
@.CurrIcon := "load";, U* ?( r0 J" u1 j5 u. ~" ~0 K
GlobalDistObj := part.globDestination;9 A& q ]" d; _6 j
assignLObj := rgmanager.rgAssignL;" y: Q K. x) t! j& F) Z
row := assignLObj.getRowNo(GlobalDistObj);: K& p9 B( s+ f5 p7 _
if Row = -1 then -- since 70
% r6 o( k" S' f8 u$ a if lan=1 then' C `6 W; [1 Q' c! I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 F/ H4 a, x" i2 A
to_str("in der Andockstation: \"",?.~.name,"\""));! S: O1 D n3 {( b1 X2 n# |
else1 l' y5 t8 k l' ]$ O E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 {! a$ u [5 g6 H: b; K7 z) u' t to_str("in docking station: \"",?.~.name,"\""));
9 O3 U x- N1 k end;
1 v+ |) I K$ _& V5 B else( H# [- J- n1 R% Q# G
@.Destination := assignLObj[1,row];
' @7 X8 f7 ?9 `" R" D' ?' n end;
0 d }4 A+ z |/ ^" B4 p1 W* ` newDirection(@);
- F/ f* L6 O- j% B1 | @.HasOrder := true;
7 F9 f. }9 ^9 g# q. Q7 s end;5 I" ]6 Q4 V5 i
end;
( ~( r- s2 f+ w/ }end; -- of the method
3 t4 e5 c* D: H |