/* called by: entrance ctrl of the object 'track'
r9 h/ }2 ~4 A# J6 q! ^$ i*/
2 M/ d: n& N% ^" eis
$ u9 L& r" q) E part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ S( A2 e3 n, Y& g9 D% U
do+ [$ h" y* m7 C5 }" t+ j
Lan := rootfolder.Internal.Tools.AOLlanguage;) v/ w3 v h1 k7 v W' S/ G- W* Z6 E
if current = @.Destination -- else return% J: N7 [9 z C+ T
then7 T6 I1 {" d- m* k; P
@.Destination := void;
, `4 T3 @) `' \. R% I( r if @.occupied then
; a1 {5 @) r5 l, s7 p# ? part := @.cont;
- ~+ [& Q) m5 X @.transpOrder := void;2 Z4 @& r* L+ U& t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: _& I3 y! `5 D' @: ]* m& H1 |# W
@,root.eventcontroller.simTime);: j ~3 U* w+ m9 g( [
@.HasOrder := false;
9 o1 |( c8 U6 K! c! z4 n( K& y @.DrivingHome := true; p8 E- R: J/ \4 }" w' ]$ r9 w
rgManager.tryToStartTransOrder;
" P! b4 p G# a1 B, l) R if @.Destination = void0 m% d' z. k; B9 C/ X' V/ R
then -- no transport order for vehicle @
' G! ?) O1 x5 U# O9 X5 p7 u @.Destination :=
4 c. ]6 G( g% J# V rgManager.nearestFreeStation(@,track.~);
0 u9 H- {/ h* u6 H. Q H newDirection(@);
+ G& r0 d9 ]- l$ x if @.Destination /= void then
. n7 n2 V# a7 V$ B @.Destination.NumReservation := O; o2 U! X$ I _* r, B. y7 |
@.Destination.NumReservation + 1;
6 U3 w& e5 j! S+ C7 [ end;
2 c" l8 K" N# A @.CurrIcon := "drivingHome";
4 ] P* Z, f5 v- z3 e! d @.DrivingHome := true;. x- U, M* S* I3 p1 j
end;
2 \3 w, |0 {! `9 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station, y4 a4 `+ X4 X {" Q" @& w- F
part := @.transpOrder;
7 x$ v5 W; v6 z. M6 t0 p m part.move(@);-- load part
8 r5 s w3 s- ?6 B6 O9 ` @.CurrIcon := "load";
+ O3 s1 h- u; N% L& l. q GlobalDistObj := part.globDestination;
+ V: y/ H! X) p% n; c assignLObj := rgmanager.rgAssignL;4 S, a4 }/ s+ u7 a! S: K E. D7 B
row := assignLObj.getRowNo(GlobalDistObj);. V% J3 W- _& O% u. N' G
if Row = -1 then -- since 70
3 z2 X0 E+ c/ {9 d; S; u# g' Z if lan=1 then
' h* G* v* S0 [6 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?1 L) F) J/ [/ `3 I
to_str("in der Andockstation: \"",?.~.name,"\""));4 C' W3 p" }8 }3 q
else2 x ~1 n) W0 @9 q Y! B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' y0 S+ A0 \; J4 a to_str("in docking station: \"",?.~.name,"\""));
0 I0 J6 b1 j6 M( w5 P! F. }) I end;
$ D8 ]1 c% W( r# j2 E: B | else2 f _3 L5 g X8 x+ a9 q& g% j
@.Destination := assignLObj[1,row];
3 v9 O4 K0 E8 Z- ? end; . ^" Q" }9 A' }6 Y! Z9 l& d
newDirection(@);6 Z$ w. V# e0 ] s
@.HasOrder := true;) r+ v; e. u9 i
end;# [1 j/ S- z! |6 d0 Y! J% _
end;
3 d0 }& g4 f$ U5 h" _; Jend; -- of the method
$ \4 u9 g; }. v9 c2 I+ f, i' m5 ?3 g |