/* called by: entrance ctrl of the object 'track'
3 ?) R/ \2 z% r/ a*/8 e; G: O" ^# \/ }
is0 l& {0 g8 q8 U8 Y& _: W X. @" m8 S0 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* b- J9 N. y$ S) q- Ldo
! \/ E) X+ |6 n Lan := rootfolder.Internal.Tools.AOLlanguage;3 f0 I0 y, T5 C3 _& y
if current = @.Destination -- else return
$ h% v7 R5 [+ w* h7 K2 U# V then* ~8 O3 G& U+ K! L
@.Destination := void;
! H0 L! ?- u% i) E. _* q6 z/ I if @.occupied then( u$ M9 t6 r: C: r1 @2 _9 C A
part := @.cont;
. T, e9 i" t/ V! y8 Z @.transpOrder := void;+ E- w0 o& s3 R4 K+ e& T% Q1 N/ W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 _9 i# f9 t* n6 {, I0 D( ~4 Q @,root.eventcontroller.simTime);
% {4 w% V5 v- J" q. s @.HasOrder := false;
4 ~# b; G3 E: h! S @.DrivingHome := true;1 d4 I' h4 i7 ?& i* i% ]' O; p
rgManager.tryToStartTransOrder;1 N. i- p: f/ P! O( y
if @.Destination = void- g3 z5 [1 O7 C" y- g/ g# W
then -- no transport order for vehicle @
5 ?) ?9 C+ I5 y' X( E @.Destination :=
) N2 W, f* N2 C4 a rgManager.nearestFreeStation(@,track.~);0 p/ y( L6 A6 Q& E
newDirection(@); 7 l% f/ z4 P" Z( k" o
if @.Destination /= void then7 E0 ]" m% o X: H) g& \
@.Destination.NumReservation :=
! l" l( \/ I+ n3 l3 U1 s3 P- u @.Destination.NumReservation + 1;
( |: d" @! r5 [: m end;
6 m, T' \5 t% c1 b @.CurrIcon := "drivingHome";
7 d" T' V O. n; u @.DrivingHome := true;
; t9 G x7 X* d! D9 b, |' l* K; d end;0 k" k" K3 s v* z$ S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ s0 L* t. j! R7 n: u7 z
part := @.transpOrder;* }; p M- Z2 J( a6 @
part.move(@);-- load part
1 j' r A0 a2 x! G1 }3 [1 j @.CurrIcon := "load";) n) r" w6 A+ k) F
GlobalDistObj := part.globDestination;4 x6 r$ p- {1 T1 v6 v6 |
assignLObj := rgmanager.rgAssignL;
0 z1 _ Q7 b" I; _0 c% |5 S' W" Q row := assignLObj.getRowNo(GlobalDistObj);
* K. N: p7 E% _( @! u. \ if Row = -1 then -- since 702 H- K2 L+ z2 s5 L5 V' g
if lan=1 then# Q/ K% u1 v) s5 {+ H* k& M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* s6 ^4 u6 D# M0 N0 { to_str("in der Andockstation: \"",?.~.name,"\""));* [2 W$ @0 w! B2 A
else
# J5 \3 C2 h3 V# ], L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! D: _' H* C2 ?6 S to_str("in docking station: \"",?.~.name,"\""));
O, s& u4 L5 |+ M* F end;
c" U% N, ]/ t' R9 f# Q, L else
# \& w3 e* S0 r U% Q% o @.Destination := assignLObj[1,row];' U+ ~; ~: t6 u& W* ]
end;
; I/ h' B% f/ J+ ?5 B' W newDirection(@);7 _' i) e% H* W
@.HasOrder := true;& |9 s: \ M; v" U- n* X/ {
end;
3 L, B7 ^$ E& ]. |' _1 [4 h! w* z end;. F8 N& `. [4 c' ^
end; -- of the method
# @2 P; y( `2 T0 V" }" C* n# A6 E |