/* called by: entrance ctrl of the object 'track': d4 y% x+ t( ]2 s) [" y
*/0 e: N" `7 h6 A8 T
is
" ?) u( ^4 F! i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& q J7 J1 x9 I: {, zdo
1 U% m7 X) o7 `+ O% z Lan := rootfolder.Internal.Tools.AOLlanguage;5 F2 f p, }- |$ m, x( T7 Q
if current = @.Destination -- else return
" x$ `4 w K; ?6 ^* J, D# d then! U; Q% R* F! d5 ]
@.Destination := void;8 [ O& M, n# M2 g0 B: @: K
if @.occupied then: x! b* I7 y1 s1 @; g
part := @.cont;1 m9 k7 P2 e* x' [
@.transpOrder := void;& e' o D! Y! L# l4 Q/ J6 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 P6 i% O8 }2 w% s# f @,root.eventcontroller.simTime);
! ^9 c& {& F6 d9 s( j5 j' H6 a9 X( B @.HasOrder := false;
8 y, g2 z; G: z3 e# Z+ J5 S @.DrivingHome := true;
: q: b% m+ z1 D( z1 a rgManager.tryToStartTransOrder;
& e4 ^, _. J9 J! S if @.Destination = void: F" I% r, j6 F7 h9 e& e' z! [
then -- no transport order for vehicle @
8 x; p. g: `% R @.Destination :=' f" K& t& y$ r C
rgManager.nearestFreeStation(@,track.~);+ z. i) z: g, K( d
newDirection(@);
! ~7 Q; m/ ~4 x+ z3 x if @.Destination /= void then
: N6 J' Y/ M9 m9 t- a @.Destination.NumReservation :=
9 k0 \$ | P# t! }6 y8 v. ^3 ~ @.Destination.NumReservation + 1;* `( R3 V% ?3 w
end;: p1 N' n/ o6 d6 c4 E
@.CurrIcon := "drivingHome";) c( T& J, q, I2 p. T6 r! W
@.DrivingHome := true;
. A) U% V" O. i# m end;
7 w% m1 G. v, I4 O2 ^0 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 \# D8 W2 r: y3 U- U$ n b part := @.transpOrder;( q6 }2 S/ c, T
part.move(@);-- load part
# ^- J O$ o# r9 _$ `9 _9 e# e1 J @.CurrIcon := "load";
8 a3 o1 S& a# g GlobalDistObj := part.globDestination;
" F7 T" l1 Q8 y N7 P assignLObj := rgmanager.rgAssignL;6 X9 L' ?5 i& f
row := assignLObj.getRowNo(GlobalDistObj);
% C/ i" c& h' v; P8 Z% W& h2 J if Row = -1 then -- since 70! Z0 v& {! c7 p
if lan=1 then, h+ Y" a6 w9 I. ~$ O4 u% _ K5 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 Z4 c9 {3 C4 W; z5 N to_str("in der Andockstation: \"",?.~.name,"\""));
, p3 s) a! K' s8 w else4 T! f9 ]8 x9 ^" U( [: \/ @8 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 T f; V/ t. B, |
to_str("in docking station: \"",?.~.name,"\""));
7 J3 {9 V; M2 \: x end;2 h9 w$ i& d) O: |( ?
else5 k+ j1 E) Q; Q6 a$ {3 y
@.Destination := assignLObj[1,row];$ \3 k4 ^3 K/ \; z3 h, [
end; 8 o. J3 P" x: L4 x1 ?2 K- M! |3 d
newDirection(@);
$ e. s. j. V+ G1 F- s, d% u+ a9 c( { @.HasOrder := true;
7 Q5 X" c4 f: x& C; J" q9 }' N" Y% E end;
; x! V8 ~$ D4 n7 d% D& P end;
( z+ }. V+ B6 e1 Z' U4 ~end; -- of the method
7 c% S; {& i H+ ] |