/* called by: entrance ctrl of the object 'track'/ L$ P% y7 [* Q; Y6 X
*/0 ]. x7 v4 U" S
is
# O. E2 X, ~& f; ?9 T+ ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 s2 d3 w8 J" w. B P
do
" l4 v8 Y$ J# H! { Lan := rootfolder.Internal.Tools.AOLlanguage;
$ v# Q, q: C3 z( Y3 T; V if current = @.Destination -- else return5 w7 Y; i* g# k
then; u2 f# G" ^1 }1 d8 K* s
@.Destination := void;$ ] i2 }+ G* F5 Z
if @.occupied then/ j" j, m0 \0 n7 }* z
part := @.cont;: J6 c6 ^; {! |% `6 ~
@.transpOrder := void;4 M* p/ F! U. i$ d" o8 @/ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ i, q/ a }3 R8 D; B6 t
@,root.eventcontroller.simTime);9 |" W6 [* m% P/ e, V
@.HasOrder := false;) G8 F+ A/ B0 ]2 g% g
@.DrivingHome := true;5 {7 `$ a& t, y+ f
rgManager.tryToStartTransOrder;) X0 Q+ M U7 V
if @.Destination = void/ I0 ]/ Y4 B* o- |4 J1 A
then -- no transport order for vehicle @) r' Y$ o! O7 q6 g0 z# v% `
@.Destination :=# P% O+ w9 m0 [6 m( \" n
rgManager.nearestFreeStation(@,track.~);
2 N! r3 n- m, }; M e; K% H# j$ { newDirection(@); 3 R3 G$ s" Y) _5 P
if @.Destination /= void then6 T4 G) ?1 o8 Z' n5 j# |4 q; R
@.Destination.NumReservation :=
; [7 }0 Z1 t4 J/ Q, ]: _ @.Destination.NumReservation + 1;# Z- S& F9 M c+ L# i* h
end;
- }0 [- ~' q7 i2 Y @.CurrIcon := "drivingHome";. @, K: s* o6 U' e
@.DrivingHome := true;) R) h: }4 o2 \" [1 \- a) E
end;/ `1 ]1 e1 y5 X0 G3 }8 P, I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( j. H& a' b/ j1 a, A
part := @.transpOrder;
: S* m9 [8 v4 h/ R1 e part.move(@);-- load part0 Q! h& d6 D" ~7 m+ f: c" _1 L n: u
@.CurrIcon := "load";. R0 s7 R+ _7 f, {5 ?
GlobalDistObj := part.globDestination;+ A* a# L U: v
assignLObj := rgmanager.rgAssignL;
+ b) Y- V: H2 }5 [) O' y6 R row := assignLObj.getRowNo(GlobalDistObj);
/ x. z0 m1 `3 ^* C if Row = -1 then -- since 70+ @9 r& P/ i9 v D' B* i1 x
if lan=1 then4 m7 u: Y4 F+ d- R u |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% a5 k1 ?- |2 x3 F1 j$ G9 X9 q
to_str("in der Andockstation: \"",?.~.name,"\""));
$ ?3 a' u; W' K! H1 r8 z else* X1 N# N! W+ q! L$ G+ \2 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 S+ Z' k7 q2 @* M$ T3 U
to_str("in docking station: \"",?.~.name,"\""));
$ }& `6 K- V2 `" g8 p: m8 c end;
; g2 a/ y% o* z; e1 C4 v, [ else
8 f/ m' H& @; V' y @.Destination := assignLObj[1,row];3 m+ S, m& o. X) C
end;
- a' W8 g) C# V newDirection(@);
0 P% `& @" ~9 x @.HasOrder := true;4 L) P4 q4 l* X- ~ y
end;
! C' E' q. q9 D6 H' w* ] end;- v { `* K1 q9 g
end; -- of the method
% `8 C1 `; F* D6 L |