/* called by: entrance ctrl of the object 'track'
4 y; v5 n& F, Z*/
9 d e. u# q7 e2 y7 r% ^% p4 ]is
0 S) h3 j! s+ r4 l. s' F7 b D) c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ Y2 Q. ~3 Z" N: q# qdo
4 a7 M* r& P6 D: Y Lan := rootfolder.Internal.Tools.AOLlanguage;
' M/ L, T8 l' g if current = @.Destination -- else return
3 l, t' l. i# k' Q& H then
0 J7 V, S- r6 t. w7 O @.Destination := void;
4 _) m9 j s. ] F5 @ if @.occupied then
i% A& ~$ D8 } part := @.cont;+ Y Q& d) J W) q( J" X& |
@.transpOrder := void;+ I8 |9 i2 e/ L7 A0 r: l, p5 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- f9 |* n& a. T' W/ s. E/ K @,root.eventcontroller.simTime);% h* I- N$ Z0 y0 @, t! f
@.HasOrder := false;
$ z! q: G. D% _6 T$ a @.DrivingHome := true;
I% M# k9 t4 a: x rgManager.tryToStartTransOrder;
C1 I @# `. [$ C1 c* @4 K; G if @.Destination = void0 w* C1 o. w I0 V+ t& i( z- `1 X0 k
then -- no transport order for vehicle @
; I- v3 w* Z+ t' L* Q% V) f @.Destination :=
/ f9 F0 Q) L3 @( C- y% N. ] rgManager.nearestFreeStation(@,track.~);, `1 s* e% q8 x0 |
newDirection(@); / R- B* g' s; D6 n
if @.Destination /= void then
4 @% I& j- c% F' V; ~; K! y$ \/ S* e @.Destination.NumReservation := P, ^/ y6 m8 {* C4 x* N* l
@.Destination.NumReservation + 1;; m7 l" o. y& A+ O0 A
end;
7 k* F5 [! ~6 l1 Z% c( a @.CurrIcon := "drivingHome";
/ O& j( Q, Q; g' |4 m# k @.DrivingHome := true;% h. z0 @# `$ ^2 T# O1 ^7 J
end;
$ e3 K8 ~9 M m% K2 h8 A0 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 F# s, E- m! o1 a part := @.transpOrder;" |2 T! r! r; ^$ t1 Z
part.move(@);-- load part9 j7 z' n8 F9 D7 r
@.CurrIcon := "load";
. T) y# I$ v( T/ g5 x. V GlobalDistObj := part.globDestination;
W! s, G: m' |8 z5 _* A assignLObj := rgmanager.rgAssignL;
1 G4 B1 Z9 j P+ V row := assignLObj.getRowNo(GlobalDistObj);
! u1 {) D T5 G, x/ Y& P( J if Row = -1 then -- since 701 q. D0 l' G) v: o) U0 y8 Z" B
if lan=1 then
* [1 S! E: l. Q/ l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 _3 s2 V {' r
to_str("in der Andockstation: \"",?.~.name,"\""));
+ n3 ~# ?% c8 W. `! P9 V/ ` else6 Z* r2 ~% m6 z' P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 K' L5 c; e- h+ ~- a3 e# A to_str("in docking station: \"",?.~.name,"\"")); 9 y' d$ A v( R: | G
end;
" D# l$ W: \& R! [% X else0 f' @. X: ?# t$ E
@.Destination := assignLObj[1,row];
D$ D2 Y* k2 u end; - M1 \ s. {- B6 n% k6 G
newDirection(@);
8 A: B. v, [3 S0 { @.HasOrder := true;
7 I# I7 b9 ^: z1 O2 X/ { end;/ N: @* \9 |& r0 I& @: T
end;
4 m5 ^3 g/ D0 f! Z3 n' R6 H( _" Mend; -- of the method; M( N; F; \5 n. t% J- |6 t3 |. J
|