/* called by: entrance ctrl of the object 'track'% _# |. }2 X4 ~ d9 I- V( a- N
*/2 n: s3 }+ `0 J* i2 @, ~# m/ U9 Y
is: _6 P" t; M; j: u$ [ M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 _. o" _5 Y! z, K3 P
do
7 h' ?- g8 g+ c* N9 N Lan := rootfolder.Internal.Tools.AOLlanguage;8 g* I: e" F. T$ `7 n5 \
if current = @.Destination -- else return
2 I y+ y( v, P c2 V then, ~% A' k8 Y0 j7 n& U7 U
@.Destination := void;
( B/ H! J0 P) M4 h+ e1 h$ ]) d' V" N8 Z# e if @.occupied then0 D+ S3 g" ]6 k. l8 S: Q2 _+ w; m8 x
part := @.cont;. p) Z% Y% J ~4 E7 T) Z. }' I
@.transpOrder := void;
8 ?/ ?, B0 H! p$ g& O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# S" c. k" u6 o# j0 O {" ^6 K. ^
@,root.eventcontroller.simTime);
; b7 }% H/ o- x* A5 \! u3 f @.HasOrder := false;
; f. |0 i9 s* F8 W @.DrivingHome := true;( b3 O8 a+ | `. [ ^4 x$ a, b2 _
rgManager.tryToStartTransOrder;
0 x( @( P* Z4 {( f/ h if @.Destination = void( J, u! E5 X3 h# S& \! u. {
then -- no transport order for vehicle @
5 H" H6 `- [3 `0 K* V* K+ G @.Destination :=
" \& M+ H+ o% z/ H. J3 K5 P0 Y rgManager.nearestFreeStation(@,track.~);2 Q! e4 w, Q$ E6 E
newDirection(@); ( v9 h) l# `/ J# O0 F/ [ G" U
if @.Destination /= void then
( q4 F3 }2 z$ t% |) d @.Destination.NumReservation :=! b* I9 C1 v+ Y3 R- ]- w
@.Destination.NumReservation + 1;& ]7 E# h$ J! V h3 L' Q, a8 `
end;
/ r- ^/ H( z3 L' I4 v# `% V' ` @.CurrIcon := "drivingHome";' Q/ G7 G! z: K1 p+ G. K$ Q2 H0 G6 R
@.DrivingHome := true;
+ N4 p% i5 s1 k2 D% Z/ i end;' q* b) C6 @2 F) |7 b' f. Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 y1 O6 J0 `# `
part := @.transpOrder;
# m0 ]* }5 D9 H9 F: F4 d2 [8 _ part.move(@);-- load part
. u T2 U$ G! n( C4 ]; b# c @.CurrIcon := "load";- ]0 U5 y5 G7 A
GlobalDistObj := part.globDestination;* A! S1 R( E9 d8 n, U
assignLObj := rgmanager.rgAssignL;3 b9 T/ i0 a7 V& f
row := assignLObj.getRowNo(GlobalDistObj);, p' C- a/ L& l5 W
if Row = -1 then -- since 70
5 O6 _6 @: D" u% t4 i c if lan=1 then
# y7 K/ z e1 V- E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ M1 V/ Z2 }' l to_str("in der Andockstation: \"",?.~.name,"\""));7 z% _" H6 |* p% c1 z9 A# y! q- V
else
9 `1 K- W" v6 R/ E$ v/ ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 V! H; Z D: h" T to_str("in docking station: \"",?.~.name,"\""));
; B6 D' X4 q' J1 s3 |1 x1 H1 U end;& s! i Y& S# l# C1 T s$ X
else/ E8 k1 d6 }" j( _$ X9 v2 ]6 L
@.Destination := assignLObj[1,row];9 u# a+ _/ v, G* R/ G2 G
end; Z& f, [# g" u* X) `
newDirection(@);
/ z$ R0 q8 E8 M! ~ @.HasOrder := true;
/ F# d3 F: n& J) [4 J6 n. v end;
1 P* I. d! ]+ u1 X; c: }- Z3 X end;+ p1 L4 ^8 U; J3 X
end; -- of the method
: P8 W' M$ U7 ?8 I! s: P, _ |