/* called by: entrance ctrl of the object 'track') k( T. H4 O5 v# M4 ?0 m
*/1 L4 E1 K: I3 \
is
4 j+ g; q# I3 r, ?# e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 w2 j ~8 r! k& U( O/ m) @do
( s6 D9 L6 D, m: `- X3 e3 [. A Lan := rootfolder.Internal.Tools.AOLlanguage;
0 ^7 R7 n' S; d if current = @.Destination -- else return
. J- }" d9 Z1 G/ ^4 N then
# I* B C( H# ]" } @.Destination := void;3 |. O1 `4 C4 _2 c; F
if @.occupied then9 k# \, L5 U- P- x8 M4 I0 B" Z1 W
part := @.cont;
/ w/ d+ \3 l# x4 |& M* R- d8 E @.transpOrder := void;
1 M1 d& W' H1 F q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 J% f, P6 k. l: h+ [+ S/ s+ b @,root.eventcontroller.simTime);' s/ K$ K1 A- b
@.HasOrder := false;1 Z B& f9 M9 d% H2 l1 {/ d/ [' m" y
@.DrivingHome := true;
. G9 A7 w; P7 n& L rgManager.tryToStartTransOrder;
- q9 Z* I5 C0 W* X) Z0 J0 A if @.Destination = void6 h- q. y( y3 G. ~
then -- no transport order for vehicle @2 K# G/ }, k$ p' D, r
@.Destination :=. o* o) O* u, Q3 a& B3 o5 O$ z
rgManager.nearestFreeStation(@,track.~);
! l. }& J% y$ b: N3 L; y newDirection(@); ! e+ z; m0 v* {2 @* @
if @.Destination /= void then
$ A. A( q* V5 l; d, P+ H @.Destination.NumReservation :=
: B, @2 n; F: m: F# ~ @.Destination.NumReservation + 1;
2 o5 ]8 V/ O. } u: c0 d end;
. g: w3 A) p: i: [9 w/ y6 T& @4 D @.CurrIcon := "drivingHome";: ~3 o! h2 x7 T' r# P, T% ?
@.DrivingHome := true;
, r; H( g( a4 Q& V) L end;
! w; v4 T. Z- m& }! n3 \6 l) n) B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Y( N! @" ]4 E1 g part := @.transpOrder;2 M6 y5 ^: U: f$ M) c) Q9 c
part.move(@);-- load part
' h* p& ] p/ Z [! L8 v @.CurrIcon := "load";
+ c. E* \5 C4 }, U& h$ r2 O. a GlobalDistObj := part.globDestination;; @3 P3 v, j+ I
assignLObj := rgmanager.rgAssignL;5 g7 B0 P; k4 w' a
row := assignLObj.getRowNo(GlobalDistObj);
( e- P4 @ f! W: G) Y8 B% y if Row = -1 then -- since 70( n1 Q0 L) G3 U1 u1 x- x
if lan=1 then
) |* B# L$ j7 O1 v1 F9 L/ f+ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ v# F" |+ q% z5 S
to_str("in der Andockstation: \"",?.~.name,"\""));
+ T8 |+ a6 q. E5 b3 ]# s, p3 P else5 h6 \6 g+ E/ n t+ j/ ` d; ^! S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z9 _5 {6 J- }0 s: o- n to_str("in docking station: \"",?.~.name,"\"")); - E; P& z& l4 G/ Y& U' h
end;
4 {7 Z8 a& { J. c0 n else
* `; q; ]. S* s8 V7 h @.Destination := assignLObj[1,row];! @7 U6 q: E1 \3 G
end; 3 s5 C1 _3 t6 s% L
newDirection(@);
7 y/ y ^7 }; { @.HasOrder := true;' U* l( |; C. a. u! l
end;7 S2 Z5 I1 [7 h+ g) D
end; c8 u6 D" t$ D i/ p, h
end; -- of the method
Q" Q- p; m' n" z- f |