/* called by: entrance ctrl of the object 'track'
( ]& a2 m) J; B*/3 w; g: T5 [" h4 ?
is n+ F8 o1 N5 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# a' G" H9 m% G0 b6 r* `& J( q
do
* a$ |. U' D) }4 T4 ^4 o1 i Lan := rootfolder.Internal.Tools.AOLlanguage;
3 u0 t! G' S- r/ E/ p. V) @1 g; F2 Z if current = @.Destination -- else return' I" h% x. y0 ]) q
then1 Z' c1 f; ^ V0 k) n* A9 \
@.Destination := void;
0 J( ^" L" T; E" N! S/ \, T9 Y if @.occupied then
! _( Y2 E3 a) O( _% u part := @.cont; {* W" M$ |/ p! T1 C
@.transpOrder := void;
6 y6 B% l) [0 S/ p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& n& t9 S$ y/ s0 m0 } @,root.eventcontroller.simTime);
4 C7 M2 E6 T7 r% a) I8 V/ @ @.HasOrder := false;
0 Q( @1 h. Y( O: K7 s' k' P" ^+ Y @.DrivingHome := true;0 R3 Z! Z- O( r4 b8 c, k
rgManager.tryToStartTransOrder;! ]) {& D1 @3 |2 T1 N2 d) k
if @.Destination = void
' R$ b% T2 J9 {7 g6 @8 W3 @ then -- no transport order for vehicle @6 j' W4 I, [- s2 L
@.Destination :=
( m4 T* P4 c" ]3 q rgManager.nearestFreeStation(@,track.~);
' E" k3 \5 w1 [& I8 j' t' W5 z newDirection(@); 6 c% ^# o* p& b# v, V
if @.Destination /= void then
6 s5 M& g" G# f3 E% l, r @.Destination.NumReservation :=1 N3 o/ M+ V5 @# ]0 ^* |: Q$ ~7 i
@.Destination.NumReservation + 1;3 u3 u, p$ F' @
end;
8 n" @3 Q' \: U @.CurrIcon := "drivingHome";3 f% f- Y& F$ p- F7 G7 j' x: E) D
@.DrivingHome := true; D& `& c/ k" @* x# m
end;* [" O3 |) y/ U5 K( N, h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' I* R# ?' l2 g" a) A5 G part := @.transpOrder;
6 U1 M& l4 Y+ N; H part.move(@);-- load part
9 z4 w% t. O9 Z0 V8 B @.CurrIcon := "load";5 ?' R. L4 e+ G4 g @( V% w. h
GlobalDistObj := part.globDestination;
% W6 c$ b% M' c4 d. ~% L! p" w assignLObj := rgmanager.rgAssignL;' h3 h5 ^; J# E) X0 r2 w
row := assignLObj.getRowNo(GlobalDistObj);4 i( _. x. C; T. |+ J( r. c: e3 y
if Row = -1 then -- since 70 `+ N( d6 @! w/ x1 j( V4 ?$ i
if lan=1 then/ S7 p. w( @( k. C/ z& D6 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
t$ \9 e. g8 ` C+ i* Z# _, u8 ] to_str("in der Andockstation: \"",?.~.name,"\""));
% o) |8 ]6 e# t% @1 ^: e7 _* \9 h else
5 o2 i# X/ E: `% r& ~2 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ j& q; h* D1 o( c4 S to_str("in docking station: \"",?.~.name,"\"")); , v H4 i. V! a. L }0 a$ O
end;
, x0 ]5 Q& D& H; L4 k1 s) d& s$ u else
- |$ b( C) d0 [* n( v3 n6 g @.Destination := assignLObj[1,row];
4 e& `( b( Z$ `9 r' _7 [7 @ end;
' @& V5 ?2 m, H: Z6 i) f newDirection(@);
$ O" o5 M, F1 ]' T, v, S9 v& D @.HasOrder := true;- g+ V" F p8 f7 \! ~! \$ h. \
end;! E$ F% l/ G- [$ u
end;9 o }. n0 b* P6 u, q$ ?$ a
end; -- of the method5 @; V/ k% t% s2 k, P0 z( l
|