/* called by: entrance ctrl of the object 'track'
3 U: R# J, S V2 H. u6 Q*/
0 w( T# I. e# Q3 g+ p* r2 Eis
# {2 r$ V! t: Z$ s" k5 d4 O4 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( `* x$ F9 @! P- cdo
+ ]- G8 A& s+ A Lan := rootfolder.Internal.Tools.AOLlanguage;
9 F1 E& \* V8 J, \; h if current = @.Destination -- else return
# R5 z' g5 B' e: @9 n7 ?5 \' J+ @ then6 ]; _; c- C4 n: _6 |/ c
@.Destination := void;9 }, T+ E/ f i3 D$ H4 H
if @.occupied then; B$ h% @1 J, s. x$ _2 U1 W/ f. ^
part := @.cont;% `; \( v& ?/ A* d- V; ] f
@.transpOrder := void;
6 a8 [- |7 O: R8 o; a+ b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Q2 ?& e/ V+ p6 [2 o& w; I4 C; T
@,root.eventcontroller.simTime);
# ~( n8 P& W3 C, [1 n @.HasOrder := false;) V: N2 R5 L2 F
@.DrivingHome := true;
0 V5 a6 Y& _9 p rgManager.tryToStartTransOrder;' Q/ b; u; i( R$ |0 J
if @.Destination = void" z; C" c- ]3 g7 c
then -- no transport order for vehicle @6 d' F, a1 n6 o- A, Z( h7 t$ p3 y
@.Destination :=! L/ }# F3 k O# I
rgManager.nearestFreeStation(@,track.~);& B! s$ X. n( p; G/ w! G
newDirection(@); 9 T7 D8 }) Q5 F- s% y8 Q
if @.Destination /= void then; p% S9 K9 H4 z }3 c. C; W& g2 L
@.Destination.NumReservation :=! {& m% s7 w3 q2 j
@.Destination.NumReservation + 1;' C2 g! l/ `. o4 t; l+ ?
end;! \( t: \9 E/ ^/ l6 }( S0 W6 b
@.CurrIcon := "drivingHome";& z- n. g# P% ~) c; ?% w4 L
@.DrivingHome := true;
1 V0 j m# \8 D( y/ z, X6 z; p end;
4 N' h- }1 w8 l/ j8 h o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 U7 B' t' @& O% K0 l% } part := @.transpOrder;
9 ?4 h1 b1 Y4 d1 Y6 ~ part.move(@);-- load part
' H& h( U/ m# M1 ^7 {0 X8 I @.CurrIcon := "load";
$ d) Y* I- I a' I( k, t9 p GlobalDistObj := part.globDestination;
X9 H7 R5 K& w8 l4 D2 i$ p assignLObj := rgmanager.rgAssignL;
% |9 w' X& Q2 `9 h row := assignLObj.getRowNo(GlobalDistObj);
8 D& y" u1 k+ ~& I, T if Row = -1 then -- since 70
- M$ i7 n: l/ J9 ^ if lan=1 then
' {9 `) @$ o& y' K: h6 _7 |8 L+ z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: Y) w ~$ P! q* r& o to_str("in der Andockstation: \"",?.~.name,"\""));" }% H8 I8 {0 U O0 [
else
& N6 u3 y5 l# y) D f2 k& i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# i! E" ^( s$ K! M to_str("in docking station: \"",?.~.name,"\""));
7 _) ?0 M' |7 f end;
3 ^+ U% s5 H" E1 L1 y% H4 k else
7 \) t, F9 P9 S; g" e9 g8 K @.Destination := assignLObj[1,row];
" {, g9 ~$ f2 R1 P end; 4 v3 e2 q/ E1 X5 q/ y L7 H
newDirection(@);
6 U% i, z; P0 m! K) [3 w7 b3 t @.HasOrder := true;" K# N, O$ L/ r$ \# }8 k
end;
" e$ F/ T- R# Z* {: H end;
3 `; e. N! P" z# \' d% lend; -- of the method
$ f6 q* N9 q. _( X$ u |