/* called by: entrance ctrl of the object 'track'
6 g2 @0 e1 n! g4 j0 A$ ]*/) N+ t3 K/ `: r& [: x
is( R! M9 M, q( B6 y& K/ }% V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# O, V+ M' L' W% b0 d
do
3 W( U Y9 I, w3 Z7 W/ \ X% y Lan := rootfolder.Internal.Tools.AOLlanguage;4 w" @. K! S, t! p
if current = @.Destination -- else return
$ ?- ~6 q! R* _) d2 b then
: \& X# `% O/ |' e5 ^; U1 |8 s y) g @.Destination := void;" [# a" v w, ~9 {# b
if @.occupied then
8 E( s$ f1 K- `; V3 M part := @.cont;
/ d* h- f x8 j& I @.transpOrder := void;
$ @# t6 Q3 C/ f9 D+ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: k! }$ z4 A4 c- F$ w
@,root.eventcontroller.simTime);
% k4 v; }8 _6 k% l, X- D! C @.HasOrder := false;, ~5 T b- h- y4 |9 V
@.DrivingHome := true;# n! C, X* J! k6 Q* v. q& h4 E
rgManager.tryToStartTransOrder;
$ {4 L `/ T) k$ _/ Z if @.Destination = void6 _. A* R R' V# \
then -- no transport order for vehicle @
. d/ B+ K2 j/ p" @8 u* `* _. ^ @.Destination :=
9 k$ L0 I6 _+ I5 W rgManager.nearestFreeStation(@,track.~);1 f; p0 }2 T2 \5 R8 }
newDirection(@); 8 F$ Q, U' `/ M" F* w/ K% ^
if @.Destination /= void then% E- v6 a+ L; l0 [/ `" T
@.Destination.NumReservation :=4 @* |4 @* U$ o) q
@.Destination.NumReservation + 1;
/ _, i) q! d& @$ }) [2 J! y& L5 P6 i end;/ } ^, I7 j5 @( Q* f' @% v5 a5 y
@.CurrIcon := "drivingHome";& y, x/ a. K5 m( g8 w$ Z: C- Z8 p5 R
@.DrivingHome := true;
1 g l/ l0 R9 ?, J6 h end;/ f& g/ @) p1 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ v1 O" {+ P3 _0 @' q1 E C
part := @.transpOrder;
4 _/ z. T% |; F: Q# i, A3 S; R part.move(@);-- load part0 S- F1 Q$ j+ c* u, e$ b
@.CurrIcon := "load";4 [# a- F' U: p# `$ e! @3 P+ p3 R
GlobalDistObj := part.globDestination;6 `# j" E/ Y1 o* A$ w
assignLObj := rgmanager.rgAssignL;
/ R* a- d' }' v row := assignLObj.getRowNo(GlobalDistObj);
0 Z/ k& E% o9 |/ X if Row = -1 then -- since 70
6 S/ a( s- h* ~4 S* |, P# {7 T5 F if lan=1 then
2 n6 \+ y" u( t6 z. c: \, A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- ?' k) {0 }8 K# |1 P to_str("in der Andockstation: \"",?.~.name,"\""));
/ s3 |2 ]1 v$ E$ \: ^7 w* u( A else
) G% N7 Z: a- x5 L' n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 R8 l# y4 W1 X1 E( f- l$ r. \
to_str("in docking station: \"",?.~.name,"\""));
4 x2 p7 ^( A( G8 Q$ V end;
3 b" ^/ g% V1 g9 v8 q5 B5 | else: ~9 O+ W; d# s9 w& J) T
@.Destination := assignLObj[1,row];" S. M2 E) j0 q* [# T U' I
end;
; X' t1 e, Q' j4 N% a newDirection(@);
0 e+ V" v$ W$ D @.HasOrder := true;; ?3 T* Y' v6 u7 b
end;
% p# u! C# q9 o end;1 J* [% P/ |0 j# U- f9 G1 o9 f: {
end; -- of the method
: `4 S, U& z( U3 u- r |