/* called by: entrance ctrl of the object 'track'* S9 k& m4 j& n- }' D
*/( `4 u8 t; p4 Q0 Y3 P
is
! J" P. Q1 g7 l7 ~, l& q part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ F a0 `2 A4 S, y, ] I4 Y
do
6 W+ G: z% o3 o) `+ b4 b5 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;9 S0 Z8 C% o5 ^- J; [) |4 u- O
if current = @.Destination -- else return
* I O$ m, J4 ?% J6 }/ K then9 \) P' N" _ T- R
@.Destination := void;
; i8 ^1 f0 l3 L, R if @.occupied then
& A( |8 j* |2 v/ o4 n part := @.cont;4 `1 ]% o% n* `- | C
@.transpOrder := void; Z6 D) U0 g! O" t9 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, i5 i' t% C) |8 @+ r' A) d. ~& D
@,root.eventcontroller.simTime);
3 Y& P2 i o# n1 ]. j# M @.HasOrder := false;4 t) {1 Z! Y- l$ i! x" h- ]- q
@.DrivingHome := true;3 h" Y0 X" [( d
rgManager.tryToStartTransOrder;# F5 x6 ~# o0 A! v& C9 }/ M- Q: ~5 P$ d
if @.Destination = void" J; H4 z0 J- [6 L! Y9 c9 ]; w
then -- no transport order for vehicle @6 ?, T e: V; Q
@.Destination :=" u4 f J3 {& M3 V% X
rgManager.nearestFreeStation(@,track.~);0 T4 `$ g8 f# t( [1 _5 C5 N
newDirection(@);
: g6 P. z) D9 \* Z3 l' u, Y6 `0 H if @.Destination /= void then
$ e1 d) i6 ]6 Z. x6 N @.Destination.NumReservation :=. D. W* h C" M8 [+ c* S+ f7 E
@.Destination.NumReservation + 1;
8 K3 z: j: P3 p4 C, {8 \- O$ e2 j end; E. @. v" P; W8 K& ^ e
@.CurrIcon := "drivingHome";
* J5 h% ? a, A @.DrivingHome := true;
) [- `9 |- @( g5 [8 T! Q5 y+ h# M Z end;" h# U$ h. T B8 J& F% k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 l6 x3 X) ]" e0 t# |
part := @.transpOrder;
2 I+ r/ O7 G+ e+ O- l( a6 g part.move(@);-- load part% o3 L; d5 e: a! a* S* n
@.CurrIcon := "load";
4 g2 n {' k# } GlobalDistObj := part.globDestination;
/ @7 C6 u7 S' V5 E! o2 Z assignLObj := rgmanager.rgAssignL;2 V/ v: R8 _# j0 Y! d. D( d D
row := assignLObj.getRowNo(GlobalDistObj);
, e9 Y- ^ h! Y1 ~& d if Row = -1 then -- since 70
L0 |. B# F; Y9 F) N: q if lan=1 then
* H: {9 r3 k8 T8 Z/ O- K _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! i* b0 C1 z. M6 G$ Z: O9 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
$ [' b/ P/ C% y+ z `/ y8 D else; t2 B' R4 A$ M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 [; m9 y q4 O
to_str("in docking station: \"",?.~.name,"\"")); & J% A0 @8 ^) k8 g* V3 M
end;
1 S P) b8 c, a6 I7 { else
9 t, K' m& u3 e. x$ } @.Destination := assignLObj[1,row];0 c2 J. l7 x9 E* j& W& i6 k
end; 5 f! H8 T: j2 a/ c6 q# H3 _; [2 m% N
newDirection(@);
2 g+ T$ L, l# ?* c6 K) Q, x4 s @.HasOrder := true;) V( R( r! a: U" ^! D) ]* ?
end;
1 s& l9 O, w* u+ |; p" C0 a4 z) l end;
( J: O' {; X' k4 z9 `end; -- of the method
+ H: y, }9 B" c/ ~ u |