/* called by: entrance ctrl of the object 'track'
4 Z3 x/ {* c9 s& W$ V5 U% \*/
% S; `* o. `5 j' K6 {* C' mis3 C/ ^4 i6 s. ~ g- I% _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% E7 d4 J& t+ h( g- o/ {) f; t* Ldo
/ U1 Y; d# P4 X: m4 `. X9 g, ] Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }8 ~3 X7 I* F; ~ if current = @.Destination -- else return
, D; T$ E j" ?7 B then% y( M( E! q8 r0 P* E' c8 O
@.Destination := void;
2 n( H) H- y: Y. g# } if @.occupied then% V. a3 U7 q4 O
part := @.cont;
0 g% z" |8 k, N+ ]0 j7 K1 T @.transpOrder := void;$ g8 e! T- k. D$ Z) v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ C- j5 k0 o# O" C: t
@,root.eventcontroller.simTime);; C p) x! v3 [) C
@.HasOrder := false;4 u- P9 n& p& ]8 }; J- i4 G6 m6 Q
@.DrivingHome := true;
# m$ j7 v A% e& \5 U$ N, g( L rgManager.tryToStartTransOrder;
5 c+ ?/ a& i( t5 j! s if @.Destination = void. M! U" \+ @) h& S
then -- no transport order for vehicle @* c7 q3 M/ `5 P/ w: f0 x/ |
@.Destination :=6 w) Q0 f4 b) z1 I% ^! E4 V
rgManager.nearestFreeStation(@,track.~);6 u/ S$ A2 k" A4 h: W
newDirection(@); 8 }0 q% J2 d1 j7 H" \
if @.Destination /= void then, O( @/ c8 m# B/ [
@.Destination.NumReservation :=9 q( ?. o$ m" W7 b3 u# z
@.Destination.NumReservation + 1;1 T* b8 Y: w& F9 D( U
end;
! {0 R3 I3 \) z+ Y& ~ @.CurrIcon := "drivingHome";
0 W0 K5 m% ]* F& `$ I3 {+ ] @.DrivingHome := true;, ?2 X) h }3 O& ~( D9 W0 _
end;! ~0 S' }/ |+ j j1 ]3 W7 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 [! h. ~" i2 O* l) X- k4 a5 y: D! s/ c
part := @.transpOrder;
" O) V, y2 \# Y) o8 p part.move(@);-- load part9 c: P1 |& |; _6 H
@.CurrIcon := "load";5 i# A) D5 Q3 O$ i
GlobalDistObj := part.globDestination;
: |* f4 h9 I2 f5 n/ h( F! @ assignLObj := rgmanager.rgAssignL;+ h n+ ~7 T( Q+ `( S( K: e) n
row := assignLObj.getRowNo(GlobalDistObj);) U# ]: _) S1 N5 Q; M
if Row = -1 then -- since 70$ W, e% [; d S& S
if lan=1 then- f. m7 h" ~- \8 D7 R0 u& t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
u. A7 O4 M. i1 ]; I to_str("in der Andockstation: \"",?.~.name,"\""));+ X' `( d4 h/ J% q5 ~( g* ~' {
else
1 _0 j/ s6 }! ~0 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 a9 G0 e, W" `7 {! {, F' x& K
to_str("in docking station: \"",?.~.name,"\"")); $ N: F$ ]. e/ }4 B
end;# U7 H2 v% a8 w/ p" m
else6 U7 ?; b2 Y$ g- f
@.Destination := assignLObj[1,row];
2 D; v: H0 g: M4 {+ r5 B9 E$ E end;
; A: n" v$ i7 h* i8 d newDirection(@);5 D& s7 D% }/ S M& }! C, W/ v' Z
@.HasOrder := true;
7 r8 S) h U( E) T% r6 x( }$ C end;
$ `6 w- y2 c0 ]5 @0 x- y end;$ n @9 N* X) j' Y) \1 o& V& B% X
end; -- of the method
5 Y$ B/ f2 E+ L" V, ~ |