/* called by: entrance ctrl of the object 'track'
% e h- B9 [8 J4 C*/ D$ Q8 D! v1 b P# P$ j y3 g: L
is2 Y& _& _0 K$ \. _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 L6 p" M% |: Z* a; J2 i0 v
do' p: p1 m5 m& j
Lan := rootfolder.Internal.Tools.AOLlanguage;6 n2 }! {; Q. e: I4 Y
if current = @.Destination -- else return
1 }$ i8 g m# z then
( ?; J% s* c* R @.Destination := void;8 \9 G; Q$ `& h
if @.occupied then/ n( w6 y5 @3 o8 a& r
part := @.cont;
?1 f; Y% G+ k/ z) i. ~* v5 C) X! Y7 g1 z @.transpOrder := void;
* A0 W, U. O5 i* U' v% k# I' { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' r/ q v5 ^8 J
@,root.eventcontroller.simTime);
: m- `$ q1 r- d- H! Q @.HasOrder := false;
) H, O1 i1 t+ a! A y$ b7 s @.DrivingHome := true;
* M* `3 N# R7 a8 q# R. E rgManager.tryToStartTransOrder;- `! q/ q/ a$ F& ?7 t- R2 A
if @.Destination = void2 ^9 h. t/ T- r5 K* [8 n5 \
then -- no transport order for vehicle @2 D4 R: d1 }! v7 W3 [6 d
@.Destination :=! g) O( q1 `7 N1 _ @+ y
rgManager.nearestFreeStation(@,track.~);7 n- N' G% m5 R
newDirection(@);
7 f6 e# w9 O1 [ if @.Destination /= void then
& C" p% N7 q% p4 O: v @.Destination.NumReservation :=
1 P4 w3 [( {* P @.Destination.NumReservation + 1;6 j# d) J+ N- J+ I. u
end;" w! H2 P% j$ n) D; z1 J& k
@.CurrIcon := "drivingHome";
8 O [- l- l% D6 Q! W$ b @.DrivingHome := true;9 L4 M; l2 S% E4 U8 a8 w+ t# m+ Q
end;5 g' i$ \: X' A% V4 y- S, j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 P* `2 q+ G4 Q& e$ u+ t
part := @.transpOrder;
" `7 W( a. J/ z) O$ Z part.move(@);-- load part4 u6 }7 y5 Z# ~0 Q9 E2 s" g
@.CurrIcon := "load";
) \8 l) c, y4 c# |; q/ B GlobalDistObj := part.globDestination;
) z0 }) V( x/ V$ T1 z9 b assignLObj := rgmanager.rgAssignL;' r6 T3 \1 o; c( E
row := assignLObj.getRowNo(GlobalDistObj); z& p; Q6 |: V& c8 a) [
if Row = -1 then -- since 709 W8 R4 g& l. |2 I# y% v
if lan=1 then
/ ]. H4 {% |( C0 \4 d6 j3 T# i; g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, ^; ~6 k: W5 |* G6 I( Z: s, S9 i to_str("in der Andockstation: \"",?.~.name,"\""));
+ p7 c3 A2 h& T: `5 @ else
+ d. ?0 m9 B# `" U3 m: g$ n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. u+ C. w a- S8 U b. K0 [+ M5 P8 L8 H
to_str("in docking station: \"",?.~.name,"\"")); % P. q* r% h: [6 t, K
end;
! F4 n0 u; e7 b# K else
: f: d( P' B @ ^* [: i9 x @.Destination := assignLObj[1,row];
; [6 s4 O/ L% L% ^3 F end;
5 N/ C/ u8 d, J2 c: \ newDirection(@);0 }5 M3 v$ E E' V- I, z: d6 x6 u
@.HasOrder := true;0 _7 |( J2 f& c( E
end;
( K9 ]7 v% m% _ W) }; M1 ` end;; e# l" n, k2 M6 |% n$ Q9 A) k- E" _
end; -- of the method
( Y2 M7 x/ w/ ` @# z, u; Z |