/* called by: entrance ctrl of the object 'track'$ N. z3 C) O( q4 ~
*/) ^; e9 q P) J
is
4 U/ V& i$ e3 i% i part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 m8 t) _; d3 ^3 j( K+ q- E; R/ ~
do
2 F3 |9 A; o" {( r7 F( m/ h Lan := rootfolder.Internal.Tools.AOLlanguage;
1 ~- ~$ k! r9 q4 V if current = @.Destination -- else return
0 z( _3 J2 ?: c- F: i then
2 j! U" _$ O @* W4 u! o; ^: [ @.Destination := void;
/ k5 K& l8 F- U* X if @.occupied then
0 N$ q$ R, W5 q& z part := @.cont;# N) u/ U: \" t7 r- n6 H0 d. c
@.transpOrder := void;
& ~' k0 g! {+ g8 I3 a: _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) b% k3 @! D# D3 U, z1 |, w2 ^
@,root.eventcontroller.simTime);( f4 u% P$ z0 K
@.HasOrder := false;1 _( Z1 @ N: B/ Q+ ^3 m( l M( E+ F
@.DrivingHome := true;0 N4 `; K9 ^8 K1 x/ S" L* J4 W' T4 V
rgManager.tryToStartTransOrder;
6 a: A4 T- t, V0 h# o( N if @.Destination = void
5 v3 o( s# \/ v+ Z4 L2 ^ then -- no transport order for vehicle @0 j: J# n" X1 c
@.Destination :=
: p4 A- S o/ A rgManager.nearestFreeStation(@,track.~);
& L4 R* m+ V& a$ I# F newDirection(@); - P4 q: ~# k. k9 H) E0 W
if @.Destination /= void then
$ g) }& G1 }2 B$ S0 Y( G! T @.Destination.NumReservation :=
+ \+ b" R; t5 e; t) C, V& v$ @ @.Destination.NumReservation + 1;
+ L6 e7 Q* s' y! z. V end;6 B" l1 T! ~5 w) {8 H1 s% Y
@.CurrIcon := "drivingHome";
9 }$ f; I. }, H# s# q( r4 p @.DrivingHome := true;
+ C7 o- e9 P" N; j* O# B end;
+ o% Y! t3 n$ ?( q/ t3 |% D6 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ p: Z% r& t' Y
part := @.transpOrder;+ i4 Y3 v3 K; z3 _
part.move(@);-- load part+ B0 s% \! z/ g4 H% U
@.CurrIcon := "load";& O: N) D# }) | q- y0 E/ E; ^
GlobalDistObj := part.globDestination;
3 G1 {7 V$ n$ M, } assignLObj := rgmanager.rgAssignL;! y! f7 p9 E8 z. p
row := assignLObj.getRowNo(GlobalDistObj);7 u# s: c1 i/ m# W! U# j
if Row = -1 then -- since 70
" A0 c% d2 j1 r7 N) ?2 n/ u5 { if lan=1 then
9 Y, a) K* t- t& N6 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! W' G3 s/ M2 W7 B4 K& Q1 F3 B" e1 ^- L
to_str("in der Andockstation: \"",?.~.name,"\""));) ?3 l2 Y/ p- Q0 @
else
9 g) X4 J3 H& E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. {- F5 a0 B( l" J to_str("in docking station: \"",?.~.name,"\"")); 9 x& s/ d- _; |; B# }+ @( V! v
end;0 O! `* \ f+ f9 p. |" A
else7 M/ @* s% H$ |# V
@.Destination := assignLObj[1,row];
+ g) E9 U, I, m) v2 X end;
5 U; L3 R! F" i& g4 I2 O% }: | newDirection(@);
. H# p2 Y) T A1 S @.HasOrder := true;1 r. O! a' w) P; S$ K
end;
9 ?& r- `' R: D0 a/ o! O; u- @ end;
7 U" h' C; O; O. g* V3 |end; -- of the method
: Q" [" t3 }) g$ E) w+ Q |