/* called by: entrance ctrl of the object 'track'
( ^" Z. r9 Z D- z*/
. T# }* u$ W, I2 P" i* Lis
; A2 o, d7 E. R. k* z part, GlobalDistObj, assignLObj:object;row,Lan:integer;. C- f* q! ~8 N5 A$ Z' ?! ~
do8 {; m+ N5 @# c2 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
D* C5 {8 W7 V& `4 h if current = @.Destination -- else return
* ^' ]% O: [* ? then
% V2 w: L' | ]! r' h @.Destination := void;# w/ I( R! [( a: D q0 T
if @.occupied then
7 I4 A0 k$ H0 y3 R6 W$ D+ I% J9 N1 d n part := @.cont;& J) O5 c* f0 F2 Q$ J- W" q
@.transpOrder := void;
( G9 Y7 k/ C# s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* u; V# ?1 `7 w! M6 G- y: Q
@,root.eventcontroller.simTime);: w1 R7 b" P) D W$ l' p
@.HasOrder := false;* P" H+ l& z& V' a* y' h6 R
@.DrivingHome := true;
* p9 D: n- ~$ y* M/ v4 e9 _ rgManager.tryToStartTransOrder;
7 W' _9 g) D4 ]- p if @.Destination = void
; w5 m5 _; R5 M+ v then -- no transport order for vehicle @9 @4 a% m+ a! q* O* O% }
@.Destination :=
* E' I( U: f: h# }) ^+ m$ T# ] rgManager.nearestFreeStation(@,track.~);4 H7 J# l; t4 l
newDirection(@);
6 L! W2 o4 ~* a! H+ y/ F if @.Destination /= void then' I" d8 G: I. M, Y& D
@.Destination.NumReservation :=
6 E: z6 d$ o8 V& B8 k @.Destination.NumReservation + 1;
% F+ }5 O6 u/ a( X6 g end;
# P0 k5 ]: R2 j" A% N% ` @.CurrIcon := "drivingHome";3 D J2 m: j8 p* M" O
@.DrivingHome := true;
, M+ V: Z. e: I- i N) }: o6 i end;# u( e, m4 S4 {- g9 R- G- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ]- [8 _! {3 v* A part := @.transpOrder;- D" l' A( o9 [' F$ w3 I1 E2 t
part.move(@);-- load part
+ U' H9 m+ R8 |5 w9 e @.CurrIcon := "load";
1 w0 D! b1 j$ o3 o1 L4 d! [; w/ \6 @ GlobalDistObj := part.globDestination;
" }- I% E6 e# f5 b assignLObj := rgmanager.rgAssignL;( ]( i2 ~9 v* C9 a& Q( w9 ?) |, L
row := assignLObj.getRowNo(GlobalDistObj);" J! Q- [ Y9 j# ~
if Row = -1 then -- since 70
3 E7 d# a4 w, E* a if lan=1 then o2 x0 d% q* m7 ?* W6 L2 I6 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 V6 [. Q3 Z+ z ], P& j8 t to_str("in der Andockstation: \"",?.~.name,"\""));5 @8 n" t( r# F8 b* t
else9 Q# d( q: M' d$ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 A2 z2 e, ]; S' \0 S I
to_str("in docking station: \"",?.~.name,"\"")); : X1 W& W# \2 Y
end;
3 J$ O* B/ L. R {0 y! N" S else
8 m4 K+ y5 ~1 P8 H5 Y0 m6 Y @.Destination := assignLObj[1,row];
, H5 I$ N+ |, K0 z end;
; l Q1 U; ? k/ f newDirection(@);& Y2 W" |0 ^" V( n6 F: I; P
@.HasOrder := true;* f4 B9 y" i k/ b
end;
6 o7 y) H6 |! b9 I; V# [ end;) b/ _' ]: c7 V5 v7 `
end; -- of the method! M L& C" v, X) c8 E: ^$ I' M
|