/* called by: entrance ctrl of the object 'track'
1 e) V7 J. Q5 u- S*/ B4 M" b1 g b9 o2 t
is" a/ z, ~ t) k, ~" P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. Z+ o. C0 P' N" m) M8 Fdo" S0 ?1 w9 K: z, B
Lan := rootfolder.Internal.Tools.AOLlanguage;
, X( f8 Z. z2 ~ if current = @.Destination -- else return
- j3 H+ W( T, d8 }# T then
1 [4 I0 M& t3 _* y0 c" w; L% d+ ~ @.Destination := void;
/ u5 I- n: g2 E* |% r. x) U. h if @.occupied then
8 b) O2 B/ M+ _( D part := @.cont;8 K" X$ H6 d* c8 Z" }8 K6 p K
@.transpOrder := void;+ r' P: B; U D$ E+ I7 \7 E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 Y0 q. v: S" W" {
@,root.eventcontroller.simTime);* U7 \& n/ _) {4 `. d' c9 y
@.HasOrder := false; R/ j6 n7 G( R% l3 T- [
@.DrivingHome := true; E/ u( b8 `4 k8 R: Z4 @0 j& y$ F
rgManager.tryToStartTransOrder;
+ x' [- L0 L4 ^& `$ K$ r if @.Destination = void
: d! b5 @7 P) `3 k- E then -- no transport order for vehicle @% x4 f5 ]$ `8 @/ D0 h! D6 [9 I% D
@.Destination :=
) q G& n( e6 c3 V% H rgManager.nearestFreeStation(@,track.~);
! w0 k# T9 O! A& m$ n Q newDirection(@); 0 } K' S3 K$ w8 s1 o
if @.Destination /= void then
j7 a0 e* g0 n. @8 e @.Destination.NumReservation :=+ ^5 I+ p6 z8 }# d# }; c
@.Destination.NumReservation + 1;7 N: |+ r) E5 X4 b& S, p" d4 R4 N
end;$ C8 p: d# ]9 V) D1 e' c1 C
@.CurrIcon := "drivingHome";) Y" j b: a R, U0 G
@.DrivingHome := true;
' T' J$ Q1 v, |1 B; g5 f end;
/ v/ @" b7 O1 h [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- Q5 E% H+ c+ F; P8 M: @ part := @.transpOrder;
% [* b% h# T+ o% Z part.move(@);-- load part
& G4 S/ c: G: `3 `* a% b @.CurrIcon := "load";4 [% n: E# d4 z3 l% @7 s/ v
GlobalDistObj := part.globDestination;
& k1 D* _2 f3 H assignLObj := rgmanager.rgAssignL;$ @9 e' m, \% G
row := assignLObj.getRowNo(GlobalDistObj);* l' e9 {, F! M4 M
if Row = -1 then -- since 70- m/ u8 ?+ k3 W6 `" i" Y* [
if lan=1 then
. d% }/ g, U" f% @+ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 R% y& e9 `$ H. \' b8 @4 j
to_str("in der Andockstation: \"",?.~.name,"\""));
5 W, |* h) x+ } else
: O1 L* w% i$ v" M% ?2 A5 N) C; v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 f" G* o# w- d2 Q
to_str("in docking station: \"",?.~.name,"\"")); 7 S, h5 y Q: l; a
end;& j& V; T% J+ |- N/ o4 @9 T
else
1 ^6 T2 J- }# E6 ?) |/ o @.Destination := assignLObj[1,row];' N& W U4 r0 r6 J2 W
end;
/ o) t$ W0 {4 C4 ^ newDirection(@);& @$ r( j. e0 f% S5 S: C- e" Z
@.HasOrder := true;$ B) c; k, s) N* ?
end;; |% b4 W! B5 B y$ B$ A% v
end;
8 X# f4 O! R8 A0 K3 _6 X; {end; -- of the method
( q, J/ l# W* V4 e- g |