/* called by: entrance ctrl of the object 'track'
5 n0 o9 _& ^# g* v6 s*/! `; g% P* \ E& @
is
0 C7 }8 O! Q' i0 q4 V* C6 ]3 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 n% i" N0 v7 Q9 P1 D# N3 G
do1 F/ H- r. h3 o& G) T) Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ l* a' B* z! ]3 `6 Q W2 p. ~- W if current = @.Destination -- else return4 }% y! R% c* [
then7 l2 e' l) `/ C5 w) ~2 v/ A
@.Destination := void;
/ ~7 Q4 j: o; i8 A6 K5 F9 x if @.occupied then
1 t0 o! r( g5 D x8 f. @5 F part := @.cont;. h3 @& z: N7 ]7 n' N
@.transpOrder := void;
% D1 D! r. p5 ?+ i) @- a" C) g& y" I' x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* s6 ?5 O+ u+ K1 W+ V
@,root.eventcontroller.simTime);
4 ?$ I7 F& r( I6 k: v6 ~ @.HasOrder := false;$ E2 s- X# v* ]1 `) c& q+ C
@.DrivingHome := true;
$ ~0 J; p3 A) m* o7 j4 v$ p4 A0 s rgManager.tryToStartTransOrder;% V$ }* E3 z8 N# \; E. O
if @.Destination = void
1 @8 E% [' E) s7 q! H) U0 w; A then -- no transport order for vehicle @$ w" Y. }$ H |( M# U
@.Destination :=) ?" Q# i; l1 ]$ }$ M3 Q
rgManager.nearestFreeStation(@,track.~);
* Z* [7 W5 W) g; P newDirection(@); 1 ?& k* G; ?, m) I+ }& v1 [3 M
if @.Destination /= void then& A. P o' |2 G1 @- w$ V
@.Destination.NumReservation :=& @9 a% V9 {, W+ n" O/ t
@.Destination.NumReservation + 1;
7 B# t- V# ]0 @8 ~6 W( A3 M: z; j end;0 g6 O# P9 B2 C5 E2 m+ ]$ y
@.CurrIcon := "drivingHome";
/ ]3 W% S# l' C. p! s8 v) A @.DrivingHome := true;# y$ P) E$ L7 F. C2 x
end;
- R- j7 H* n6 L; A- B( y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* z* ^4 E0 g- [ part := @.transpOrder;2 x7 L3 o* U4 R8 j' q6 J3 S
part.move(@);-- load part, K: K! N0 j9 B7 x+ O4 B
@.CurrIcon := "load";
; K' E1 B U& ^* a# v% I) o+ Q GlobalDistObj := part.globDestination;
9 P4 ~+ ]: h3 E* E+ c assignLObj := rgmanager.rgAssignL;
' ~1 K$ r, o" W. p row := assignLObj.getRowNo(GlobalDistObj);- F5 U- ~1 F& P1 N) n1 I1 K
if Row = -1 then -- since 70: }& S* q, J7 M9 {# R" ]8 a
if lan=1 then
+ a6 a# n% e. C- d$ N7 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% [2 o, K% g |' s to_str("in der Andockstation: \"",?.~.name,"\""));( Z+ R& q# k {; w
else) M3 L! P5 G. A( R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 i( r( z& K! t4 z
to_str("in docking station: \"",?.~.name,"\"")); $ g+ }# }3 V, T2 @5 K
end;% x7 D" S4 h3 {) k0 [0 q8 @
else
! P4 y. D, m g @.Destination := assignLObj[1,row];
2 |( M. y; U6 O" Q, r" b0 [ end; 8 ]5 _+ j- v9 T4 B/ s% J
newDirection(@);
6 p' e- x+ I$ z7 E2 d* h @.HasOrder := true;: K! A3 X. Q6 m/ A" y8 G% j3 C o
end;
* a1 d d, \4 Y7 f4 W end;
& }& O9 Z0 H: y0 p6 g5 pend; -- of the method
# }; L) z+ \- `% {6 @% n |