/* called by: entrance ctrl of the object 'track'4 f( v1 e3 O1 o! R R5 v- O% E
*/
! k/ o1 L1 F2 B6 X+ Zis! g/ K7 @! H$ e5 R# ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 o W% p9 d; E. f4 S7 Z3 D' T
do
8 J+ q& }% M" q4 i& w2 Z; b, R, B Lan := rootfolder.Internal.Tools.AOLlanguage;# D& E' v! e; T2 J* D- T
if current = @.Destination -- else return
( M: F9 e% h2 _ R then
6 p& b5 `! ?* H' J: D, P8 x/ d) ` @.Destination := void;
9 L2 B3 E% t. y! O; \- v0 ^( ?- O9 F if @.occupied then/ a! u: d d- A
part := @.cont;. M5 ^( W8 ~4 p& a
@.transpOrder := void;
4 c) x! X+ g2 E' u4 N& i* t/ O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ^4 I, r/ X+ _0 C
@,root.eventcontroller.simTime);5 _$ |1 y' B9 |7 {1 n, z* E
@.HasOrder := false;2 c& H# J3 Z O
@.DrivingHome := true;
" s$ E; P& w: T/ B2 o* _ rgManager.tryToStartTransOrder;
6 b5 W0 w" ^; [: n. f if @.Destination = void
9 Q0 n, Z, ^' [$ r- a then -- no transport order for vehicle @& \+ h. u9 i( q- T9 b% k7 \0 ~
@.Destination :=7 b7 d1 i' u0 ?5 E4 v+ L6 h
rgManager.nearestFreeStation(@,track.~);* g5 m- I9 F1 m( H7 v9 @
newDirection(@); + |' k( G) @4 L/ x! g6 y) I+ W
if @.Destination /= void then! U* ~9 T9 f! J
@.Destination.NumReservation :=* e( @6 K: o; \2 P
@.Destination.NumReservation + 1;
/ g& y) t% @3 c* _ end;. C+ u" F# q2 L6 i& [; N' [3 n
@.CurrIcon := "drivingHome";
/ ?. x4 x/ X, q$ l1 {7 g @.DrivingHome := true;
! _. N3 F* |5 S- M- U. E7 W6 ]; [ end;9 L- ~$ l) Y3 v) Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& L( G2 t, z- p6 x part := @.transpOrder;, ]: d2 i- x0 b$ d4 S2 c( i: T
part.move(@);-- load part
8 }: p: d# @ n$ W, j @.CurrIcon := "load";, c7 R" r3 K! }0 C# `1 F
GlobalDistObj := part.globDestination;
& l `4 B' a+ O$ V- \5 c# ~ assignLObj := rgmanager.rgAssignL;, {5 P4 b% d" j. _
row := assignLObj.getRowNo(GlobalDistObj);
* c' T/ K( w% F! J% x1 Z/ N if Row = -1 then -- since 70
) p& _6 v) q7 x) Y) I if lan=1 then
5 m3 Q; D1 _5 M' X, p% M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," X4 j+ [- e- ?2 D$ g
to_str("in der Andockstation: \"",?.~.name,"\""));
& s$ N+ S6 S" a2 k else
. a% T6 Q* @% r, _/ N- y; a$ y# G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
~: S/ O3 u2 H$ x8 H' r2 x+ f8 j to_str("in docking station: \"",?.~.name,"\"")); 2 s0 D4 C/ O$ w- k r3 ?: D" G' e
end;
9 O3 V4 G z9 i) m4 T2 V- q0 u0 E( F8 M else- B0 M z1 @$ n; J
@.Destination := assignLObj[1,row];
, X, c& s: b+ f7 g2 D1 y end; 4 u# Y% r9 M1 C, l& c% q* C
newDirection(@);
! @! ~/ S6 ~, |$ g @.HasOrder := true;6 l# u( ]. z7 _5 c* R
end;* t' b8 r2 G9 r) h
end;
: o7 f4 |2 F: r' Jend; -- of the method
\8 _4 A5 d) I3 O5 k3 H |