/* called by: entrance ctrl of the object 'track'
# s& @1 J3 q' n$ a*/
2 k( V6 \1 K% A# k" v1 Bis
0 C, g" [- V; C part, GlobalDistObj, assignLObj:object;row,Lan:integer;, {0 j3 l/ i2 c
do
" x: b% E2 ?$ m Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~) p. B q6 g1 d; v# d if current = @.Destination -- else return
0 q' [( G2 c- J5 E then$ e& h, s" g# ?# e9 D
@.Destination := void;
3 D+ O3 L7 f0 G6 B if @.occupied then& \( | C8 i- g) [8 f* X
part := @.cont;
4 g: b6 }4 x1 I, c @.transpOrder := void;1 U3 J/ _1 L. C4 I7 @. }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 l- \6 v) ?& S; D @,root.eventcontroller.simTime);
n0 D: x% i& _" A @.HasOrder := false;3 K3 {( ?6 Q O6 J
@.DrivingHome := true;
F; r5 @; ^9 |! Q3 h4 S rgManager.tryToStartTransOrder;/ a2 a+ I. g; y/ t3 G
if @.Destination = void* [$ i0 l8 B `+ P1 U
then -- no transport order for vehicle @
& Q3 `7 q* s8 x& |# o @.Destination :=5 r' t$ y: R1 J
rgManager.nearestFreeStation(@,track.~);, T! C4 G) e0 R. A; \0 U& X2 P: U
newDirection(@);
; O1 N# n6 a3 |: P3 r if @.Destination /= void then
: g" o! y% |- X9 |) z) z& c* c @.Destination.NumReservation :=, ]/ ~7 e- Z8 j7 x! |5 m% ~
@.Destination.NumReservation + 1;
! \+ i# L! y! m1 n2 ~! H$ v" L5 {0 [ end;; p3 O! ^ c+ J, O) u+ e* W( U
@.CurrIcon := "drivingHome";
) B. v7 u% _. K/ B; V0 ] @.DrivingHome := true;
! J% C. N+ [4 A end;0 J r3 ?5 u: `4 y& @7 e! G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 a& U9 x, A/ r k5 y, O part := @.transpOrder;
+ i+ K& H6 }' m3 Q part.move(@);-- load part
4 ~: X5 B# n4 f! D; Y; V$ P$ X! c @.CurrIcon := "load";
$ s/ G, d2 X) d" r GlobalDistObj := part.globDestination;
0 U& v, |1 A3 T3 f" C7 M) G assignLObj := rgmanager.rgAssignL;' q5 g7 G( R. K" z
row := assignLObj.getRowNo(GlobalDistObj);* e' p; {% X# ^. Y
if Row = -1 then -- since 708 X% ?# h1 K, d+ s6 h$ e! S
if lan=1 then
' S+ w7 v% h* h% i' v9 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' e) ?, D5 r) |* `; E! k to_str("in der Andockstation: \"",?.~.name,"\""));3 X; ~3 i( Y/ \: W- l }
else
" ~! Q) S# n( E0 ]/ ?5 U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. x* Z9 @$ x/ ?; Q; c' {- t
to_str("in docking station: \"",?.~.name,"\""));
" A% ^1 q3 o# p2 x3 g. a end; _. B# G& Z/ V- x8 \' q
else3 Z- I$ t% q' p% Z9 [' b
@.Destination := assignLObj[1,row];
4 \* l7 p% K+ z8 ~% s. z4 F end;
+ C" [9 u' J, W w newDirection(@);# T3 r7 }6 \2 B2 D6 c
@.HasOrder := true;4 _/ E1 l/ k9 z- h) J5 ]
end;& a+ E$ w/ B9 }+ h: u% T6 C6 g3 k
end;( V3 I: P( c1 U" G/ V
end; -- of the method: @4 V; c3 Q, c
|