/* called by: entrance ctrl of the object 'track'& J k2 c% F7 g2 ?' j- ]3 P% `0 y2 L
*/
) q4 _1 F7 Y) X. N* ~( n$ bis: P* f3 K) l4 E& e7 ?5 f; Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 f, i* x7 j: I3 T( }do3 Z9 [5 K3 N, q" |; ?
Lan := rootfolder.Internal.Tools.AOLlanguage;; s. w9 R" T e$ G. S
if current = @.Destination -- else return |! F+ {' v+ W6 n/ k9 q7 w
then
6 T! X3 {' c6 b- {; A1 E @.Destination := void;
, `9 _' P% {8 |7 E. N if @.occupied then8 F2 t! ?, `9 Q4 R: H. p- F4 L
part := @.cont;
$ X) j/ G, M( o( z @.transpOrder := void;
4 z Z6 [ P' K3 I8 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 |5 o. w8 V/ \) Q9 u f @,root.eventcontroller.simTime);
% \& y- h3 U" F' Z8 t @.HasOrder := false;
4 K6 O( [9 w& j8 ^ @.DrivingHome := true;
) ]% W' X* z. F8 V4 [) o- s' ~ rgManager.tryToStartTransOrder;9 p- [0 `0 h* E) i; B) w
if @.Destination = void
4 m& \6 w# j- ?* O" Q then -- no transport order for vehicle @* N9 `( ]0 Z4 a0 m& e* ?
@.Destination :=
0 K* Q4 x( W' U; {8 V6 O1 M$ T rgManager.nearestFreeStation(@,track.~);% ^% I; i4 m% ]: N
newDirection(@);
4 j/ p; i1 R4 B+ M6 R; C if @.Destination /= void then0 M( t- i% P6 j2 X! ^8 T( o
@.Destination.NumReservation :=
1 Q: n% x+ @ T) J$ h @.Destination.NumReservation + 1;# t' y! b8 L7 W, g; e% V
end;
9 ^# H7 q3 t4 E; {% O& F; | @.CurrIcon := "drivingHome"; o: S* Y( d( W9 l' e! g
@.DrivingHome := true;
4 E6 \1 y7 _: b6 l$ G/ w end;
4 R+ d. W3 i3 F/ _* \% H- o$ f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 M \% `6 w7 ^0 r2 ~ part := @.transpOrder;
. n5 b7 E4 Z% ^- g part.move(@);-- load part$ c) v' ~/ B p$ `3 h
@.CurrIcon := "load";
& G$ E" E, w( ~# [4 Y! ~ GlobalDistObj := part.globDestination;
# ~$ I" |+ ^7 P& k assignLObj := rgmanager.rgAssignL;" Q+ z& K$ O/ g+ Q; `
row := assignLObj.getRowNo(GlobalDistObj);
2 R0 a! ^7 `% B! q5 F% T3 } if Row = -1 then -- since 70
4 W* h' n& B1 w: Z Y8 B8 w if lan=1 then
3 o3 ~9 e$ C# c7 P" \) H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% I! R) `7 I% Q9 t
to_str("in der Andockstation: \"",?.~.name,"\""));0 N4 f' `4 d8 Y7 }% E
else, B9 S; i- B" v' s* S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! e2 L/ ?* {$ Z: o2 T& N0 B6 c. a) W: S$ D
to_str("in docking station: \"",?.~.name,"\"")); 8 q/ Y" d, B. B* ?0 ^; H
end;' K) |5 y* U q! n1 S
else/ m" d! T, D; U% ?9 F
@.Destination := assignLObj[1,row];
9 w! I8 E7 v% P0 I1 N& E5 E end; % Q6 [2 G0 M: m$ v! a
newDirection(@);
4 `. w2 z* p) J2 } @.HasOrder := true;# S: S( ]" l4 S0 Z+ `4 a
end;
+ z. C2 |+ \) O% z% Y end;7 ~. S' a* q! K, h! Z2 [. c% I
end; -- of the method
* L2 F' {/ K* m |