/* called by: entrance ctrl of the object 'track'* x p% c' I' S; W& T
*/# G r3 w- x r# S: ?9 P6 O( n
is
( f# o' j; a4 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 L: z* A% H% Y9 ~do
4 i* s! {. v- W" i Lan := rootfolder.Internal.Tools.AOLlanguage;
2 d; L$ C" j v1 q% a if current = @.Destination -- else return
- i; E- T( P# ]" R$ ^1 O% g: } then
/ [7 l2 M3 X6 N! T7 J. W' x0 N2 \' y @.Destination := void;6 G8 D: s3 z/ {8 i+ d5 H" n/ w9 ~" I# D
if @.occupied then+ [, p7 m& ~$ \; ~
part := @.cont;
* p' ~5 I5 i4 n: e B3 x* G* e @.transpOrder := void;4 `! V9 ?' c+ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ?9 g' Q% s( ]/ |2 ^1 S# W* v: H
@,root.eventcontroller.simTime);
; `- F; v! h: [' p! t- i @.HasOrder := false;! b, P; U7 U- I: ?, J8 }
@.DrivingHome := true;
) G2 K8 O& e6 L. u+ S rgManager.tryToStartTransOrder;
: B2 e: S0 s1 W) ~& R if @.Destination = void3 K( Y/ S" M( e! d
then -- no transport order for vehicle @/ ` t( `9 S* M4 j$ _' X8 y
@.Destination :=: k$ m2 Q7 D2 x1 W: A/ ?
rgManager.nearestFreeStation(@,track.~);' }! t4 g, r7 @* b
newDirection(@); 3 y% E' u& o7 I1 E* T- N0 e
if @.Destination /= void then
+ i z2 J4 _4 d; ?! E) v @.Destination.NumReservation :=, g* |& N6 R6 ^* ^% j! [2 d
@.Destination.NumReservation + 1;
+ |1 X+ ^+ c0 H end;
* c9 |& t% i* q& i @.CurrIcon := "drivingHome";/ j( c y- Z. B( ^# k
@.DrivingHome := true;
3 [4 s8 X) O1 F' U5 X' j end;% F: l1 \( l7 ]# d' f, k' j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. G5 ^! M0 s1 q$ y9 e$ s$ \
part := @.transpOrder;1 Q; n4 C* ]. [) f! L% Z9 d1 k
part.move(@);-- load part% s, o6 E' w( m5 d. p" q
@.CurrIcon := "load";
3 R) f6 v* L4 G2 K) W GlobalDistObj := part.globDestination;
" s- {) J- h7 A8 ] assignLObj := rgmanager.rgAssignL;
! d" ~: q6 V: z2 v6 M: t3 d row := assignLObj.getRowNo(GlobalDistObj);
+ x; _$ c, r& |9 V! x! b0 G if Row = -1 then -- since 70. p$ f: I6 z8 ?. ^; x/ h& Y
if lan=1 then5 h7 ~+ ~' i! z7 y Z( S7 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," v6 f% S5 L9 t) y
to_str("in der Andockstation: \"",?.~.name,"\""));
6 B6 O- Y$ @, y1 B% |4 [' C2 M else2 u3 K$ K, h2 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 u6 h. p" V6 M5 b to_str("in docking station: \"",?.~.name,"\"")); ! K7 `0 B+ ?+ p# y% r
end;
4 F( H R* e$ f# o u) D else
9 R2 M5 V0 L: E, N @.Destination := assignLObj[1,row];3 I& V# d6 a. f/ \6 I! L6 C0 {
end; $ ]! t7 ~$ J. d2 C! }4 R
newDirection(@);2 Q3 }% |2 [5 B" e0 U9 V
@.HasOrder := true;% Q6 P* G% T/ D
end;; D2 [! n, i2 S
end;2 h; o+ ^& P' b! j
end; -- of the method
: g* ?* y# V3 @7 g1 A! { |