/* called by: entrance ctrl of the object 'track'
1 O, z. g5 |: G*/
/ `' R) t2 B1 f0 x9 F- n) t! {is
. \2 j& v" }1 o: ]6 S+ {: n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 [" J5 d$ J& K# {. q7 jdo7 W }; z5 V S4 u% O8 n) K
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ O- ^2 ]. v2 P/ f if current = @.Destination -- else return; i0 J& w4 d( b* G4 u2 q& B* U
then
& c' I& s$ g9 A% n) q h @.Destination := void;# } A/ e* a+ ^
if @.occupied then& F$ t: q/ c# r* k! @6 ?# H$ H
part := @.cont;6 X1 r6 B. @6 V, F2 R6 S
@.transpOrder := void;
( j, ?6 }- t) e x6 D/ ~( M+ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 C1 W4 v4 R- L @,root.eventcontroller.simTime);* |# y0 ]! {4 b: @8 t6 a. h
@.HasOrder := false;" G* c" H" t9 {- V
@.DrivingHome := true;* V( U) p" @' V8 d2 O! Y# M( i
rgManager.tryToStartTransOrder;
x: C/ v0 a b, N) S1 c if @.Destination = void
7 H7 \# T/ U3 s4 e! V then -- no transport order for vehicle @, y, {: n0 `, n4 P& a7 r- |" I% ]
@.Destination :=
# a5 N3 ?, ^) o) G0 a rgManager.nearestFreeStation(@,track.~);
5 z' V" e6 B* n: X; A: `! Q newDirection(@); 0 w6 I& @) `; v) A8 C, t: E
if @.Destination /= void then* D) X! B9 K; C8 k9 N/ Q
@.Destination.NumReservation :=
6 q, O, ?4 l% K: i% e @.Destination.NumReservation + 1;
( R0 J8 M7 p* Z: Y' | end;, G6 V+ U& K2 f, n( Y7 k: `
@.CurrIcon := "drivingHome";. \! }- _- j# Z4 W2 E; K& E
@.DrivingHome := true;* Y, D( h5 W% }
end;
! J; O0 U! A) ]8 m+ ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% A3 j) C# }1 B3 g; Z/ k; B; T part := @.transpOrder;
4 [8 Y! t d& n& I: C part.move(@);-- load part
9 `: j! s- {$ X+ M. {3 ^ @.CurrIcon := "load";$ C6 `% j" o1 F8 t2 f
GlobalDistObj := part.globDestination;; F+ j7 K; `4 A/ H( J- z
assignLObj := rgmanager.rgAssignL;. S9 d( Q/ I3 O& t
row := assignLObj.getRowNo(GlobalDistObj);
8 [8 e( `* \3 J% j if Row = -1 then -- since 70
* H) f" a/ r1 \' u+ F. m7 U if lan=1 then% \* \" T9 f# x% a7 k( X5 C/ ~4 p$ f- p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 e3 [; @. p( f0 d
to_str("in der Andockstation: \"",?.~.name,"\""));
) w2 C6 I2 k$ U) d- t7 ~# @) s else8 h3 H3 l- B! V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 N0 O- n( P% m6 }* y* i
to_str("in docking station: \"",?.~.name,"\""));
; E/ B7 z7 Q8 p' N# C4 E end;* v6 _! L6 S/ U& R
else' \5 G- R8 E/ g; I' h n# g
@.Destination := assignLObj[1,row];. u; Q4 k: e* c+ n% i, ^
end; . h* n9 b: ]% f% e6 B+ H! i
newDirection(@);
, s- o. _6 h0 E' E+ i @.HasOrder := true;6 D' S9 i& d" r0 {3 T4 e s9 b
end;
4 i$ z1 U$ Y( Y9 x! D) } end;
. j5 ?6 f) ]: o' B/ @* wend; -- of the method
, f: K: v' ~- u( ^; ~( f) n4 h |