/* called by: entrance ctrl of the object 'track'( E) B+ d* p; D7 p. J" P! E9 ~
*/" P+ Y/ E, I7 G- A# m: u2 c
is
& v- D ]" F4 k; Q, T part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 v. c3 V- l7 s! b5 _! B
do7 C0 }$ }; w$ O; p+ Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 j+ {' q& n5 T if current = @.Destination -- else return- |5 z& A+ x& I
then' V7 ~8 K8 O! M
@.Destination := void;
. _: q: F0 l( z3 I& ?! l! h if @.occupied then
4 ?- n% G( C { part := @.cont;
+ K" h+ M2 X, \( l( K5 w* ^ x6 A @.transpOrder := void;0 W; e1 t, A5 [2 j: A# J% U* ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," x: O' D- r7 J6 u: ^6 d0 u7 _% ~
@,root.eventcontroller.simTime);4 V" m. `4 e2 ~7 b2 u: q- w
@.HasOrder := false;
U/ \( i8 R2 B: \2 k @.DrivingHome := true;
0 b: t. V& |# m) F8 q rgManager.tryToStartTransOrder;
2 R& [! h. W" |! ~. G, I+ B if @.Destination = void
5 K8 O3 P9 N. s& D- ] then -- no transport order for vehicle @
) c M$ V+ z! u. X6 B @.Destination :=
: r( P- F' I! y$ S( r rgManager.nearestFreeStation(@,track.~);
* \4 K' \6 w- n* C8 `2 S1 y newDirection(@);
0 l0 v4 D5 |' E if @.Destination /= void then
, u3 S3 a8 E0 K% n" t8 z @.Destination.NumReservation :=
8 x, y+ N# D& f" R# t5 s @.Destination.NumReservation + 1;
% \/ Q9 y3 N7 O0 A4 n' H0 b4 { end;: F7 m: e6 y7 Z5 }1 q. q v
@.CurrIcon := "drivingHome";
0 L/ v, p* O. K+ z0 B9 X4 g, u @.DrivingHome := true;
, w& G* `1 W: K( _- h) ^2 u end;
/ X) v' r3 ~) b5 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @, |0 l r; ~1 g+ s, r part := @.transpOrder;' Q: D" F" t: [& R# s! V9 f) h, c- {
part.move(@);-- load part
- F5 g- h: C2 g2 G/ w- w @.CurrIcon := "load";
8 h: p% }6 D2 Y% X GlobalDistObj := part.globDestination;9 w! @0 z; o' `( E+ }8 O0 E, O
assignLObj := rgmanager.rgAssignL;, j4 t5 S K7 B7 b0 b. U8 _
row := assignLObj.getRowNo(GlobalDistObj);
- B, o( @' q1 P% ^$ u if Row = -1 then -- since 70 i9 E1 e z" J) O) f
if lan=1 then
, V! ^1 v8 d) L) U0 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 U' |- G- r$ ]
to_str("in der Andockstation: \"",?.~.name,"\""));- H& F- g) B# \. z1 ]! v. ~) a0 f
else
, u3 [6 D+ X* J& x6 V/ E9 ^3 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( e" k" r' t) N# b' @; d to_str("in docking station: \"",?.~.name,"\""));
* v* T2 J7 K" ~ end;% d9 g( F8 [( E
else3 J+ ?- O- H6 m9 w% R. P, T& ]
@.Destination := assignLObj[1,row];
% ?2 J) {% j3 O% v5 s' D% e end; ' A6 p, k" Z* \: A {
newDirection(@);& H- ]/ O; A. X, L4 D. S" i L P
@.HasOrder := true;
1 P( Q3 _6 Y( g2 O4 _' }, T$ D* |( u end;* m3 L: R1 t2 t* E, g: L B0 Y$ `
end;. Q6 T6 M1 s! d# b6 ?. p
end; -- of the method
1 R, R8 \% g# U4 f' G |