/* called by: entrance ctrl of the object 'track'
. D: g# Z! n6 }: M' G*/; R) {. w% O# F9 s! V9 A
is6 F. [" e. i6 q: q1 f4 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- k/ Z) M# Q+ ~ O
do
1 s5 _: P0 h. ]* H3 ?! N d4 z, M Lan := rootfolder.Internal.Tools.AOLlanguage;
$ L/ ?) f6 k' L. J/ O1 x if current = @.Destination -- else return
* X6 ]' K% {' y. L) f' j, T then+ t1 ^- ?, D. o F$ X
@.Destination := void;
; s% T! g; I$ D+ ~, N% f8 ]( F if @.occupied then
% l4 E+ E) j1 }' g* X- b! V* c! E* s part := @.cont; O' c" M0 M6 j( n
@.transpOrder := void;
: F' [" N4 _% m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ \8 \7 h1 I5 k4 w2 g
@,root.eventcontroller.simTime);
8 t& O9 P0 }- l `: r7 f; g @.HasOrder := false;
3 \- v1 L5 E! V3 C* W @.DrivingHome := true;
0 h) s, g0 D# g, | rgManager.tryToStartTransOrder;( @! {5 Q3 }/ `/ K1 h. c" X G8 r" |
if @.Destination = void
2 Q8 I0 v) } F' R9 a; e4 O then -- no transport order for vehicle @/ ~: r* w' p( |- p
@.Destination :=
- I6 t4 Z: R( r w rgManager.nearestFreeStation(@,track.~);
, j8 f7 o0 Z3 y) I; e b newDirection(@); 1 C6 O$ h, Q1 K
if @.Destination /= void then
6 W7 `* y( b" w7 p6 G& y6 j @.Destination.NumReservation :=
! k; g! `: Z7 l2 q; B% T* ]9 y, v @.Destination.NumReservation + 1; ~% }6 R! Y I7 q r. u
end;
/ t9 Z& Y l9 E4 Y6 {; w6 {8 W8 H @.CurrIcon := "drivingHome";
4 ^7 U8 f& c( ^9 D# U) X @.DrivingHome := true;
/ k" e# j6 K5 {4 r3 h' `7 E end;
3 q. B6 _: K {. Y1 ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q! Z* K$ D) Q$ v( ^1 e part := @.transpOrder;
: f! E. e! ], p; ?( p part.move(@);-- load part+ [* z8 ]& i# ~
@.CurrIcon := "load";8 S( C* Y" i3 _6 z1 d, |$ Q
GlobalDistObj := part.globDestination;4 L4 U6 Z- t% {7 ?( b6 O
assignLObj := rgmanager.rgAssignL;, k$ \2 ], u" j g
row := assignLObj.getRowNo(GlobalDistObj); i0 \0 b' @! v6 D0 Z
if Row = -1 then -- since 70
. ^1 R+ {, X1 m, x3 `4 x if lan=1 then/ [* ^& v U, }' q9 L0 i4 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 O0 {1 D! n/ Q: Q* Z. g to_str("in der Andockstation: \"",?.~.name,"\""));5 O' ~) Y9 V1 J
else
6 G( t4 \. M" u" ~: [# o: ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* j' V5 B/ @" [7 Z to_str("in docking station: \"",?.~.name,"\""));
- O9 H l) @ ^) m1 g6 m- U* |6 R end;
7 C4 `6 |! b1 D2 `7 _# L else
0 d* z( a2 n6 ?# E @.Destination := assignLObj[1,row];
1 ~0 h) w t: P$ m end;
# `8 Z+ W) M% x2 D& O newDirection(@);
, Q) h5 k5 ?1 n5 l+ [7 ^ @.HasOrder := true;& d% ?7 x( h" G0 m( A5 |/ ^3 k
end;1 e- j! [, ^' |$ u) _5 w! G8 k
end;+ X! C0 R$ O) ~3 M% _
end; -- of the method
9 E7 T) ]2 e! Z Y" \0 g9 X |