/* called by: entrance ctrl of the object 'track'0 S+ U2 N- E3 V( t
*/
2 c' @6 S6 U* i) E& P7 P5 Ois
7 d& ]0 t4 l4 {1 Y1 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;. h3 H1 V0 M$ Q
do3 B2 w% y$ D! m5 N; g
Lan := rootfolder.Internal.Tools.AOLlanguage;
\& Y! j+ j) p% o% x% y$ l; D if current = @.Destination -- else return
: I& _+ O/ Q+ D( m9 R% P& @9 j4 v then1 U$ ?: |6 t* k+ [
@.Destination := void;! \' ]" N" _" B3 @
if @.occupied then
# W% K- w6 A6 |6 t part := @.cont;
8 f5 `) U& j& t& H( v" } @.transpOrder := void;; g# G& b) b4 T$ m* P- d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 s; w0 L0 I/ \9 p
@,root.eventcontroller.simTime);. h( X1 A1 Q/ q6 C
@.HasOrder := false;
( ?% a; v* ]" ~9 z$ [( U# Q8 e4 I @.DrivingHome := true;4 B2 t" g4 y& D; k0 m. o
rgManager.tryToStartTransOrder;
k- | F# j2 \7 [- u$ Q! A* J if @.Destination = void0 A; D' x3 h" H
then -- no transport order for vehicle @# Z: b5 s" d, D2 H5 L! B
@.Destination :=" V/ K- B# w# a2 \8 R5 p
rgManager.nearestFreeStation(@,track.~);9 N5 C% z7 r+ `$ {8 n. B
newDirection(@);
4 q: e0 Z1 N7 u. R# H9 z( Y+ v if @.Destination /= void then
( Q) z' X( ?4 G) l @.Destination.NumReservation :=
1 ]) \8 X& D# l0 i. X0 f! T @.Destination.NumReservation + 1;
9 g5 e" N3 [! S w; [7 w end;
4 Y) p# P* m' j% \ @.CurrIcon := "drivingHome"; d$ ?* R7 ?8 f$ E f6 ]8 c7 M
@.DrivingHome := true;
; I; ~4 z2 t; q* Q& G! ~ end;
( q9 L4 @8 w) F0 A) ^3 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" j* n! j/ t$ q" Z+ e part := @.transpOrder;: g3 X* G& |" n- ]+ [' `4 t0 D, a3 d
part.move(@);-- load part8 Z, q) C$ I; j( y
@.CurrIcon := "load";
6 C2 E$ a, P6 [+ P2 s. O! @ GlobalDistObj := part.globDestination;$ W6 `! R, M7 m7 m
assignLObj := rgmanager.rgAssignL;! Q4 M( d; ^" M, c0 l( l. c
row := assignLObj.getRowNo(GlobalDistObj);- b3 i2 |: b K+ l
if Row = -1 then -- since 70
; v/ ?2 k0 v1 p. ^1 ~* W4 n1 Q if lan=1 then/ s2 o1 W8 g% C( n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; ^8 f2 U- n D0 t' n) B) U6 o3 q
to_str("in der Andockstation: \"",?.~.name,"\""));
. o. T- n& X3 h# l2 ~+ A1 O* `! d else
! K6 D n( t2 k7 [9 L1 b) M! _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ q( F! W) d* M! Y! w+ Q: r to_str("in docking station: \"",?.~.name,"\""));
6 t8 l7 c) J: { end;
4 T% `0 V$ Q2 j; W4 \! J3 ?" [7 Z else: ~4 c* p' V7 N: M, d5 b0 Q
@.Destination := assignLObj[1,row];" \7 M$ Q/ @ X1 q6 e2 i
end;
9 x) }. `$ S1 |4 Y7 B# z6 Q newDirection(@);
3 P/ Q0 d4 R2 M S9 p @.HasOrder := true;3 _- G8 Y* h6 K g7 D
end;
2 Y: {% n. k2 W" Q J5 c; q end;1 A* i1 e3 y) f# {9 V
end; -- of the method
% f5 H! m9 t1 b' N |