/* called by: entrance ctrl of the object 'track'
& y$ G! m$ m! i- b3 y" c*/ {$ |) N, u3 `8 d
is
1 k) `- G2 B E: h- e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ~- A! s4 ?8 X+ Z a% s8 Gdo
0 Z: m6 g1 |* Z& }" b Lan := rootfolder.Internal.Tools.AOLlanguage;
0 i/ j' |0 y! u9 c- R7 v if current = @.Destination -- else return& _7 H4 A6 K A/ G+ Z& I6 V
then; L2 ^' z% j7 A6 x/ j. v2 o
@.Destination := void;; g# s! C$ \$ c% m% f
if @.occupied then
8 ~% I, M* P& d, b* R; v0 s0 n8 T part := @.cont;
% ]7 X% x& D' X; g6 ^ @.transpOrder := void;
+ Z$ G8 S. l8 h8 `) [5 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' }1 ?+ n; K4 y
@,root.eventcontroller.simTime);4 p" u' r. [0 y1 [2 B) J, N1 m. X
@.HasOrder := false;
; l \# j ] H/ B; \8 ~ @.DrivingHome := true;1 ~- ?$ D+ b3 ^% x8 ^4 \' p4 F
rgManager.tryToStartTransOrder;7 L# F: [- X" g2 X* i
if @.Destination = void. N, a. z3 A5 Y0 i- D" d# y
then -- no transport order for vehicle @; w1 K1 q y& n; t
@.Destination :=, m/ O3 N+ Z; I
rgManager.nearestFreeStation(@,track.~);
! ]# G, a) _- f1 @! G newDirection(@);
: a. {! A h1 s0 y' G: v2 o if @.Destination /= void then
; ^" W+ y5 O; A( ]: V @.Destination.NumReservation :=- h* v$ ~% E. t5 h
@.Destination.NumReservation + 1;! G r! l6 D7 M5 Q" }5 H
end;' u" }6 D. _0 s4 E s, a
@.CurrIcon := "drivingHome";
/ L& k4 R, A7 b5 M @.DrivingHome := true;
Z/ y" ~7 w4 L; k( ^/ M( g7 t end;& C( s% t- [/ N9 F: n1 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% ]# `, I1 f7 ^ ^7 e) ~! o
part := @.transpOrder;) Z3 Y* ?5 Z: p- b1 Q. V, K
part.move(@);-- load part
4 z- u2 N& y; D# W: O @.CurrIcon := "load";
/ {+ G% g; K5 L7 K( K a GlobalDistObj := part.globDestination;
* n- n8 \" g& D: A- A% A- } assignLObj := rgmanager.rgAssignL;3 z8 C) I4 y4 Y8 D. c) g
row := assignLObj.getRowNo(GlobalDistObj);
! P% A. m7 Z. o" F( n3 m, g; X if Row = -1 then -- since 708 r3 u4 w4 k1 J
if lan=1 then/ Q6 g& b5 ] G* y5 a k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 b- J% O* W# [. Z to_str("in der Andockstation: \"",?.~.name,"\""));2 ~# ~5 B& z5 j- k5 [
else9 y% W4 J y! ~/ s8 X0 O0 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& [/ m- r8 ], @% ` to_str("in docking station: \"",?.~.name,"\""));
7 O% ^! f$ y E) Y! k) Y6 E end;. V2 t/ m8 R* ^6 M# S
else. \3 H1 j {3 b. x1 U
@.Destination := assignLObj[1,row];
$ P0 y' u+ i! I* | end; J2 i5 U" G4 K4 d
newDirection(@);* m8 y3 P& y- ~) Q+ W
@.HasOrder := true;
; m" a! ~, R, v' w/ h6 y2 } end;
$ ]5 @/ C, {2 ~1 {8 k end;4 B [- o/ c* t
end; -- of the method
* Q& C( @$ O& }! P! F- ? |