/* called by: entrance ctrl of the object 'track'
" @8 O; `# U1 b*/( c5 y9 P2 \- `6 d: z
is
" }8 }7 R4 U' M: f2 [5 d% g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& \7 [7 p" [5 s1 G2 Ndo
5 M2 f" C! A# B9 C2 e" R0 H Lan := rootfolder.Internal.Tools.AOLlanguage;
) ^9 E6 u+ y0 L% S; S+ _ if current = @.Destination -- else return
- l% l. Q F: {/ L' ? L then. a- a/ Q% A2 ^7 E. O, G
@.Destination := void;9 D t! q u- ~7 @. m) `. k8 u
if @.occupied then
* V+ o( Q) L! m% t8 S* D part := @.cont;
+ i8 B( B3 _' a: a, R" p @.transpOrder := void;5 _9 b& r' B% ~ i# f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% ?5 v7 ^7 v% ` @,root.eventcontroller.simTime);( ^# U7 j" h# p
@.HasOrder := false;% P* c4 w* n2 R; w; @' t- c
@.DrivingHome := true;
, z7 c' C4 T* W1 E& j4 Q. v rgManager.tryToStartTransOrder;; j' q) J/ M8 }# E" q
if @.Destination = void5 \; f$ g; _, k
then -- no transport order for vehicle @
( V1 q( T+ u0 V @.Destination :=
2 a ]+ i- |" B* x rgManager.nearestFreeStation(@,track.~);7 Y$ x" @9 L0 C2 A9 {
newDirection(@);
1 ]3 w+ U$ _: q2 ~ if @.Destination /= void then9 Q7 x: g! N+ f3 U; n( f
@.Destination.NumReservation :=" }* \) p# |; I$ _' {0 F8 p0 i$ m
@.Destination.NumReservation + 1;
+ ]' z! \5 ]" h5 R end;
: ^6 p: G2 d2 Z7 ?# d3 \# z$ r8 ^ @.CurrIcon := "drivingHome";
' P: G2 h4 q/ I8 X% z6 ? @.DrivingHome := true;/ R0 r6 D; K+ V9 {" u$ v
end; k1 c5 [ e. w% }' a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- r/ i2 y0 k. X7 X& ]9 j part := @.transpOrder;. h8 v" S# N5 R- @9 R
part.move(@);-- load part
* x( n+ J I- {" S( ?" R @.CurrIcon := "load";
% \, L5 I0 l% \7 A7 B$ k GlobalDistObj := part.globDestination;
# P( Q% d9 ]/ y \5 A assignLObj := rgmanager.rgAssignL;& E% T& \( E$ G5 {
row := assignLObj.getRowNo(GlobalDistObj);* P8 p; G: x1 w- u
if Row = -1 then -- since 70
2 M: d6 e( c6 {' N) I9 d( E if lan=1 then4 x6 x [6 A8 A9 B! t5 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% c+ x' \: i5 ^3 J) R% I! ]) G0 {8 m
to_str("in der Andockstation: \"",?.~.name,"\""));
y" Q& o5 x8 }4 } else
0 U s( p9 v. }9 A3 s; J ^% U3 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
y6 | o! Y. L9 R to_str("in docking station: \"",?.~.name,"\"")); - o! M( k. y* a7 _: [) k
end;# N3 g; e0 M8 f- F* o2 [7 M5 c
else
- y& Z, C* X/ Y) z/ `. t L0 `/ W @.Destination := assignLObj[1,row];0 H9 g, p/ q# \ T3 m
end; 2 s. L- w/ z" z3 a1 n
newDirection(@);( v1 b) [8 d. z+ H
@.HasOrder := true;
) d7 M+ H/ N2 J0 T: x end;; X j, J, j0 w5 D" l$ ~
end;
# `0 R+ z. V% d3 H3 r2 n, Mend; -- of the method
" H- O5 `: A& c/ l7 a+ m2 P1 W- v6 | |