/* called by: entrance ctrl of the object 'track'
+ I8 F- `* P* l9 s*/
- _" N, {6 g2 {' P' V4 J5 e$ ~is7 I, ]0 p, V. ]2 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. y( Z. q- M' _, g
do* n( b7 l' R6 F2 c/ G; o
Lan := rootfolder.Internal.Tools.AOLlanguage;3 E1 M$ t% w# `4 x: p
if current = @.Destination -- else return* k) @0 x2 {8 U
then
& Q* ?0 g( [8 F, u' _7 J- M @.Destination := void;0 H: o& I1 U$ u+ @
if @.occupied then
0 R8 b9 E7 {6 S/ L" ~5 w/ q part := @.cont;! P: n1 k: P) H1 \9 ?
@.transpOrder := void;
, S0 _! d" L$ J: |8 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 _: T; m, R* J" \ e7 Z6 o/ K
@,root.eventcontroller.simTime);
% o# g W r8 [; K' r @.HasOrder := false;/ o3 B1 U8 T9 q8 I& t
@.DrivingHome := true;
/ B0 ^ P+ ]3 |6 u! T rgManager.tryToStartTransOrder;/ D# |: c! x* P" h( k, p- b
if @.Destination = void
0 u7 }% Y) W! h9 J f% r) U5 e# f then -- no transport order for vehicle @* u+ [" e, H }$ @* _
@.Destination :=0 P4 h- D1 L- w8 N
rgManager.nearestFreeStation(@,track.~);
( f" W4 W1 h& p0 S% E* C newDirection(@); , b% P/ ^) \6 X" j
if @.Destination /= void then
0 p: s4 C1 z7 N. H$ X! O7 H @.Destination.NumReservation :=
* d) B8 `7 i7 f2 S @.Destination.NumReservation + 1;2 l. D) I- _+ {5 J' m
end;/ d9 t4 d, T( h5 w8 m
@.CurrIcon := "drivingHome";" i0 b1 n# m! O; _
@.DrivingHome := true;
% O/ h; Z y, e5 r" T# {" b( D- y end;
) ]) f' \$ G5 ?5 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 D- w+ C' B: Z part := @.transpOrder;
' @2 [; A/ {, D$ b9 H part.move(@);-- load part+ P. n+ S B( Z- T
@.CurrIcon := "load";1 }8 f# r$ ?* r" A
GlobalDistObj := part.globDestination;
! ] A: y; K Q' h' u assignLObj := rgmanager.rgAssignL;
9 J, n! V! P3 @/ `; r, I( P row := assignLObj.getRowNo(GlobalDistObj);
; Q7 ~; K5 Q' Z1 F if Row = -1 then -- since 70$ ]2 }/ z8 B6 S9 \) U2 d0 k& j; h
if lan=1 then. L3 S7 s& i$ J: c8 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" O+ n7 [8 \, E Y/ i0 q to_str("in der Andockstation: \"",?.~.name,"\""));
8 `/ R' X# W: `5 \ else
+ X- v3 A9 J" }* C4 V5 [% S, P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# r7 m5 P& _; p; d: P9 B( X) e
to_str("in docking station: \"",?.~.name,"\""));
M# u) c1 A( _ R9 q R$ s end;: U0 D P- T1 r+ W3 F) C
else
3 ^' _7 e1 l/ N0 `# R. K" N @.Destination := assignLObj[1,row];* x- ^9 H; u/ Q6 @# `
end;
% P \9 y$ R: w% y2 m! u" M) l, a newDirection(@);
1 ?4 S5 z+ U p" x" Q. _) P @.HasOrder := true;$ c# s8 [4 t3 J" _6 i' V
end;! v: r* h/ Q5 B$ i
end;
; c0 e$ }3 E e+ ?9 d1 v5 Oend; -- of the method
) Q1 z; K% p7 r0 j' D3 ?- v- V |