/* called by: entrance ctrl of the object 'track'
, |3 B Q* M' {+ ` A- g3 k*/
/ U `- I/ Y+ ?0 a3 a& ois
1 g! q$ N; ?* g$ Z9 @1 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;; m/ `% R/ O5 P X, H0 j2 x
do7 B. s8 q+ y4 n' d* B" k9 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
! N8 C# k% G# \! q8 i if current = @.Destination -- else return
/ `$ R' L6 M% R' g2 s then
& G5 E- C' i0 d) R! D6 v+ @ @.Destination := void;9 O$ R0 g @, K+ k
if @.occupied then2 S( ?4 ]5 b: V5 K7 g- E
part := @.cont;
2 M9 l+ h7 s# K/ t, k @.transpOrder := void;5 e/ v; q! C9 L4 }6 j! `) b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 j& N' H9 T7 q/ g7 K4 f% M @,root.eventcontroller.simTime);
4 C5 z2 \( [+ M) w0 J3 @ @.HasOrder := false;9 L Z; U# j1 `7 ?. G/ R
@.DrivingHome := true;
, l1 D$ {/ Q# `# G rgManager.tryToStartTransOrder;
1 V: \. f$ Q+ D _ if @.Destination = void+ O4 ?+ M4 T6 M
then -- no transport order for vehicle @ i) J) s( {* ?7 }
@.Destination :=% r* \2 ~5 x8 \
rgManager.nearestFreeStation(@,track.~);
7 ]; V0 T3 } g) v, I newDirection(@); % [. u% z; W' r$ n* I
if @.Destination /= void then
' I6 F- J; R4 a: C) h; B @.Destination.NumReservation :=
! L& z+ d; r# z: b# t* K @.Destination.NumReservation + 1;& s5 s9 c7 u0 u6 q3 b$ J
end;
: `& k/ M7 b& x% U4 | @.CurrIcon := "drivingHome";- X/ N. D! \6 R8 B
@.DrivingHome := true;
- C) R! N2 y% p! S end;, s6 Z8 `, Q# q* V$ p! b/ m' \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( Z$ F1 U% S! L4 V" j" |! P part := @.transpOrder;
; |9 I* }$ }2 n$ f part.move(@);-- load part" t7 H1 m+ I- |
@.CurrIcon := "load";
3 n# p& h1 g' p1 R! O' V- Q GlobalDistObj := part.globDestination;
( l; g1 I% m" D f. }5 A& T assignLObj := rgmanager.rgAssignL;
! ^9 k5 L, e7 b+ n1 ]! B: ~& z4 X E3 F5 @ row := assignLObj.getRowNo(GlobalDistObj);; [6 M, F7 I3 ~: v) E9 g7 ^5 g
if Row = -1 then -- since 70
# T5 f9 R' c1 x% k8 J4 z1 I if lan=1 then
; K( s% J/ o0 d: d4 s8 S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 }& l: Y, X1 {% q2 V/ o to_str("in der Andockstation: \"",?.~.name,"\""));* B2 _, K/ l. t, K
else# m0 b, X! F: W2 q7 L. V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, G" j6 p* ?6 C/ @
to_str("in docking station: \"",?.~.name,"\""));
% q$ V" O6 X- ]# z2 M. u, \, m$ Z, V end;2 ~% F# q R. Q3 ~" q0 R* _1 N
else
8 E, P( U' v, C6 v, |# f @.Destination := assignLObj[1,row];& b9 x. r, q5 q3 v$ L( i8 \: j7 X) j
end;
7 V3 J* Y- N$ j newDirection(@); Z$ Y% z; q; S4 G$ `
@.HasOrder := true;
. l% H6 }3 X7 L. G6 G* c end;
6 D% n: Q7 B- D: h end;/ e3 G: a5 o* }; s' F) C
end; -- of the method
, t- M( s, L* |0 W* u |