/* called by: entrance ctrl of the object 'track'3 \: M0 y- f+ u9 B7 C, U: _/ z
*/
5 E: p6 i6 E8 Mis' {% A/ P. A& r3 T# V' ]' u5 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r7 C/ X4 Q8 l: V3 ^4 g
do
( Y7 e! T4 {7 L0 R$ w7 m Lan := rootfolder.Internal.Tools.AOLlanguage;
2 p( O2 `' D- G; t ` if current = @.Destination -- else return
1 m* x4 @; M5 \ then
- S9 l( P* `2 V, C( S% z @.Destination := void;
4 F" i: U! s, Z if @.occupied then
N, c/ v) b; `. K part := @.cont;9 [- o3 d- A) T. N" c4 o% I
@.transpOrder := void;; I3 j: L# B* s; R! d2 \' Z8 I$ f1 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 N4 s# D1 {% v q* {0 ]# d9 |8 C @,root.eventcontroller.simTime);* h W9 I0 ]& x& n! B4 \$ V3 v
@.HasOrder := false;; h% ] @) _" R7 ?8 m+ p& q6 S
@.DrivingHome := true;9 @" n, s1 T8 u, {% o- w5 f9 v
rgManager.tryToStartTransOrder;: f& A4 u: }3 G. f6 w
if @.Destination = void( ?; r2 h) d' w& l6 F, e, W
then -- no transport order for vehicle @% A; N \: r# N s
@.Destination :=
, N% H9 u$ Z# D* H4 N% m rgManager.nearestFreeStation(@,track.~);
5 p$ t. f* Z. |$ Q5 }1 x5 }# c newDirection(@);
! h, w" p" v: K8 I if @.Destination /= void then& Y. |5 j( t; j+ A
@.Destination.NumReservation :=, s( r4 n, u" o1 {
@.Destination.NumReservation + 1;) c0 c' s4 m# Y/ }6 [ \
end;' f& l" F' N" i i, I
@.CurrIcon := "drivingHome";5 z/ Z5 M* k7 C+ n* {9 k8 f
@.DrivingHome := true;" U$ q% W+ U8 |$ `/ f
end;
& R/ B- O& p9 z X( p* {, x, v else -- the vehicle @ is empty, both vehicle and part are in the same dock station* Q5 P; w9 g" [* [$ Y
part := @.transpOrder;8 |4 \2 |8 \6 ?$ ~" m0 V! ?
part.move(@);-- load part
8 w# T7 H# v" g! |" S* i& U @.CurrIcon := "load";- a$ L: g4 e% \& [ L
GlobalDistObj := part.globDestination;* @6 F) \' C- f
assignLObj := rgmanager.rgAssignL;
' e% R B3 o. [6 y row := assignLObj.getRowNo(GlobalDistObj);. h0 U' T7 b T0 u {1 k/ r
if Row = -1 then -- since 701 N6 y- {5 @, Y7 t, B2 e
if lan=1 then
. d4 r" o* z: y: k) i1 m$ p, W% d" O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ q! V( }6 P' P% c5 x% y to_str("in der Andockstation: \"",?.~.name,"\""));8 `0 A Q' _6 F
else8 N- c+ o" X1 \' w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" L4 ^( Q9 q# e3 y9 t' ~ to_str("in docking station: \"",?.~.name,"\""));
0 x: A9 h) a5 l" `0 Q end;9 r# W _! }, C8 \; r
else
L+ y3 t" O/ p2 j1 N1 S2 ? @.Destination := assignLObj[1,row];2 ` o! V2 l1 a: q% z0 Y
end;
# m8 s0 s4 D; u! T* N8 v2 _! B: X newDirection(@);1 O9 N; F7 N1 x/ M' [ v* J
@.HasOrder := true;1 I0 N/ I; o6 w3 C+ L! H! C
end;: x* \- k- _2 X
end;' `1 }. I5 T, s% Q" O: T3 m
end; -- of the method" p% j6 r, I/ W
|