/* called by: entrance ctrl of the object 'track'
5 V" C# ~6 R( e- F9 X/ e5 ~. S*/
1 Q( d1 b+ o! o& Eis
; S8 r2 }9 k; S% T& H" }+ l part, GlobalDistObj, assignLObj:object;row,Lan:integer;) K# |: z0 u' J
do
3 S% }% m0 ]8 m3 m4 B Lan := rootfolder.Internal.Tools.AOLlanguage; d& U: B0 q* l* g- j+ E
if current = @.Destination -- else return* ~& b6 y/ Y! K$ H8 w
then
: P6 ^* j8 _8 B6 x' a) N @.Destination := void;
; I- m3 p, \8 K4 {7 Q1 J if @.occupied then9 j& l/ x/ a7 }7 Z7 m% d& e
part := @.cont;
9 E8 g- g) T2 j# q$ C0 Y @.transpOrder := void;' q+ _0 }- O* c3 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: b0 `+ m' W" S4 ^
@,root.eventcontroller.simTime);
% t/ `4 I- v6 m# h9 f! e @.HasOrder := false;
9 z! l/ p: N- h( i6 T5 i @.DrivingHome := true;
% V3 R* ]; z% r7 E, l# i8 I' [ rgManager.tryToStartTransOrder;7 N9 g9 y& ]' j, T- q) Y
if @.Destination = void
0 |* B8 X3 t; W2 \ D& b then -- no transport order for vehicle @+ S* |7 a9 x' J
@.Destination :=
: f- s+ S2 w3 c9 p, Z# D, E, _ rgManager.nearestFreeStation(@,track.~);
2 F8 b- X1 k* _, e" ^. G newDirection(@);
3 o$ \1 ]# X5 d( `+ X g8 v3 H if @.Destination /= void then
6 x- ~: g5 n3 h' X2 X% N @.Destination.NumReservation :=$ t2 A7 W# X/ n$ B% u9 r. E
@.Destination.NumReservation + 1;3 ~. e! O {/ s$ H5 _& T, B9 b) z
end;
4 P# ] n/ ~# Y+ x @.CurrIcon := "drivingHome";- P# F: Z7 ~' }$ ~. G" U
@.DrivingHome := true;
/ v1 s8 U# Y- \. d u end;
+ B0 n- G3 a+ f5 N, o else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ }# b3 x* B4 f3 K9 _ j
part := @.transpOrder;' B: ^) g+ N1 T+ F2 c3 k
part.move(@);-- load part1 z' F8 L, F( m3 E- E% o
@.CurrIcon := "load";
8 k) U+ Y4 n9 ^* S- ~) Z( K3 h1 L5 r GlobalDistObj := part.globDestination;
! J5 f$ n: Z. A# ]; u' N7 t0 L assignLObj := rgmanager.rgAssignL;
% ]/ Q1 _6 F& d7 L- k row := assignLObj.getRowNo(GlobalDistObj);
, i7 N [7 l: x if Row = -1 then -- since 70 s& n: R9 a5 w
if lan=1 then
3 C5 F5 T6 u1 x. z. d" c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: p+ w2 g/ _* P+ D* W$ s ]
to_str("in der Andockstation: \"",?.~.name,"\""));
7 d& N | c: }" H0 v else
@3 U) u; `# t0 g& b' r% b8 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: F+ n+ J" ? V/ j1 i to_str("in docking station: \"",?.~.name,"\"")); 5 c# }. s' V) H8 l
end;
- |) A, N+ O1 R. Y: M( u else0 t& _1 {) \* O
@.Destination := assignLObj[1,row];7 C1 l4 a+ z* `- A0 \
end; ( h$ s" ?8 q8 @3 H
newDirection(@);9 i" Z' X4 a0 ]0 @( M& U
@.HasOrder := true;
1 L, t" S5 m: o0 @ x9 w end;
/ {$ f& x9 {, a. X e: b: \0 _ end; X& z/ h2 J. t& `; W# p
end; -- of the method4 k. z! c: v+ y4 n7 h N
|