/* called by: entrance ctrl of the object 'track'9 ]/ Q. x: `& d. V, `
*/
" H! N9 V3 ]7 M! F5 tis
4 {6 @& @- ]' k- b) D part, GlobalDistObj, assignLObj:object;row,Lan:integer;' \6 a, J3 b- Q, v; T' ?
do6 W: `0 Z- I! g# v* |8 x; ]
Lan := rootfolder.Internal.Tools.AOLlanguage;( k4 k3 X a; I, b/ M
if current = @.Destination -- else return
# B4 Y& z. a; m6 f3 y2 t$ O then
, Y0 a4 H0 G% F7 l) T5 P" q0 M @.Destination := void;# F- p, O3 g, J+ S
if @.occupied then
# j3 h5 O. s G7 p& e part := @.cont;, l$ N, x9 h* U; y
@.transpOrder := void;
$ c+ K& N' l. x) x& @5 z! Z$ }9 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 P" Q" t) W# y% i& } @,root.eventcontroller.simTime);; [% M5 }- N$ H! j
@.HasOrder := false;
8 @( h0 b, O" W( A @.DrivingHome := true;$ [0 z2 P0 e$ P/ O2 i
rgManager.tryToStartTransOrder;' r6 d# V0 R- Y7 E7 F
if @.Destination = void$ A. T' V% u; |( `0 g( @
then -- no transport order for vehicle @% W6 b6 K! }( Z* Y7 |. m- x
@.Destination :=
$ o% F' M5 F# l3 O rgManager.nearestFreeStation(@,track.~);0 x8 @5 j' H* i- v
newDirection(@);
$ w( I& q. A4 W1 }/ ~ _* { if @.Destination /= void then
$ l' [* J! F+ [$ F @.Destination.NumReservation :=$ k7 m4 {7 g* |6 f. d+ i
@.Destination.NumReservation + 1;
# k0 ] X. e: |$ q; J; C end;1 J6 f5 ~2 u4 ~
@.CurrIcon := "drivingHome";
u. D0 `) B+ c9 n' U5 I' T7 ?: O @.DrivingHome := true;
. d U8 k9 z" `: \+ R0 {0 _2 ` end;
- i: k& J8 i) n. W else -- the vehicle @ is empty, both vehicle and part are in the same dock station" `9 {/ o2 [, [9 v. F/ f
part := @.transpOrder;9 b) z& d! J6 o+ D, _; G
part.move(@);-- load part
6 y5 u* w' W+ [' p+ G* F# _5 n @.CurrIcon := "load";
$ J8 l) F/ _6 ]& ?, q) S0 ^ GlobalDistObj := part.globDestination;
. q) e/ S' @6 i7 c$ x2 ] assignLObj := rgmanager.rgAssignL;
3 v Z4 ^: X. x e4 q+ h/ z1 G2 _ row := assignLObj.getRowNo(GlobalDistObj);
. \0 e0 i6 ^% t- C4 C1 _9 {- n0 @ if Row = -1 then -- since 70
5 I6 ^+ g. I. i) a* G if lan=1 then" S5 g8 N! _6 L) c: f+ T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), h! G% N3 ?& j3 w. K, M
to_str("in der Andockstation: \"",?.~.name,"\""));6 B+ f& V6 D/ t& \6 W5 E2 w
else( G3 X8 H( f4 ~3 s, Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, m( v2 C4 E$ z+ L$ G2 K* w to_str("in docking station: \"",?.~.name,"\""));
& C/ r4 x8 p) l. l) c: d; g end;
+ G+ Z# a* y& X' X, ^0 Q! a) a' @ else' i B7 J q" z" j1 N. b9 I
@.Destination := assignLObj[1,row];
6 b: w5 ]# H# h0 J end; ! S0 X5 @. X8 ^: J
newDirection(@);
$ U7 h! {4 G- y) B! I+ I @.HasOrder := true;# q2 t3 X) T2 z- ~
end;* R% Z# Q8 q, z1 Q. v
end;5 z4 S7 H) i; X1 r2 \
end; -- of the method# _+ c! `9 K; z2 ^! e
|