/* called by: entrance ctrl of the object 'track'
; m' y3 `! f3 {0 [. A& p0 O' b% `# K*/
, {! n- ?- b% X! Z. f! S8 ois
/ ]- ~0 A( s- \' m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 J5 U! Y2 h' W1 u6 Pdo7 v' ^. |% ~8 \4 M
Lan := rootfolder.Internal.Tools.AOLlanguage;7 }( o: z i8 ~5 r3 U
if current = @.Destination -- else return
, m/ N- h3 O* [) |; P" \ then
- a- p9 A: y6 _- T5 x9 p0 L3 h% u @.Destination := void;
4 k4 ^( g& o1 m' C# l+ b6 M if @.occupied then3 }0 w; K0 P8 y" e" B7 |: I" G
part := @.cont;5 M+ S2 |0 R" N* V( I8 ^
@.transpOrder := void;
/ @* Z- h6 w% I/ E7 G! e% I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 \- ^8 s( d( U. }3 b7 M' f4 @
@,root.eventcontroller.simTime);: c" T% r+ v( T8 K: M$ p3 Y
@.HasOrder := false;
0 g) t& F1 w& O4 { @.DrivingHome := true;9 {9 n; v: c( \& g2 Q
rgManager.tryToStartTransOrder;1 D4 M3 V# n$ z* _
if @.Destination = void
: i' [9 K2 W6 c5 N then -- no transport order for vehicle @7 u" P: h' @1 a
@.Destination :=
, n4 a) }3 x# u rgManager.nearestFreeStation(@,track.~);5 v& ^& |1 K% C2 b: t0 g
newDirection(@); 9 H3 q) p! \5 s/ T' h. r- V
if @.Destination /= void then4 B3 i0 v! o$ G9 i( I
@.Destination.NumReservation :=
. [% U9 w$ }- z7 R @.Destination.NumReservation + 1;" z2 C8 G+ P8 ]& B6 v. _
end;. Y4 e1 P$ u- B
@.CurrIcon := "drivingHome";
2 H5 e& k1 h' M/ f. N; p @.DrivingHome := true;
4 a2 R/ B+ z' a end;: U5 ~% b& K1 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 I; E9 E$ e! \1 c6 A part := @.transpOrder;
$ Q: s7 L- i( Q0 T part.move(@);-- load part
; e% ]% s, v8 }: K+ l @.CurrIcon := "load";
5 H( ~: n9 ]$ F w GlobalDistObj := part.globDestination;
: j6 w" x9 Y9 _/ y2 e, r6 C assignLObj := rgmanager.rgAssignL;) r8 i1 v: Z; y% s( g) h# [7 h6 O
row := assignLObj.getRowNo(GlobalDistObj);4 v# c, e/ |4 y/ h
if Row = -1 then -- since 709 t6 N T# ~, m$ w; \6 }# K
if lan=1 then; _) ?- X4 P* K# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R& F$ Q0 j2 ?& N8 e5 a3 i to_str("in der Andockstation: \"",?.~.name,"\""));
8 c+ y% Q7 b" Y else
0 g6 @6 w3 a6 b1 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ x5 ~2 z/ b8 \: F; Q to_str("in docking station: \"",?.~.name,"\""));
7 o" f7 m. C- W end;6 u9 H3 T7 ?9 d, o& Q
else
" F n0 A% g7 k @.Destination := assignLObj[1,row];
3 M5 e' G* r, p6 ?; Y# F- p end; " F) K/ o& k. M2 L
newDirection(@);
) C/ T a. M1 ?$ j V @.HasOrder := true;1 C/ W2 D& ^6 A- m2 z5 L
end;, ^$ Z9 D5 U% P( f6 ?$ c
end;
; z. X" v' ]; g Uend; -- of the method
6 ?5 w8 k |! |" P+ t |