/* called by: entrance ctrl of the object 'track'
4 Z; A M. S1 n I2 K/ ?/ D$ ?. q*/% H8 ^& f2 @; I4 e4 d) V( ^
is
% ^1 y& A8 _2 [9 H* h d part, GlobalDistObj, assignLObj:object;row,Lan:integer;& Y1 N3 d6 [1 ?! L; A4 s0 n
do
1 f. a) K+ ^0 t' g J0 n3 z Lan := rootfolder.Internal.Tools.AOLlanguage;: ~6 R7 v3 ?' H7 U' l, ^) c
if current = @.Destination -- else return" `1 J' e+ M6 o7 G+ d" h
then) ]* X; m& `& H# \1 I) {
@.Destination := void;
4 r4 t0 ~0 C) Y- m* Q+ W2 Q if @.occupied then
2 @+ X6 I) s# o part := @.cont;2 O, H7 a. {) u1 \( y" G+ ~
@.transpOrder := void;% ] W& Q# C. X3 s. f* b6 C' J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: t' I! {! T* _- K0 N6 f$ m @,root.eventcontroller.simTime);
5 h9 S9 Z) f3 u& t: l @.HasOrder := false;
# L; X R- Z. f @.DrivingHome := true;
( w4 ]+ {+ K! x! H- m$ K rgManager.tryToStartTransOrder;* P5 u3 [- u% G# }/ ?
if @.Destination = void
1 p7 G- Y% _. C0 _ then -- no transport order for vehicle @
0 S* u7 Y& K& o% D @.Destination :=2 ~4 }7 H% r6 l
rgManager.nearestFreeStation(@,track.~);
! D" } j8 x8 K; \- `4 `% C newDirection(@);
; c$ r8 ?: T* C: q/ z+ W9 i if @.Destination /= void then: h0 j5 k+ g; J6 N
@.Destination.NumReservation :=
- J' z( R! z8 g% L @.Destination.NumReservation + 1;5 l5 U- ?9 W8 g- V6 L
end;) X+ Q6 o1 J+ v* ~& ?
@.CurrIcon := "drivingHome";% O- u; [; t" P0 h5 W
@.DrivingHome := true;
: Q: t# y5 t8 Y) x" ~% X8 F end;: p( R# z' Q: z* S: R' u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# D: V0 E2 C# X) B+ k. w- W
part := @.transpOrder;. j3 B8 k! I" S5 `
part.move(@);-- load part6 N' C& g( S* T; h3 ]
@.CurrIcon := "load";
9 @0 m( G* _2 d/ A8 s& @/ H" \& ^ GlobalDistObj := part.globDestination;
. w+ O) z' h% g% [9 {* L! g) l/ Q assignLObj := rgmanager.rgAssignL;
! \% p# m+ h4 W5 a# [ row := assignLObj.getRowNo(GlobalDistObj);
, ^5 v0 b$ W% w) B0 H if Row = -1 then -- since 70+ L, f5 h9 Y$ H, m% N8 }; z
if lan=1 then. C! g) N6 x* u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% b2 w; s' N3 q( h- m4 [( R5 W to_str("in der Andockstation: \"",?.~.name,"\""));" T# `% W% ^% q
else& ~5 A1 F" [9 Z2 j# |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
S5 X( v' m1 a9 H% z+ i7 [4 V to_str("in docking station: \"",?.~.name,"\"")); ) F4 q4 _# t4 ?) T
end;
. n$ E% i& N6 ^3 X7 A else
* }) z3 u4 W; b+ G3 k6 |% C @.Destination := assignLObj[1,row];9 e+ o8 u# C2 b5 @1 s- @
end;
9 H5 _( ?! r* s- s newDirection(@);$ v' O: W; ^) s* g
@.HasOrder := true;
, L( Y9 U4 I- E! }9 W5 M end;2 E' h' W( P' y9 C, K$ a6 Q
end;
. j3 ~( i0 R; j3 `$ Eend; -- of the method4 B" G* ^8 j( M E0 Y% v6 L
|