/* called by: entrance ctrl of the object 'track'
; _! ^6 U1 J* p. W5 ~2 x4 l*/1 p L9 ]2 ?# ~0 ~
is8 ]0 [$ l0 |/ u! o& \- ]4 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* E/ ^& d6 H$ ?% w' f* {6 S! l5 g
do/ S% X8 m$ O u* u
Lan := rootfolder.Internal.Tools.AOLlanguage;3 T2 C4 E4 p8 {' o3 C
if current = @.Destination -- else return
; n: X% |2 T" k) r1 p, v, ]$ ` then
4 g+ z9 @, q5 K$ ?) f% ? @.Destination := void;
- E7 i G9 x+ c' y ?: ]4 C if @.occupied then
7 c, T, @5 Y0 O- w- I( N part := @.cont;
! Z1 z% S) W3 l u, K @.transpOrder := void;
, T. u- g) l( R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 H( B6 w# e1 C* e2 S: i @,root.eventcontroller.simTime);/ ?% r: T9 E$ ]; r/ E
@.HasOrder := false;& ~$ ]) q- A4 k
@.DrivingHome := true;
" @3 X3 w1 u/ G/ X6 n rgManager.tryToStartTransOrder;/ p4 F5 l4 n% x
if @.Destination = void
3 O0 X9 i5 T9 C6 F. i2 J1 W5 B, a then -- no transport order for vehicle @8 G6 R7 Q9 ?3 T' a
@.Destination :=
5 g& }, \7 P) U% A' Z% c rgManager.nearestFreeStation(@,track.~);
3 ?; W' ~& ]2 I1 q9 s Z newDirection(@);
/ H5 X( t! `! Z3 ?1 H( c9 e if @.Destination /= void then
( j' b! C0 k; y) d: x2 B @.Destination.NumReservation :=
6 ]. q( @: M% T% Y1 V& E) I @.Destination.NumReservation + 1;
2 ]* o2 z* O& c* Z. ~! E end;- O4 s% E' [, n
@.CurrIcon := "drivingHome";
! g) e8 f, G: J& R3 J @.DrivingHome := true;
3 g% H: p/ T8 Q9 p) } end;& O3 ?- S7 _' K- c9 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 _) Q# c' u0 `' f part := @.transpOrder;
7 O: \7 [6 b$ }: E, T! p, A+ W, Q part.move(@);-- load part( Y, C1 d: b r' |* {2 i
@.CurrIcon := "load";
- `/ c* I" X- O$ K7 Y) N GlobalDistObj := part.globDestination;
( d4 X9 T/ V* v" q1 _6 l1 g assignLObj := rgmanager.rgAssignL;
( e" ^. a1 O' }1 h( b1 { Q6 s row := assignLObj.getRowNo(GlobalDistObj);) H \: j2 o3 m/ a/ M, ~3 z
if Row = -1 then -- since 70/ F( f# F7 c+ r M
if lan=1 then2 _% o$ O- E+ \, y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ H* _; S, Z4 b( J, E$ F to_str("in der Andockstation: \"",?.~.name,"\""));1 N% I* R6 s' a& ]
else D# i: F5 ~* K/ e" t" r) m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 X# T4 y& V# { N" I# ]- M& S0 d& o to_str("in docking station: \"",?.~.name,"\""));
9 P: E+ b; C9 _- u: | end;! ~3 T) U0 E3 M. J6 ]( t
else3 j# @* ~6 y8 }, s& b5 d, k% \6 y
@.Destination := assignLObj[1,row];
: O- b; A% v5 ?* U end; 1 M# Q7 j+ U8 b* j7 z9 n: e, \
newDirection(@);
& p* U, N1 q$ z; j/ t @.HasOrder := true;
! H- B l; i: D) Q4 s end;
0 Y' i& U3 k$ L4 P6 x) c3 Y2 e- K end;- q0 n( t! v# \$ m. t1 D+ f' p
end; -- of the method
2 V3 C- w2 [2 }! z. q |