/* called by: entrance ctrl of the object 'track'
$ g \! @- e7 U3 s7 {8 v! e*/
' R2 v" J3 s0 X/ Q# Y8 cis
9 N# B( D% [9 @6 X- R: t# T3 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" N1 u. Q, f* D) E4 [& y( h8 ]do, `( ~4 t# l' ^* y
Lan := rootfolder.Internal.Tools.AOLlanguage;& T1 ^! l1 A1 ]' j5 |
if current = @.Destination -- else return
- b5 N7 ^$ T; B4 T/ M then
# u& ~7 q y [) y ^% d/ \$ X' |2 ? @.Destination := void;( B+ O% _5 M2 f6 N1 T6 v! ?0 D
if @.occupied then" R- O2 |1 d0 }) ~: g5 l
part := @.cont;
W p! X& P6 ~8 X4 A @.transpOrder := void;
* y) u1 F: `: C" J7 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. R" A( c% J4 K3 }2 a
@,root.eventcontroller.simTime);
! K& z2 b0 ?0 F* |( ?/ t# P9 M @.HasOrder := false;
9 |! Y9 r. P0 o+ f* x7 o @.DrivingHome := true;
' B6 l7 x0 l! j. T7 e2 g) J2 f2 o5 z rgManager.tryToStartTransOrder;
9 S( Z c+ Z1 S. f, t$ E. v9 E if @.Destination = void
" E) Z" ~8 s* r5 p- S B then -- no transport order for vehicle @
1 g$ c% u2 D! L' ]9 N; x @.Destination :=
+ M; e0 `1 i, h( ]) R rgManager.nearestFreeStation(@,track.~);9 u' n3 N: w: h0 }+ t
newDirection(@);
. b; O% a$ P' r% S) ?; j% t if @.Destination /= void then
! o1 D) y% i: z$ u @.Destination.NumReservation :=
) j: |6 i4 T8 I @.Destination.NumReservation + 1;" d, e) ?) A+ A! K, i; q
end;
# k+ N& a! ^6 V# q' s, v4 N. K @.CurrIcon := "drivingHome";# Z' w! ?8 P8 p, ?& s' Y% f( r
@.DrivingHome := true;
, M4 {* i* ^4 g7 h end;6 r9 z1 ]# N, a8 Y" f7 D; O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ _9 |: K. @) u& K part := @.transpOrder;. r# c4 y& f; q8 U
part.move(@);-- load part! i. \- t* N* G- X5 I5 U8 E
@.CurrIcon := "load";
2 l# ]' k* _+ h* {3 M+ A! t GlobalDistObj := part.globDestination;
2 J* y3 ^5 X7 r; B5 @0 C assignLObj := rgmanager.rgAssignL;/ A) q- X# F6 o( }! i }, s' M+ a' [
row := assignLObj.getRowNo(GlobalDistObj);8 B. y4 g) D9 o! M! c- `
if Row = -1 then -- since 704 y1 x" x3 \, J* d# ^3 y
if lan=1 then }: ]' W& x, ~! w b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 w3 Y8 i' F) x. W( g; j' ^
to_str("in der Andockstation: \"",?.~.name,"\""));0 j( b5 e1 N0 z8 A% c1 l# D- {
else. } Z3 D$ f7 m# W4 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% u& Q4 J5 T# t ] K to_str("in docking station: \"",?.~.name,"\""));
8 P5 L7 W( Z* s$ z8 S/ [ end;" f; D: l! E' c
else- z+ t/ f! c X# W- S0 T/ E
@.Destination := assignLObj[1,row];% c9 E* H1 U) j- {) J0 x1 s/ |
end;
3 \# o3 P7 H8 q$ s# H newDirection(@);
) D" m' n5 J& \3 H @.HasOrder := true;
. `7 H6 H. O( i* L a8 h end;
: K* D/ }$ w* s' I5 _8 w end;# s& i8 g8 U- U1 N+ [! n
end; -- of the method. }; l# q- Y7 \0 f. w/ r& o
|