/* called by: entrance ctrl of the object 'track'$ P5 Y! `' b, y5 P, D
*/
1 I/ A4 i4 K# E- d8 ~is
2 _. W, k% ?# x$ ?( d3 ]4 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 n8 `) M% v) [0 H1 edo
+ I* ` M7 ]# e7 e6 r Lan := rootfolder.Internal.Tools.AOLlanguage;8 ~& h7 u3 b2 W8 l5 N6 a6 m8 v' {( [
if current = @.Destination -- else return( q/ a1 M6 m5 a& {9 Q- c. H
then& A& E! O- `* ~7 ?3 _5 S7 K
@.Destination := void; F0 ^8 e5 k$ t `* L* w
if @.occupied then* E& X. _8 }9 P8 L
part := @.cont;$ e& A P/ \; Z- u2 J* D
@.transpOrder := void;
; B1 ?% P H; e4 B T. X( l! \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& N% y1 _( u$ K- | \
@,root.eventcontroller.simTime);
. l, D4 b8 T, q; T4 b% q @.HasOrder := false;* f9 l" Y1 `; b$ X6 ]5 T' B
@.DrivingHome := true;
7 g1 l/ N) ~* x rgManager.tryToStartTransOrder;
8 c0 G, P) k! g, |7 p if @.Destination = void: c6 K3 g9 E! y) A7 r4 J; Z3 P" a
then -- no transport order for vehicle @
, m4 y: T4 b: F+ n# D) J z4 } @.Destination :=) Z7 d# V5 w/ `) V; ~$ t7 s
rgManager.nearestFreeStation(@,track.~);. L" I9 G, E8 b; P, S8 n4 \
newDirection(@); $ p- B# a: e9 w: [" Z4 D
if @.Destination /= void then
8 q8 H6 A& C6 I @.Destination.NumReservation :=
& w2 i, x$ H, v5 U8 Y' _7 r @.Destination.NumReservation + 1;
Z, U, b Y E3 j( ~9 A. m$ a end;
- e$ L! V. `4 h0 H+ i# Q& W5 | @.CurrIcon := "drivingHome";. _! i/ ~& ~3 ?+ ~1 W. _: n
@.DrivingHome := true;
% O' m9 `& P/ ~+ X& S; P& Z8 p end;! f; S8 `# z- n% P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ y! n" \& u. S6 D& d
part := @.transpOrder;
9 D/ {! [9 f4 c+ g6 Q; w part.move(@);-- load part
3 i1 c0 L: n/ Q @.CurrIcon := "load";( { \- f% L" W9 _ }) x5 x* i$ \" x
GlobalDistObj := part.globDestination;
% s0 g2 Y0 i0 t. H: t, a& _ assignLObj := rgmanager.rgAssignL;
* p# F' a9 D: F8 n7 x4 p/ P% ~ row := assignLObj.getRowNo(GlobalDistObj);! B6 h( L6 N9 c% X7 {7 I
if Row = -1 then -- since 70
& H! ^! s' n! x& U( N if lan=1 then
3 u5 D2 m! H* z: F! [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 _, R" k8 ^: `, E to_str("in der Andockstation: \"",?.~.name,"\""));
v" a. A4 F8 b, x. { h+ @ else" u, @; W* x. f! I+ F R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# c& Q/ d# u) T" B3 K8 i to_str("in docking station: \"",?.~.name,"\""));
) m/ n8 R. \$ @+ v0 z" }4 v4 }% l' D end;3 \( D3 v9 o3 G9 ?2 Q
else
4 k% R! i% Q8 a# L/ {# d) m+ \( j @.Destination := assignLObj[1,row];
! N R! B6 }& h" `6 ^% V6 @3 U end; 2 R3 o1 W2 p4 C# B$ R
newDirection(@);
3 u) C& M8 J; [ @.HasOrder := true;* h# L" Z E. E) q0 |/ w1 s
end;7 g* K, V' R% H6 k3 z
end;" o+ @1 h& t- L9 q# J3 ]
end; -- of the method
6 K. k' p. l. O: ]2 b) M |