/* called by: entrance ctrl of the object 'track'
1 E5 f: }* h v*/1 r4 ], r# g& {. F7 S
is
4 z. U3 E! q; N. A+ O part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 D; v5 c0 a4 ]" j/ b
do
8 J1 Q, g+ @# i& `) K Lan := rootfolder.Internal.Tools.AOLlanguage;' p4 r& p* h4 L9 q
if current = @.Destination -- else return
8 l% F6 H6 [7 S2 `% R% ~2 M6 K6 `# p then
, B) {/ w# Z8 f @.Destination := void;; X+ y6 D) W7 ~8 C+ W$ h: Y
if @.occupied then
" Z% O% O O) L) Y part := @.cont;
$ S1 C" Y f' e: o! R- ~! e @.transpOrder := void;6 W# L. X9 n# q& a. J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% O) s4 o6 d+ r9 T
@,root.eventcontroller.simTime);
u- j' W, F" I7 k$ K @.HasOrder := false;4 E5 Q! L( `7 A. x6 C( o5 V
@.DrivingHome := true;$ [& k# M0 S; W+ x0 y
rgManager.tryToStartTransOrder;- A) O& o, j' j. r2 t1 U7 z
if @.Destination = void# `7 c1 A( s, M" D' V9 M! _
then -- no transport order for vehicle @ C% L" r. u, `; {" y
@.Destination :=. K) k3 ?4 b9 @7 U* I0 f ]+ {: R
rgManager.nearestFreeStation(@,track.~);$ v* f: S a0 ~7 }- [- A) V3 a, a
newDirection(@);
3 `. E! R2 ]! ]; S# ^' j+ ? if @.Destination /= void then
. _9 ^2 |# i/ f, y3 I @.Destination.NumReservation :=( _. m! H) S$ u$ a* H& q
@.Destination.NumReservation + 1;
! w' j( O( q% a4 E: O# t6 D; ] end;- v# x! ?- z, f
@.CurrIcon := "drivingHome";
' H' J' ^% }' _9 ^: e @.DrivingHome := true;
5 y% C7 ~& P w' f6 K* D end;
$ u* j7 b4 ~, I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 A1 F4 j* [: R3 x part := @.transpOrder;
; {* i$ Z2 O, e$ i( s part.move(@);-- load part" I' E" ?8 t3 T3 }0 w, o6 I! p0 X& K% l
@.CurrIcon := "load";2 ]" i% H$ P1 Y$ F2 Y9 b' l
GlobalDistObj := part.globDestination;
' _. g* [( f" Z# Q6 j, h* d" ? assignLObj := rgmanager.rgAssignL;
* N' g* ^$ i' X1 u6 s) F row := assignLObj.getRowNo(GlobalDistObj);! G- l3 C" v9 v2 m7 `6 }
if Row = -1 then -- since 70
5 _ [/ B4 t0 q4 J! g; R if lan=1 then
, x" P+ y5 D1 s. |9 m4 c- l' U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ ^! D) \# k% ^ to_str("in der Andockstation: \"",?.~.name,"\""));
, k' i5 w6 J2 R3 _/ R* H8 U4 ]6 I- _2 q else: C! p. V8 n! R( X& a! d, D+ A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 P# a3 q( A+ g( a: p! a5 b to_str("in docking station: \"",?.~.name,"\""));
' t1 I5 p7 u! ^' y. o; e7 K end;
$ w8 m" n3 o$ l2 T1 |' e& @ else
/ Y; q3 A! X* U; ]" L( a2 m! N @.Destination := assignLObj[1,row];
4 }3 e$ d. Z9 f. ^0 ?* R; J+ ]4 x7 O end; 5 K3 _' i) ^" t/ u, D
newDirection(@);
* L3 }7 p% W5 X @.HasOrder := true;
1 i) J! b5 {: K- L' c- v3 a6 i end;+ z6 p' I1 q5 |) ]
end;
& U6 w3 m. A2 N5 D0 \9 N4 Cend; -- of the method$ l g$ }3 h9 A; x
|