/* called by: entrance ctrl of the object 'track'
2 W, ?/ O! J8 @' R( j*/9 Q* y& F; @6 p; c+ v8 G4 T
is
# c3 Y5 [- ^$ D* ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 G' ?# j: a3 I4 z9 H
do
: Q0 Q" |5 x8 h! {: V- b6 Q; x Lan := rootfolder.Internal.Tools.AOLlanguage;7 q( r# c' r$ S& Z, J: U$ ^
if current = @.Destination -- else return7 A. g; R6 X, v2 f* N2 M. U& s
then' h) J! R5 d4 M
@.Destination := void;8 m+ H" Z/ w; z3 h
if @.occupied then2 y$ {4 b3 z6 G8 n) ]# N
part := @.cont;
8 B: x$ y. t+ W5 `- Y. F @.transpOrder := void;$ j, t5 H8 h# R0 A3 P& T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 t3 D! p2 {/ u3 T9 }8 W( x
@,root.eventcontroller.simTime);# [7 n' D# i' a
@.HasOrder := false;1 w, V# t; L) a1 {+ _
@.DrivingHome := true;
) K; |( K6 ]1 \/ ]# r- b; h rgManager.tryToStartTransOrder;( d% K- \( r7 h8 h, l( z
if @.Destination = void/ t1 M% B0 q+ u" v# t- e' i3 u+ O
then -- no transport order for vehicle @1 J0 k1 o; V" ~% l
@.Destination :=
$ `; l# f7 k% F0 w k rgManager.nearestFreeStation(@,track.~);
4 |7 p7 g$ H, ]. V$ U5 a5 E newDirection(@);
5 W d' Y% `$ e+ y+ I9 c if @.Destination /= void then
9 |8 g, a5 g' i& d0 ?' ~& x @.Destination.NumReservation :=' H1 Z4 ?! X0 g2 i* I5 T) k
@.Destination.NumReservation + 1;
) b2 S8 @9 _% ~4 [ end;" i4 e% u* v. ]* x, g) l
@.CurrIcon := "drivingHome";
/ N: p" C$ e1 j/ W. w8 ` @.DrivingHome := true;
+ t Z9 b/ D# c0 O end;* \+ X. a" X( l7 h1 i( r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% o3 \8 i/ v5 E, a
part := @.transpOrder;$ @1 c- ~6 y2 B1 N9 C( `; X: i5 T
part.move(@);-- load part
8 w: _& F; ?! y. e @.CurrIcon := "load";' q, _; [$ y' g7 P8 O8 X1 ?
GlobalDistObj := part.globDestination;
' }$ ?* p" m7 O; u0 t2 A assignLObj := rgmanager.rgAssignL;& J4 k3 O! g0 f
row := assignLObj.getRowNo(GlobalDistObj);3 _9 O5 m- F* _ P7 u
if Row = -1 then -- since 70/ w) ~$ W- ]+ o. T' M7 J
if lan=1 then. `8 H4 Z5 n, v5 A. A( i" y5 |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ l I1 N& Z) x# b( D q: u- {
to_str("in der Andockstation: \"",?.~.name,"\""));% B) ~8 e3 U' D
else: |- A% U9 D( S1 R4 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: `9 X2 i% T5 \& J' r2 x, s to_str("in docking station: \"",?.~.name,"\""));
( B* L, Y5 b) _ end;/ [3 R* w. [7 n, h
else) t6 E, J3 K* E5 @6 N4 M* F
@.Destination := assignLObj[1,row];* b! w: h" F' \9 Z" o
end;
6 X; b' T' b9 v3 T: ]$ I7 F newDirection(@);3 X* M- Y6 K! R
@.HasOrder := true;
5 X. J; D4 S3 {3 e end;- _+ D/ p, ?! z6 P6 @$ x5 r
end;3 M' T: D+ B) m
end; -- of the method
+ @/ G( [; g: I$ L! S1 e w+ D |