/* called by: entrance ctrl of the object 'track': I* S( o& x# H; X: O
*/# Y! Q. R2 o. _/ z# {6 T% q
is
( Y& b$ @' l% E6 _( } part, GlobalDistObj, assignLObj:object;row,Lan:integer;! j! H/ b# s& w9 n
do
( u/ j4 M8 F; j9 J. G) M Lan := rootfolder.Internal.Tools.AOLlanguage;5 H3 a( {9 X* Q
if current = @.Destination -- else return
9 g1 Y1 T9 [5 \# R then
8 }& M5 u- a9 @: l$ g. ]9 I$ v( A @.Destination := void;, z9 p4 I+ m* U$ O; Z
if @.occupied then
2 s( v* V' _) x& b part := @.cont;# H4 A1 l. k+ l$ e
@.transpOrder := void;
+ g: E. v( c2 v2 u2 z* R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 k8 y; P2 s K" D9 v& w
@,root.eventcontroller.simTime);4 \# Y4 L, S: T( q
@.HasOrder := false;+ o7 N. v3 Z# c/ L+ ^) Q
@.DrivingHome := true;
4 \- P. _5 D: ~ rgManager.tryToStartTransOrder;# M% Z9 j% h2 K% D# g
if @.Destination = void
3 _; l/ i- J! c! d then -- no transport order for vehicle @
# M& C* a. i$ Y1 q @.Destination :=
! H, M/ t/ V% J" y9 _9 e rgManager.nearestFreeStation(@,track.~);
/ I0 L2 X- G8 C$ E4 C# c( W; u5 n newDirection(@); 5 o1 I# F/ L) b" I, V1 q0 Y
if @.Destination /= void then
F1 S: \: W' I* {( s3 @ @.Destination.NumReservation :=6 X# A/ w8 z V7 E
@.Destination.NumReservation + 1;# ?3 Q" ?2 o6 }9 O7 P
end;+ q" ^- b9 F1 e! g( ]# y
@.CurrIcon := "drivingHome";1 a$ C( p: Z3 Z0 ]3 [& U! N
@.DrivingHome := true;
2 X& @! i, D: r# h% m: U8 h2 `% | end;; i% O( o, f( t1 V1 K* ], ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! b* z) n- j6 |% i ]) g- e( k. p
part := @.transpOrder;
2 ~$ F9 @- s& f- K% M2 B part.move(@);-- load part
) j. e! K5 R; e7 p5 D$ G @.CurrIcon := "load";, `- ~* t, ]! g; `" @
GlobalDistObj := part.globDestination;% {8 f* s# G+ {6 R5 z7 s; \! I
assignLObj := rgmanager.rgAssignL;
* u1 ?; q+ i- t# S- v- E row := assignLObj.getRowNo(GlobalDistObj);
4 _; y. Q7 M, Y8 Z if Row = -1 then -- since 70' U. D6 I ]; X4 t; a
if lan=1 then
) D4 P+ b- R7 s. W# p2 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 {! n, \" k, ^4 \& B
to_str("in der Andockstation: \"",?.~.name,"\""));: ]8 B& B* z# Q) l' h; [0 W/ K7 Q
else ]6 y0 J( h' A S& u. F$ t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% t2 n- R0 E; C to_str("in docking station: \"",?.~.name,"\""));
( `+ A% L/ x/ ]- k) j end;1 [9 F! |) Y5 P
else
5 `9 {0 O8 \4 r9 J- w' ` @.Destination := assignLObj[1,row];1 w7 D9 n5 K: a) |: Z3 I6 @
end; z& q& ^7 G9 n" y
newDirection(@);
. U9 t9 d. B8 D# D @.HasOrder := true;
3 Z [& R0 I0 T+ p4 |. @ end;/ @7 m2 F7 q2 I
end;2 N1 j0 f2 i& b3 O' |7 h; x$ ~1 L: l' X: m
end; -- of the method
, o) s5 _" w' r4 p2 ~! x9 o |