/* called by: entrance ctrl of the object 'track'
: A$ R+ w' v6 ~*/
3 Q$ y& Y% t2 t. x) Sis
) F" i6 z0 H* p: } part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z- Y7 F4 Z& u& F% y6 d
do
7 R3 v! B; c' e- u! ^, y' A' v Lan := rootfolder.Internal.Tools.AOLlanguage;
" z( `4 i b4 g" j. `3 y6 N if current = @.Destination -- else return# e$ Q0 S7 ^' A
then
9 E! L, [. q$ r" w @.Destination := void;5 z/ M0 I9 b% ~! m3 ?. J7 u' i
if @.occupied then
7 Z3 p! }1 Y! q) \: z8 m part := @.cont;
Q# b) P& P- o! @% _7 r @.transpOrder := void;
& _, g* A" a! B. r) Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% c' w, ?( x- o& R, l# N% Q9 H
@,root.eventcontroller.simTime);
4 H* O- Z0 x b2 d0 e1 b @.HasOrder := false;
7 ]# O/ K0 x6 o0 O$ O @.DrivingHome := true;( H# e. T+ |1 R4 S( C W
rgManager.tryToStartTransOrder;6 N& j$ r- e( b+ t+ ]
if @.Destination = void' b: O; n- K- [4 S* N
then -- no transport order for vehicle @
- y: e+ i, {/ C, X @.Destination :=! P1 V9 O! N$ J5 O& W, k
rgManager.nearestFreeStation(@,track.~);
3 @8 e6 [. G7 i newDirection(@);
7 o- c3 v x* |( b' A/ ~$ C7 p9 A) f: E if @.Destination /= void then
- z. X3 [+ n* d @.Destination.NumReservation :=2 k( {9 E! D8 s
@.Destination.NumReservation + 1;
5 ~, F% X9 R0 d7 v& |, ] end;
1 s+ z0 x, w# }/ D( r0 ^ @.CurrIcon := "drivingHome";
- Q3 n, _' p! v" W+ ^/ B4 `/ E @.DrivingHome := true;
3 F2 V3 `( }! V& A, [ end;" ]7 I$ p3 X: _/ v' e( o O) v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# X; ^4 Z' M9 ^) B part := @.transpOrder;, q9 S6 m0 e9 I, W; p
part.move(@);-- load part- |7 i3 C+ J4 j. [9 V
@.CurrIcon := "load";3 V# ]1 t% ]' J$ I
GlobalDistObj := part.globDestination;4 D9 H6 A5 s6 U0 R
assignLObj := rgmanager.rgAssignL;5 E4 U1 m8 _0 ~. P0 y
row := assignLObj.getRowNo(GlobalDistObj);
0 a# X* W7 y* H; n$ m" @9 z( m if Row = -1 then -- since 70
9 C7 k' A& ]; s2 _/ Y$ R, f if lan=1 then4 A1 j! w' s1 B: J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 A4 y& A U* o& A d to_str("in der Andockstation: \"",?.~.name,"\""));
$ p1 A/ z3 M; M( y5 [* Z else4 Z- w2 A" q( E2 Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. ?; R$ k9 b5 A: V% Q+ ~ to_str("in docking station: \"",?.~.name,"\""));
5 ` c. T9 k+ o3 s i1 q* n3 ` end;
: ?/ x# J- L0 Q( o else
: R% I/ g) t2 @! R& p @.Destination := assignLObj[1,row];
p' |3 R( ^, V" k- D end; - U8 ^9 Q" g8 J" B
newDirection(@);; L' U% T% h5 D
@.HasOrder := true;8 B5 m; [+ C% H( [( x7 j
end;! R5 A* O" s9 p0 B3 K0 R* R
end;" X/ c4 b( _ b8 C2 k
end; -- of the method
1 T: B6 j* c% A( x |