/* called by: entrance ctrl of the object 'track'
' R$ @2 i) k! [9 n*/
) e: j, j7 {. K' x0 P3 y7 R7 `) ris( f( n! L4 E$ Q1 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& p$ A2 n8 B/ h2 M, n9 \4 I
do
+ S3 w+ @+ ^2 k! b Lan := rootfolder.Internal.Tools.AOLlanguage;
3 R* p' W6 }9 n/ K0 M% H' w if current = @.Destination -- else return
; Q, E2 n& i' b# f7 Q7 n then9 M- V" N- @ E. m a/ K
@.Destination := void;+ k$ `7 t" o) s- U6 n; L* D8 q' l
if @.occupied then
0 _& l# |0 F2 _- Q1 J# F- r3 O7 \ part := @.cont;
0 S8 u3 v$ S" f6 m/ F% Q @.transpOrder := void;- X4 u9 g6 |4 ?' U5 _+ w3 _' g4 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- X% f2 [! ?* e2 M- `: k7 ]8 Z# o$ K @,root.eventcontroller.simTime);
( f% R! D3 _8 h$ x @.HasOrder := false;
) O. s6 ?. d# ~' @5 G @.DrivingHome := true;
: q3 n) U5 K& |! k# h0 M, H rgManager.tryToStartTransOrder;
3 G& j7 k. E1 t7 M5 T1 { if @.Destination = void
4 {- @% ~/ [5 K then -- no transport order for vehicle @" o! ~: ~# k$ }
@.Destination :=2 Z1 Q5 r1 z- w. e7 S
rgManager.nearestFreeStation(@,track.~);& x; j& G D3 u4 H; I& m( m; u3 [7 @. }( K
newDirection(@); , C# Y' h+ N/ A7 J
if @.Destination /= void then
/ m: D& H" [ n) v. c7 y0 A @.Destination.NumReservation :=
+ R- ~6 O) u+ u9 A/ f) A @.Destination.NumReservation + 1;; G0 I+ _# j7 |/ x! b* B4 H5 Y8 s
end;( z+ g- L( ?0 Y7 I
@.CurrIcon := "drivingHome";$ N5 Y0 P H: @0 |& }' E! A
@.DrivingHome := true;
" T, r% v/ l3 k: U2 J6 f end;
5 r0 h0 v8 g4 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station. i/ H9 R2 ]; C) e8 V
part := @.transpOrder;* W7 ~, J* A! U' `! s; c" k
part.move(@);-- load part. [. g t% X# a8 [2 |/ L, U
@.CurrIcon := "load";, i9 Y) K# l/ \8 [
GlobalDistObj := part.globDestination;0 t' v$ D6 H5 W- M! i2 q0 s* i# p
assignLObj := rgmanager.rgAssignL;/ K2 n8 T9 x+ F, `" z7 I
row := assignLObj.getRowNo(GlobalDistObj);
2 G4 j. }. e% l4 ^ if Row = -1 then -- since 70: |* ~+ l- w3 K: y
if lan=1 then
" @( z+ i, V; {- Y. v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 P# M$ j' _- u/ R/ _ to_str("in der Andockstation: \"",?.~.name,"\""));
$ N0 k* w4 ]& B. ]6 t* s else
; ~3 z* |% b+ E) C) I9 U8 `+ A3 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 p! J" F9 B$ |4 h8 G1 _, r6 N/ U to_str("in docking station: \"",?.~.name,"\""));
/ _6 Z+ R$ i5 j( t1 a$ j# B end;
/ Q3 b+ I1 N; t# d5 T4 L; I+ | else: Z4 u s4 p: R6 P( i$ Q1 b
@.Destination := assignLObj[1,row];7 F; `* V% F8 y( l
end;
* O+ I: s" E/ e; L newDirection(@);
: h" @. J2 V( X' Q1 {' I) } @.HasOrder := true;* ~ S3 o; w. b+ e5 F- e
end;
; a0 a! T. o" s9 ~ end;
8 N4 D, |% s0 g) L) C/ Dend; -- of the method
e# D+ [/ e& y t3 t* k9 c! y |