/* called by: entrance ctrl of the object 'track'
( W* j% g7 D/ x6 ^$ F: g9 D4 ]*/ }, M5 n2 G8 k4 N% m
is$ @+ B8 B4 r0 t, M9 ]$ V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, o0 {5 K) G5 o% f, u: ydo
$ f% M; t. l/ o1 K4 o Lan := rootfolder.Internal.Tools.AOLlanguage;
2 I' N% V2 F5 p$ l0 n/ f- I if current = @.Destination -- else return
/ P1 l- n+ f* ? then
9 H0 k. j$ R: A/ o5 A! x& X! c0 D* \ @.Destination := void;) e0 _$ K) c8 t4 v" m
if @.occupied then2 t: m+ ^7 ] L+ o8 S1 Q) g
part := @.cont;9 X( K* y F r& I7 a
@.transpOrder := void;/ }; M) M2 K w% o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# G' ~2 I) Z3 @5 g" x, i @,root.eventcontroller.simTime);$ ~5 i( m6 I4 t0 B/ m' M: z
@.HasOrder := false;- ]0 `$ ^, F R. M" W: ^. s
@.DrivingHome := true;
2 M/ ~5 \3 W |, O& S rgManager.tryToStartTransOrder;
: {) h6 w# [+ V/ y' s if @.Destination = void
5 a( O3 w+ Y$ m6 c* k" ? then -- no transport order for vehicle @
& A: w* g& r7 Z' R6 t* ] @.Destination :=0 U7 B8 h* Y9 r4 ~0 x; a
rgManager.nearestFreeStation(@,track.~);
! B$ e. }% V2 v5 n newDirection(@);
! f- d6 K; |3 M4 E9 n0 l if @.Destination /= void then. K- g; `. D5 N& m7 ]7 G9 O
@.Destination.NumReservation :=! z9 }/ P) Y3 T, P& k4 A
@.Destination.NumReservation + 1;
" {0 d* E! y- T4 N2 z- f% O" e/ } end;
, Y* d# W7 \7 D, m: t" ^1 Q: R @.CurrIcon := "drivingHome";4 E" }8 [4 p1 \
@.DrivingHome := true;
- p' b, Y$ r3 a, w end;
0 I2 N# w% a8 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 a/ G* @1 G, s$ I7 r part := @.transpOrder;
6 I2 `/ s9 g. o1 h8 ? part.move(@);-- load part
; S _8 k- \" v! y0 f! w# s. Y @.CurrIcon := "load";2 W: i- f+ W- A; I' I& G) V
GlobalDistObj := part.globDestination;0 p. c$ @% q4 I- ?2 J
assignLObj := rgmanager.rgAssignL;
" Z% x/ z3 ]+ o row := assignLObj.getRowNo(GlobalDistObj);
/ d0 x4 p) J1 P6 ^, _0 u if Row = -1 then -- since 709 w( Z# P+ o. i) D
if lan=1 then
# @& \* x3 [0 j4 F5 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& X# e% ?$ \5 f- Q) o
to_str("in der Andockstation: \"",?.~.name,"\""));7 p/ ^3 u$ W7 `0 e5 S) W- F" J; d1 y
else! @& }% [7 C% o1 v/ }3 c% {1 Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Z: p) }/ K* W6 h) t6 W to_str("in docking station: \"",?.~.name,"\""));
6 T0 y' |& e. F" h7 t& m, S end;
( i; m9 O6 @: {% Y, J else7 @: s( V3 d+ G* h0 r. Q
@.Destination := assignLObj[1,row];) r7 u' y" A$ x2 d) S
end; 1 v2 T0 Y. a! c: P* F6 b
newDirection(@);
( w) {6 j8 D( A( ? @.HasOrder := true;
" Q1 ]# H ]6 [# U! A+ S/ r end;. B$ ^/ u4 |& q; U3 o) K K+ s
end;) ^* {: H/ W- u6 @) o! G5 z
end; -- of the method, a4 ?0 ?5 _ H9 I- W7 h4 f
|