/* called by: entrance ctrl of the object 'track'3 o4 W6 q! B0 V( |# A
*/
6 R; A) l5 {' e2 g+ S8 cis
1 `6 ]! ?/ j5 ]: y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 B3 Q4 \, ^: Y0 U1 c' P7 hdo
1 _8 m8 t; Q) X | Lan := rootfolder.Internal.Tools.AOLlanguage;
3 p. I1 M/ c; n2 C1 J: R+ p5 R$ O if current = @.Destination -- else return
& W: V( r, R5 X& y. @/ R7 i3 G- R* C then
, `& @3 Z7 b/ J5 i @.Destination := void;
0 a% i, Y9 M* M- Q if @.occupied then- m8 F F) W" x1 H5 f8 V: t4 _
part := @.cont;5 C, s. Y! S' n
@.transpOrder := void;
5 |; ^. ~8 P; o }8 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( ?$ Y: a. R. h3 Q; ^ @,root.eventcontroller.simTime);3 R$ z8 z/ ~7 q- E0 e
@.HasOrder := false;
: [$ K* h+ z3 O& f+ e8 X6 g7 S9 } @.DrivingHome := true;
( V4 D) X, ^0 l rgManager.tryToStartTransOrder;3 ]2 W0 O7 ~' s9 l; b# z
if @.Destination = void! }4 y( j3 v0 b
then -- no transport order for vehicle @
V% \7 Y, A' ~- W @.Destination :=$ Y6 O& |- P5 H' l
rgManager.nearestFreeStation(@,track.~);
" g) q) w& F9 R. n4 } newDirection(@); 7 G) r$ U; B7 s/ L. j; z
if @.Destination /= void then
6 O8 D8 r5 U- k2 f. V: f @.Destination.NumReservation :=
9 R& k+ R+ v4 d @.Destination.NumReservation + 1;5 K& P! k/ @: M3 T
end;
9 m% Z9 j: x( P+ }! b1 b4 X' G @.CurrIcon := "drivingHome";2 s& O, D2 R; p& c# E. L: u: i
@.DrivingHome := true;
2 p( l5 p8 `( w: W3 h end;; q' i7 I( L2 ?0 z' z' ?0 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 i) ^4 R( ~* C9 W Z. U, F part := @.transpOrder;
% h8 {! |% R$ M1 b8 Y! Q) U; L part.move(@);-- load part
9 S& X+ \7 G& m7 g @.CurrIcon := "load";. S" Y5 `0 f1 i4 X# V. ^# S
GlobalDistObj := part.globDestination;' s: c9 A" R: n/ L' s
assignLObj := rgmanager.rgAssignL;
* q) w3 h0 k& h6 m4 P6 f5 B2 g row := assignLObj.getRowNo(GlobalDistObj);
7 C: s; F' l: G( | if Row = -1 then -- since 70
9 [4 P ?) s! v* w if lan=1 then% a; s. d1 a a3 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 i9 g* i/ Z2 P3 m" V5 e- [
to_str("in der Andockstation: \"",?.~.name,"\""));
" C: J. v2 i0 m% J) F2 [" Y else* \5 v( q+ z" J1 n, m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. f. Y) R3 h' ?5 N6 \/ c N
to_str("in docking station: \"",?.~.name,"\"")); 7 E+ Y: a5 L: R- z+ |$ z; r' T2 O% C
end;- K( }' A: Q/ N A+ f$ V
else3 u* K, {8 k5 e. q6 s) f% D
@.Destination := assignLObj[1,row];
- i$ N8 l" ^$ T& Q end; ) s: a% N8 G2 r* D" S6 D
newDirection(@);
! V# }6 R) O* U* ~9 J @.HasOrder := true;6 A' e) ~$ r& t, Q8 g! {
end;
5 m* ~% v. A& }6 s! O. e end;6 O! D' q# Y8 j; |- ?# P' P
end; -- of the method
4 f: C$ D- d% v% g9 G |