/* called by: entrance ctrl of the object 'track'
6 j. \. P* v! I*/& {" R2 g% f; M3 M
is& Z. @. s: K6 U( T8 m6 d6 t, r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 T/ g6 E B8 t( s9 Y1 |( {
do1 v3 U) _$ A5 n4 z
Lan := rootfolder.Internal.Tools.AOLlanguage;9 l1 j j) b: T' E* n
if current = @.Destination -- else return
2 S4 ~6 T ~$ r' M/ C# P/ v then) i9 ^' G8 x! d" Y7 {$ Z0 s
@.Destination := void;; u n9 e: z4 K7 z. P/ o( B6 H
if @.occupied then1 V2 @7 g$ }5 A z
part := @.cont;2 {" M' u' o8 G9 E3 |3 J0 b/ C2 m, U) c
@.transpOrder := void;: B+ A) U6 _- i, L. Y) \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 ^# d1 ^- @" _8 C8 q @,root.eventcontroller.simTime);
H, D8 l+ e3 g/ y* } @.HasOrder := false;& Y$ n4 h" n; s/ t8 x
@.DrivingHome := true;+ y' y0 \. |) ~+ T9 `
rgManager.tryToStartTransOrder;& i# `/ l0 u2 J- p
if @.Destination = void
& r% L2 @% e5 ^ F5 J# S then -- no transport order for vehicle @, m3 {" n S c8 L6 c9 V
@.Destination :=
# y) U0 E: ^4 h6 n8 Z rgManager.nearestFreeStation(@,track.~);
5 E2 D/ e5 @' J2 k9 ^& G9 T- v ~( G5 t newDirection(@); / \ m9 X- G1 R$ W6 U# ?3 J6 I3 q4 U
if @.Destination /= void then
0 A" J3 s2 L0 o& V8 B' f @.Destination.NumReservation :=
$ q D: V9 c8 g. n& L$ q @.Destination.NumReservation + 1;
7 K9 K8 h/ ~" K: j, U/ H; b0 b! p( R end;/ h8 {( |' n& `; U
@.CurrIcon := "drivingHome";& {' r* o5 K: y1 w) }! d; L
@.DrivingHome := true;
# H2 k G- D2 g6 v5 V9 v& i R end;8 P4 Y( V; E/ X) }$ V) p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 e: F% I) F" l part := @.transpOrder;9 |7 l6 e* [* b) X
part.move(@);-- load part
5 d% s: W( ]+ z1 [; a; ]& g1 j) c @.CurrIcon := "load";# e$ R% g5 a) u: K# e
GlobalDistObj := part.globDestination;
+ i! C( T0 k7 b3 c. Y- T% j8 g% S assignLObj := rgmanager.rgAssignL;" w' q: Y1 Y, n; c
row := assignLObj.getRowNo(GlobalDistObj);
% s+ S6 w. w; l6 t/ v2 ~' H if Row = -1 then -- since 70& D5 |( V2 |, l( Q
if lan=1 then) p) A1 k4 o o8 {( \- g3 t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 @$ H8 @5 S o4 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
( V4 b. _) Z! B8 u9 e else m) O6 p* Q7 K' P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 ~, X0 [+ Y2 |5 [) z( K0 X2 A% Y* [ to_str("in docking station: \"",?.~.name,"\"")); + E3 l% w5 B6 Q% S2 o$ j e$ r
end;4 r. T7 t, x4 j" z R' |5 G
else
) ] M/ u* c6 Q @.Destination := assignLObj[1,row];) b: Y# P9 O) `% r1 Z' S
end;
( |/ C, T4 k% I: K1 h( Z: m newDirection(@);9 u; q y. X" _' L
@.HasOrder := true;
; M% ]2 Q+ r6 m3 s: E- b, Y' T end;
( O* W6 |8 ]$ p4 j* ^ end;1 |/ M+ T+ I w
end; -- of the method
8 x9 A$ N S& ~2 {! P, g& a( r- g |