/* called by: entrance ctrl of the object 'track'
; B. t) T9 [ f' a8 b6 y*/
0 H3 h0 ]" i! ^& pis
( J/ S' H- f4 i) Q3 a' a3 a! f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ M# t0 [# r* `( v- H5 u- Bdo
& U1 U9 d1 q' I% n2 W4 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
5 d8 L$ t) [, X if current = @.Destination -- else return
- a$ N) A- a2 D then+ Y; A5 q" v* _" s' E. O8 C
@.Destination := void; V' `$ W9 y/ y0 M* B$ F1 v* E
if @.occupied then
+ T# ]% j1 {1 v& l7 _ part := @.cont;
' _0 e2 C" _; O' o: H @.transpOrder := void;4 X I+ ~/ m. `$ U3 ~, G/ V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 U" g% k Y2 G0 E6 v
@,root.eventcontroller.simTime);7 N% ~1 [! }9 Q, _! Y- X% n; l
@.HasOrder := false;
$ r& K6 q' Z% {) m# j( M( R @.DrivingHome := true;* X: a% m6 o8 V9 n- q$ m
rgManager.tryToStartTransOrder;
) B' ? w5 c" V" N; l; ?9 z if @.Destination = void, m x9 W6 z+ G
then -- no transport order for vehicle @3 W& V& F3 d! c8 ?
@.Destination :=
& B* f4 W# ^, a" z5 K4 }+ Q rgManager.nearestFreeStation(@,track.~);
' U/ d: f* V) E' w) N6 ~ newDirection(@);
+ z- u8 g7 o4 J8 k if @.Destination /= void then: p' b0 u! v4 k5 J1 M1 n1 L7 ]. K
@.Destination.NumReservation :=% q; e0 N7 ]. K; i( ?
@.Destination.NumReservation + 1;; S& G0 N& O- O! I
end;
% j5 ` Y# ~3 L3 [" a @.CurrIcon := "drivingHome";6 N+ I7 {( K# H: s4 l9 ^
@.DrivingHome := true;! l" Z4 m/ @ S, [, [
end;
; X1 Z$ {1 _- s0 O( r else -- the vehicle @ is empty, both vehicle and part are in the same dock station% K3 _3 x3 s: h, h$ s& J
part := @.transpOrder;: {: M% |- `! Z2 b% @
part.move(@);-- load part* D' \0 X9 ^/ v+ a. M7 q
@.CurrIcon := "load";
" [& r5 J* N3 w) h, A0 v2 a GlobalDistObj := part.globDestination; ?6 U5 C8 h4 _2 G% Y
assignLObj := rgmanager.rgAssignL;
* t# |0 v4 K) e# i row := assignLObj.getRowNo(GlobalDistObj); v& D, @7 ?" ~ b3 I
if Row = -1 then -- since 70( _- j N: @/ S5 ^ O* w, K
if lan=1 then
" g6 P M) V7 ^7 |3 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ z" S, c7 y5 u6 P9 `
to_str("in der Andockstation: \"",?.~.name,"\""));
) g& F& v2 `0 A' d else# V( X+ C! ^, g) o8 O* I: c' q1 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) @ D2 v# ]; ~! }; N) ?; o0 t to_str("in docking station: \"",?.~.name,"\"")); ; s' y' I5 j9 s. `$ ?5 K9 q. x$ M' x" v
end;
\- H# e( |( N+ h; Q# M else' V$ |) L' k! G. a4 h7 ?
@.Destination := assignLObj[1,row];
" u1 V3 Z* W# M: N0 `/ m7 N+ S end; ~" d0 G7 x% j6 j
newDirection(@);
5 c1 j7 i6 O, R" e: z& B2 g @.HasOrder := true;
7 x/ r/ S3 U' _ end;. @: ~7 [: i$ n6 Z3 R6 O d# T+ E
end;
4 u3 b3 w( i8 B; ] c& hend; -- of the method
+ x: U$ w% ~0 h z4 Y' s0 H0 w! C |