/* called by: entrance ctrl of the object 'track'
. C0 s. J- z8 ~5 q: x*/
* y4 D; e8 t7 O- Mis
9 k! Z# ~$ ?: a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 L6 e! K7 a5 D( {do- z2 T- L- @1 o! c
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ~; g% j: v9 r; H; p% ~ if current = @.Destination -- else return
) x( d' P/ }$ {+ N2 M& b then% T N8 j5 ~) M3 ^8 c$ [
@.Destination := void;2 n" d9 _) A5 b, y& L& V9 q
if @.occupied then/ r+ ]2 j, Q9 q* d7 {* {( l+ E/ `. c
part := @.cont;( d* q* `0 D3 v- E, b2 Q) z9 n; q
@.transpOrder := void;* D" q+ U Z* K' J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 P% c4 o. J5 A+ ?3 c6 s5 x @,root.eventcontroller.simTime);. ~0 f% F, T" }- S1 u, ^
@.HasOrder := false;
5 j4 `, P2 n. t @.DrivingHome := true;
- W9 f$ c1 A8 v# H rgManager.tryToStartTransOrder;
0 V& d( C5 n0 d- a% X if @.Destination = void
8 L: B0 C% Y5 ]+ ]* v w then -- no transport order for vehicle @
4 l- y6 r& t8 z6 ~# r; t2 F @.Destination :=
% R9 D2 h5 m+ U1 {1 S. @2 K rgManager.nearestFreeStation(@,track.~);
! {8 ? ?4 Q( k* L newDirection(@); 3 ~3 X3 o- Z& O+ J0 L
if @.Destination /= void then$ a, m) J5 H/ _3 S" E2 D: T
@.Destination.NumReservation :=
0 i5 B: u1 ]4 Y# p @.Destination.NumReservation + 1;( I2 |6 Y% N9 _, _5 {
end;
( H2 F$ J! S8 G6 U) Y @.CurrIcon := "drivingHome";# Z ~2 T& B& A6 n5 R7 F
@.DrivingHome := true;! e: C( v4 ?3 l' h
end;
4 `* @+ C5 x- j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, u9 |$ a& m. E2 ]5 g part := @.transpOrder;: D/ B: k+ _. h+ D' L, y) }
part.move(@);-- load part+ I) D1 r3 S6 d1 `- q
@.CurrIcon := "load";
6 F' p; v; W- R$ \# r' i0 E' V GlobalDistObj := part.globDestination;
, G% V' I+ s# X, X assignLObj := rgmanager.rgAssignL;
# K1 N7 R w, z. j* A0 m# Z' l row := assignLObj.getRowNo(GlobalDistObj);
9 s7 W* ^" r6 M5 L if Row = -1 then -- since 702 K8 ~5 \7 U9 S8 V3 q4 B
if lan=1 then
: Q3 _( P8 _ k/ ~1 C2 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Z5 U" F$ J( c7 i
to_str("in der Andockstation: \"",?.~.name,"\""));7 S- k9 c) H* n
else
/ q, S& O/ A! ]5 J3 ^: W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& R$ a2 b/ W9 f: L+ P, y" t to_str("in docking station: \"",?.~.name,"\"")); 0 N. c+ ^( i9 c8 q; H
end;4 P! F' _) f/ X1 F; W7 P
else- q% w1 p2 l- J
@.Destination := assignLObj[1,row];2 `+ q: K# w' @, C3 M% [
end; 7 k" M& ]/ n5 _8 j: b3 U
newDirection(@);
8 A! J/ H7 V8 \* v; H+ O4 B! b, U @.HasOrder := true;
# U j' K, l9 r+ C& O7 [ end;
9 m% ]+ f$ p% K: ?7 ~& s4 E3 K end;
- M; Q' |( O' F/ R) q1 Wend; -- of the method
5 l. j7 F k0 w+ j |