/* called by: entrance ctrl of the object 'track'7 Q% X+ {5 C' ]6 S5 m P
*/5 p( ?( R: u z
is$ y: H1 j7 H0 Z4 P# w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 M4 _8 R* M# fdo
6 {1 `7 Z! }3 V# e$ R; A Lan := rootfolder.Internal.Tools.AOLlanguage;
9 `8 r- H4 D0 O7 p7 K if current = @.Destination -- else return2 M0 F8 v; Y8 Y
then
. o, D9 y" k% n: ? {8 o5 k' B& G @.Destination := void;
\8 ~3 C3 R/ {; U" W2 O } if @.occupied then
- ~7 c3 P {' ?; q% U part := @.cont;
5 f+ q9 y1 G9 V* r; c0 a) g# Q& Z @.transpOrder := void;# l6 Y# l; l3 X; S! L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% m$ L! l5 G3 L+ h# a
@,root.eventcontroller.simTime);
! N: D6 s6 g* e @.HasOrder := false;
$ U$ ]2 e0 s5 f Z4 b @.DrivingHome := true;
|3 c5 [ ]! O& |- Y* s0 ]/ | rgManager.tryToStartTransOrder;- a; Y2 c5 N$ q. R1 z3 D g9 L
if @.Destination = void
& m. t' c! K, N( {9 ~( `7 K: h then -- no transport order for vehicle @- t# \ x1 C8 n7 ^0 c7 G2 z3 w
@.Destination :=8 o3 n# Y5 O6 ]' S3 L& O+ q7 f
rgManager.nearestFreeStation(@,track.~);
, n8 ?& |% X6 ?' J newDirection(@);
9 V! L, {/ C0 v' D- t/ b if @.Destination /= void then
- Y3 Q* ?* `/ ?& X @.Destination.NumReservation :=+ Z( P% E" n. J4 K ~0 |) E! Y
@.Destination.NumReservation + 1;8 `' t7 F3 O3 [! B4 k
end;
% w1 g) A% V9 s9 y% V/ x( l; j @.CurrIcon := "drivingHome";
; R6 g2 l- i" h @.DrivingHome := true;3 E0 K# M4 F6 I+ S* E
end;- M' T5 \, D2 R: `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 e& k; t S3 ~/ t( x* ]* b: Q part := @.transpOrder;$ o) b( j- r# W6 [) R3 n
part.move(@);-- load part
: B! E) L6 ?) E' l( P @.CurrIcon := "load";
$ y! f; z0 u* d- b5 C/ s GlobalDistObj := part.globDestination;
4 r1 g8 S0 t4 Y8 E; Q1 \. v assignLObj := rgmanager.rgAssignL;# y( K7 h$ `* q7 p3 a$ t5 p
row := assignLObj.getRowNo(GlobalDistObj);
7 s' S" z, B) _6 j) q if Row = -1 then -- since 709 g6 x q! _& Q/ u/ i
if lan=1 then" d' W; [& M* S% ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Q: i* r' [4 y5 O2 T( p# B
to_str("in der Andockstation: \"",?.~.name,"\""));
$ N' v6 w0 c3 \ else
4 O, Z5 o0 r+ y: q# C& q7 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- ]4 W) ]. s; Q to_str("in docking station: \"",?.~.name,"\""));
7 l4 K0 a* X- R( p$ G! e end;" {2 Z. k2 ?4 b2 U( x* e* ~& x' \! x
else
: H6 @0 B' r- V' z- @. j# ~: K @.Destination := assignLObj[1,row];, j' @* i r! W& G% _9 ~
end;
+ J- Z$ n1 R2 a( t* q, o newDirection(@);
. ^4 T9 h+ z! G7 } @.HasOrder := true;
& l- a' t l7 J! y- ^ end;
; A; u& N+ A2 u, J8 J/ I( T% v end;
. [5 t- I7 e. @6 R2 T+ L7 Iend; -- of the method
2 R8 E/ O1 T% ~$ j/ ~5 E |