/* called by: entrance ctrl of the object 'track'
2 H) P1 A4 N$ F: E*/
- r% K! P# z/ l% Y" Yis% f1 q* q7 V+ A8 ]/ |1 d" \, ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& }9 t& l8 O4 h9 c( Jdo
/ ~+ z/ S2 C5 G9 i$ s Lan := rootfolder.Internal.Tools.AOLlanguage;/ M* K! ]. p5 [8 o
if current = @.Destination -- else return3 v. [$ W b8 w9 j" W7 W
then
/ s8 v) V9 {+ K$ i8 {0 h5 A i. B @.Destination := void;0 \! g" K2 X' t! ~1 n
if @.occupied then
, ^* C- x* X# `# \1 }# m; J* F- X part := @.cont;
1 u$ W+ W g" U+ i) L @.transpOrder := void;
4 |, [7 O( i7 e* L% @+ ` Q, ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 K% T7 \6 i0 P, f+ V
@,root.eventcontroller.simTime);% {2 M) n% C" n' Y
@.HasOrder := false;
8 A$ R- `0 F4 ^$ n( M/ p3 e; Y @.DrivingHome := true;/ p+ ]* U2 q) b; X$ S( _, H
rgManager.tryToStartTransOrder;
/ H+ P$ F' F( B- p$ |8 K if @.Destination = void
$ e5 O7 }8 R) g" ~ then -- no transport order for vehicle @4 R1 R! [) f; o* m( g
@.Destination :=2 a& y; }( Z/ H
rgManager.nearestFreeStation(@,track.~);
7 u" Q3 |3 H2 @4 K5 U! Y newDirection(@); 6 r/ B: K# r, ]) t( t) j0 b5 Z
if @.Destination /= void then7 ^2 }+ T- j& h
@.Destination.NumReservation :=
+ _8 r0 B+ w' h. L; k @.Destination.NumReservation + 1;
" ^+ z. R) L$ J. ?3 _9 ] B f end;
- g& R; B# H+ B0 n; W( N: P @.CurrIcon := "drivingHome";
+ d+ }: X- P% r& { @.DrivingHome := true;) t" C A; }1 p6 ` z
end;2 ^9 ]* x, V4 `# r4 d# N% ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 M# ~3 J$ ]1 u8 W* \' |+ O
part := @.transpOrder;/ B5 Y* _5 L$ J
part.move(@);-- load part: W4 p4 q- Q4 E( o$ ?8 `
@.CurrIcon := "load";
5 H7 {! A" l7 C GlobalDistObj := part.globDestination;
8 e- ]2 w- @7 c. V; a assignLObj := rgmanager.rgAssignL;3 l& f' ?5 a# a2 A
row := assignLObj.getRowNo(GlobalDistObj);
6 L4 v: C+ h. Z+ V+ y4 G, } if Row = -1 then -- since 70
. W( x4 a, Y- c/ y" g if lan=1 then' m' I" U, D* y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! @- U: K0 t- t( Z: k4 t0 [
to_str("in der Andockstation: \"",?.~.name,"\""));. v4 ]: c+ Z* U/ y& x" u3 d
else
0 P l9 h) B7 L/ c( A0 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 ~: z- |, A# Z: H' [" T7 V, a3 ~
to_str("in docking station: \"",?.~.name,"\""));
% d6 i1 u8 L2 F- u& K end; c1 T0 u! X* P3 A h
else
/ O; K/ P7 J' f! I% { @.Destination := assignLObj[1,row];$ H5 H" C3 b, L& B: }' y
end;
/ i1 Q' g$ G: H7 H* `' V: b newDirection(@);
( f7 G8 d- g1 L' ^' N @.HasOrder := true;& e/ ~. |. Y0 E- C$ h
end;
) Y3 B! q/ t/ d& T# F7 Y; m end;- y0 M M% q) G% P) U# |* g7 u
end; -- of the method
' f) c! s! Z$ x. G# n, a0 _ |