/* called by: entrance ctrl of the object 'track'
6 |$ u2 e) P# y) w; S*/
, h1 v% N6 E$ u: [/ A( ]7 dis9 A7 n! g0 Q2 @' A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- v' ~8 n& g2 d% ^ o( ~ y. Hdo
# S( v* X: y% N6 y( t4 X4 I Lan := rootfolder.Internal.Tools.AOLlanguage;
% H) b) c, L4 e- z/ {7 c+ h2 h if current = @.Destination -- else return6 c, W( y+ M5 [7 a6 {$ j
then
8 o4 d6 \3 c4 w4 W9 W @.Destination := void;
$ q8 A, i6 X$ K! q, w3 {* V; O if @.occupied then
' t. f! T1 ]5 V8 Z& ` part := @.cont;
. u' B0 F+ \9 G3 ?4 }. s) m @.transpOrder := void;. j2 d! X( Q# m9 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* A# p, W8 R( F# l3 z3 S5 ?0 I
@,root.eventcontroller.simTime);% H/ S& a+ D. A9 Q& q
@.HasOrder := false;0 i- a- F" C$ X7 y0 F1 p4 s: \$ l
@.DrivingHome := true;1 j# m7 Y6 e) D( K2 y) J
rgManager.tryToStartTransOrder;1 R/ \" I* V/ T9 r+ M1 G, m/ s
if @.Destination = void
: m; V% ?; `2 z* @9 A8 u( `5 r% m0 H then -- no transport order for vehicle @
1 A& b3 h( [ o8 m& u4 g- ` @.Destination :=
" u+ @% |) o1 \. ~1 A rgManager.nearestFreeStation(@,track.~);
9 M9 ^$ [( g9 b2 i/ X: J0 O4 h newDirection(@); 3 i7 P; M$ U7 @
if @.Destination /= void then
' C# \% o4 C0 h @.Destination.NumReservation :=8 a, K! h h+ G
@.Destination.NumReservation + 1;- x# N( T$ w, n' Q
end;
; B1 T% A# d0 P8 Z6 P9 s% W2 m6 @ @.CurrIcon := "drivingHome"; [0 G2 b3 M! b. ~6 }* K
@.DrivingHome := true;
6 z& e: Q2 r- @' x" v% Y end;: q# n- e! F% a# P- E1 i: a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 y$ F5 h. k: Z" Y7 a3 T part := @.transpOrder;
X% M9 K; w2 b$ ~ part.move(@);-- load part
( B" ?) D9 d4 L, e2 K4 } @.CurrIcon := "load";
& H+ [* Y& A8 z3 b6 L GlobalDistObj := part.globDestination;
; W# Y0 V5 p7 ^4 |+ I. A assignLObj := rgmanager.rgAssignL;
: N; q: K. h4 ^1 s5 J* ]' n9 q: n row := assignLObj.getRowNo(GlobalDistObj);6 R+ f: r; d3 _7 \$ M# I. _- z
if Row = -1 then -- since 708 E, d; n0 s6 V$ ?$ b$ q
if lan=1 then8 a% f' W, q$ d! C1 S: S1 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 n ?- b1 Z/ t2 r+ g: C
to_str("in der Andockstation: \"",?.~.name,"\""));& n: z8 J4 D$ F7 Z8 ~% j
else. i4 Q0 r7 a1 u! L6 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* y( H8 C* g) z* ^2 H/ z to_str("in docking station: \"",?.~.name,"\"")); . C; d8 r7 k7 E6 j1 }! E2 @6 u4 l- B
end;
* c& \0 v+ y) L" h. ~ else/ E, I) o9 [# q4 }, w
@.Destination := assignLObj[1,row];( p# i% v% k+ E+ L! D/ B
end;
: W6 S7 C# L9 ^. M$ j# [ newDirection(@);
6 H1 \/ s% E+ ?4 R: b2 Q @.HasOrder := true;! C5 \& Y/ W' r6 O- x; E4 d+ X, a
end;7 p W3 M9 r+ [* r" L
end;
3 \/ e' \9 z' o4 T$ U; Qend; -- of the method
; A0 e ~- \( |: m |