/* called by: entrance ctrl of the object 'track'
& V2 Y: z2 I) X2 H# u) Y, ~; q*/# E( q2 Y- g4 N9 _8 O
is& p" I* x' h9 ?& }& y0 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 E' ]4 \ ?" u* y+ y4 d$ Odo
+ _- r1 n H; k; ? Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ^6 i7 T8 s/ t0 \& q+ G0 | if current = @.Destination -- else return" g5 c8 X9 M S0 R; A
then
4 |9 y( x( T9 V; U2 J @.Destination := void;
# S4 j4 j6 G; S if @.occupied then4 h, y: G8 ?1 A
part := @.cont;
% `7 v& T8 r6 K% Q$ f1 z4 I' M @.transpOrder := void;2 }2 }1 ?3 Q! e( a; `: V3 p$ U+ ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 D$ I4 I6 ^! w- M! g @,root.eventcontroller.simTime);
% t; p2 @' N0 @6 l7 V% D+ g @.HasOrder := false;
7 t( j6 k( ]; \- k @.DrivingHome := true;5 w6 {7 }( ~1 [% S6 {1 d/ H
rgManager.tryToStartTransOrder;; H4 y0 b# g4 l! x3 b }7 O; _- Y3 S
if @.Destination = void
! ^, Z+ T$ Q, ?; E6 Y) r then -- no transport order for vehicle @. }; |7 }; }! V0 H
@.Destination :=7 j* L! g' i" A/ D3 z" d4 N' j
rgManager.nearestFreeStation(@,track.~);
0 f4 [ @* d5 ]: m- r newDirection(@);
$ H% r# q6 K9 E& i4 l if @.Destination /= void then' b4 f% b. @% n+ ~
@.Destination.NumReservation :=. A( D; @4 g; x( b
@.Destination.NumReservation + 1;
8 S, b0 P+ E# h! E- [/ A end;
4 R _# v4 z, p8 j3 J" U0 L @.CurrIcon := "drivingHome";- s8 O2 v8 s8 D4 p: Z) e* j
@.DrivingHome := true;
! g$ W" I, j4 S+ d/ K, Z/ v end;; W4 q: y* u, R6 H1 W& a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; t& a" n8 U) r/ J8 h) a
part := @.transpOrder;9 v' _3 ?* `' K$ k. v2 O* J$ R1 g
part.move(@);-- load part$ U+ U* H' h; U$ }8 `
@.CurrIcon := "load";2 [# D5 E# I! z$ j# h
GlobalDistObj := part.globDestination;8 {' b" q$ {+ ^, y
assignLObj := rgmanager.rgAssignL;5 X5 k# ?. F2 F' f
row := assignLObj.getRowNo(GlobalDistObj);
3 _: d# a8 V. Z6 g$ n if Row = -1 then -- since 70
) Y3 g! e* U* O7 [2 }% y if lan=1 then
/ L; @4 p9 F: J- q$ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. K p( _; S! g `% [) v+ a! N
to_str("in der Andockstation: \"",?.~.name,"\""));9 x: t: l) k7 @7 @* ~- E
else
4 l8 H1 h( E; K! o6 E4 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, b3 }9 f6 W" j% R
to_str("in docking station: \"",?.~.name,"\""));
( _5 U- G; M t! e end;0 r: N+ Y3 }& B7 D! U( M) c
else
" I7 L0 P+ w. v! p$ ~+ u& a @.Destination := assignLObj[1,row];0 `; j9 n! K' S5 x9 ]
end; 7 S( q4 \+ Y' e4 @4 I
newDirection(@);& Z3 O8 z+ _/ @6 g
@.HasOrder := true;6 \* A8 c% @( n! `. \! F
end;
8 S, _ {# m" m7 {& U N7 |6 ~; ? end;# p7 c* E' j9 Q- W. N
end; -- of the method
1 J% R' u O0 ^ @! Z; A4 q |