/* called by: entrance ctrl of the object 'track'8 g0 s5 D. M7 x3 U: A
*/* e6 y7 D w$ D
is2 d5 M3 B- S8 V+ A, x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 @# T% x [5 p- ]5 G* H
do
7 G4 x; U/ j8 c: q Lan := rootfolder.Internal.Tools.AOLlanguage;+ e B8 ?. q" A0 E# M
if current = @.Destination -- else return" |! Q: Q0 f: Y j* d
then7 b. C3 x! R, V$ N7 ~1 M
@.Destination := void;) G7 u% ?; k6 f3 w1 P0 V; X
if @.occupied then
& v5 a6 @9 N+ ? part := @.cont;
; }( N" H1 K& }( `5 r @.transpOrder := void;' M* X4 W, f( w, L4 t( D' y' N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" M; P* R7 O+ C! l$ X @,root.eventcontroller.simTime);. y1 l2 ^) d8 h
@.HasOrder := false;
: @; ~- A }7 j0 J- y/ ^: z7 X @.DrivingHome := true;" I9 m# q/ W8 A" j1 S9 k, @
rgManager.tryToStartTransOrder;
* f5 L: h- m/ q, W1 p9 h if @.Destination = void8 h$ z7 ^6 j. ^
then -- no transport order for vehicle @
5 W' z4 T4 `: B9 x @.Destination :=0 W, B! K6 p) h- S3 |5 E* d2 W5 O, P
rgManager.nearestFreeStation(@,track.~);5 C. @3 Y6 y n/ K9 W
newDirection(@); % w, f `: ?: m3 p# u
if @.Destination /= void then$ j$ R* `4 j" Z. V, g! T7 @
@.Destination.NumReservation :=" t' ^: C4 G+ C
@.Destination.NumReservation + 1;" v; W+ [% w1 s% P& c
end;# D5 k3 h$ ?+ z( {" T
@.CurrIcon := "drivingHome";
2 n6 N% [ W; t5 G, }. v @.DrivingHome := true;
) s1 v* P6 R; D; H end;% o/ y' b; O, I6 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' j; ~, w4 C3 L# O( S- O part := @.transpOrder;
" s% W2 ]' q: b# H4 n: L part.move(@);-- load part
% G* y- ?2 |3 a9 l @.CurrIcon := "load";) X8 b: H' H1 R1 D' k0 ]
GlobalDistObj := part.globDestination;
1 m( v; O( |, _1 q; ] assignLObj := rgmanager.rgAssignL;
6 i1 N6 Y) s$ `5 r row := assignLObj.getRowNo(GlobalDistObj);
: o; D3 O: h; l) h' ^" l1 m+ r$ I if Row = -1 then -- since 70
1 p) j# e9 U3 [0 r o if lan=1 then2 S* M, B) o' M! @& S: N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! s1 M( z! o+ k: _* A. X0 J to_str("in der Andockstation: \"",?.~.name,"\""));1 n1 O0 T/ m7 E% B
else
* W+ Q# {6 ]6 J( |% ?# [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* L& m& p& c* ^( R7 F H% ^! Y
to_str("in docking station: \"",?.~.name,"\""));
9 [6 w5 D0 k5 }5 W+ C) _/ S) g( H end;
: }. @8 m3 y/ x else4 {9 q0 n+ R% h% P
@.Destination := assignLObj[1,row];! Y u: g/ u0 t2 _
end; 7 h" E1 j- M8 a& F T
newDirection(@);
7 R5 c n: ?- D4 ~' U M4 B @.HasOrder := true;
3 k; k3 e c$ [) J4 L0 Y" w end;
( S/ \: G- S" e- m2 v0 y1 Y end;" k+ }2 r4 N* |; Y9 @
end; -- of the method
7 D& R" |# p' ^' d' T |