/* called by: entrance ctrl of the object 'track'9 E+ h/ h& A* h" ?+ P3 C) p
*/# Q. }3 ? S+ w- Q J
is4 U) G8 E/ W# W6 W! @3 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ?( e( \' q# g4 s* K0 J
do
$ b$ B, y* h5 Q, X. K. { Lan := rootfolder.Internal.Tools.AOLlanguage;) n/ y; Z. h: u$ l2 m6 O3 X
if current = @.Destination -- else return0 ?& ^% r& f: f# F. W3 C: I* I# F
then
1 S C8 b/ j" E G l9 R @.Destination := void;
2 f" q/ p$ x/ c R, P7 g if @.occupied then
1 ^# h. c* A# \! q/ |% ~/ M part := @.cont;5 @! V' v, z$ Q
@.transpOrder := void;: J- t, Y& w% K% C- E: W* _. k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) v T! j0 K6 x/ b9 k @,root.eventcontroller.simTime);
6 V3 W$ t: s+ L6 h" U @.HasOrder := false;
/ ~1 o- X( G. W' s) h0 h' W% W! d. P @.DrivingHome := true;% G" N8 @7 d7 a! Z0 L3 E ^# H
rgManager.tryToStartTransOrder;
0 t' Z1 ~, g4 u& d: g J if @.Destination = void+ |& n+ X6 ~5 C' O z! E
then -- no transport order for vehicle @
6 V) P1 F5 t2 r+ y2 U& N @.Destination :=$ X3 S7 |" j1 Z6 M- e
rgManager.nearestFreeStation(@,track.~);% W+ V: s" m. S% c( H: N6 X% y
newDirection(@);
8 d4 c j( w& U, s/ _6 r9 \ if @.Destination /= void then/ _) \: S& r. B/ ` s4 E+ \+ T
@.Destination.NumReservation :=5 Z* a1 i7 g9 T% _/ @, T5 {% r, M1 T
@.Destination.NumReservation + 1;
- F7 N8 n5 b" m end;5 X2 `6 c8 j4 f ] |" p
@.CurrIcon := "drivingHome";0 Y( @9 b. v) ]+ a. b5 H2 @; W" p, K
@.DrivingHome := true;& ^( [, Z& h* F7 N) j
end;3 z! |: `& W2 p6 P2 l( P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) j5 ]- D" K, k" G9 {9 | part := @.transpOrder; m; j0 j8 E+ P0 B! k
part.move(@);-- load part9 p5 G3 u; W5 w; N
@.CurrIcon := "load";
4 N5 O" C$ D) [) p% f+ n% P& D; K; _ GlobalDistObj := part.globDestination;
7 }* e: K, e& c1 f* d assignLObj := rgmanager.rgAssignL;& @8 @, }& k) {0 x+ V, u1 v5 r
row := assignLObj.getRowNo(GlobalDistObj);
. {) Y6 z- ~6 y, u+ I if Row = -1 then -- since 70# G0 x; o% m0 Y- @
if lan=1 then# i; \) j B/ E" e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( H, @' d% ]. b. a$ k6 p, u4 q
to_str("in der Andockstation: \"",?.~.name,"\""));
7 M$ a. I8 K. A/ @1 U5 G o2 l9 y else& ~; |5 \3 D5 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 B4 A) X' @/ @# Q/ l% _ to_str("in docking station: \"",?.~.name,"\""));
- L& v3 T+ G! a- @7 B end;/ Q1 J* R+ Y" ^8 ]$ d
else
9 I( ~8 |9 w( c h. H0 C @.Destination := assignLObj[1,row];$ v% P |! X5 F8 P
end; ; s1 z% J9 [. I4 a
newDirection(@);
( ^3 b5 A _9 e @.HasOrder := true;
, r( \: s) f$ [7 [7 B& E8 K; s9 S end;2 m x5 Q6 I. @2 w" B
end;; W. k9 S8 E8 m# v( R6 @( {
end; -- of the method
1 |6 E, G' H% u# { |