/* called by: entrance ctrl of the object 'track'
: G, x+ y: T0 G- M7 @*/5 b# m9 M9 ]/ v% i0 v& F3 p
is, N! z: F" I0 R8 ~0 r' M' J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 A& F% r a8 X9 r/ t
do% C# d6 M. x$ O
Lan := rootfolder.Internal.Tools.AOLlanguage;+ b$ k, C5 \& @: w/ |
if current = @.Destination -- else return. A7 {4 @: c/ D) Y, ~
then
) U! ?* D* ^/ t# b8 m7 }' d6 C @.Destination := void;& I! Y, W$ z# e: d) t
if @.occupied then
) Y5 {/ ^3 U4 x+ ?: ?2 i% E9 K part := @.cont;4 ~% n3 {9 o0 W' Z
@.transpOrder := void;
+ o! N( d* r# ]& A. c4 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) Y1 i8 F, b! \: V7 m/ q) g7 ^1 p% U/ p
@,root.eventcontroller.simTime);
1 m3 C9 I9 }0 v q* ? @.HasOrder := false;# ^( ~/ M/ }) N( Q6 Q/ U
@.DrivingHome := true;0 V& i5 F( z% X2 u \- ^ b% C
rgManager.tryToStartTransOrder;
, `4 J4 I* t3 J* s% | if @.Destination = void% D# X" W: U6 ^+ o/ I
then -- no transport order for vehicle @8 o5 Y! L- \% r) C2 ~( ~
@.Destination :=% I- a& }2 S2 P' X) D I) b0 P
rgManager.nearestFreeStation(@,track.~);
9 Y& x3 ]- ^2 U, S5 v. \ newDirection(@);
; V: b, e/ ~* N1 v if @.Destination /= void then! C- w Q& y o' G& J
@.Destination.NumReservation :=
' ?6 ~7 L$ o( i6 i @.Destination.NumReservation + 1;
0 I' S' G4 `0 \+ V) x end;* A6 ~7 ~" N# j
@.CurrIcon := "drivingHome";
' B. K. N/ A( f @.DrivingHome := true;0 I3 y) N/ c8 M) A4 u& E* [
end;
. C6 {0 p: h; U( I1 j+ ?8 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 ]& b/ q; e" U% a( m4 Z6 y part := @.transpOrder;
: h+ H; J/ q7 t part.move(@);-- load part
; `! S: i' K% @6 P6 z9 N' o) Q( c @.CurrIcon := "load";
4 B, N& y _2 P' \ V. R( S! Y9 f GlobalDistObj := part.globDestination;2 s& K; G/ A7 X& n: E- l% y
assignLObj := rgmanager.rgAssignL;$ x3 x3 I* u8 E- E. j; j8 B+ K* F1 i
row := assignLObj.getRowNo(GlobalDistObj);
0 [: K H i3 }2 A: Y* _& L7 B if Row = -1 then -- since 70
( B: g" d+ ?: V if lan=1 then
% @& Q' C$ o1 ~1 d: O8 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* q' W# s. k) {" `6 ^6 ]
to_str("in der Andockstation: \"",?.~.name,"\""));
* Z# a' J2 ^) M, y! i1 F! c else1 V6 y* p( k& R! f% `7 h, {+ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; F1 H6 J0 Q5 W% v) _& Y, T
to_str("in docking station: \"",?.~.name,"\""));
, q. y5 d' N7 y# {; }" m! @ end;, p9 [- L# d$ J
else
, R. U% M/ k3 i$ l; C( J @.Destination := assignLObj[1,row];
! _" X/ A7 D6 n# Y9 M" s3 Q end;
# B( [- I$ D6 L. \; B4 \, @ newDirection(@); I7 B8 k0 n ?' W, Y% f
@.HasOrder := true;- ~2 B p- A& R! a
end;% X8 P( `2 Z7 j3 Y
end;5 O6 a/ w$ |; c' y* e$ v
end; -- of the method1 i! i' T; y0 ~# h
|