/* called by: entrance ctrl of the object 'track'
- [1 f' y( D" H& ~, l*/
1 |; o/ E) K( F" j! Mis
. w! `5 p! W6 T( M8 |/ ]. T part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ^" m$ d2 }1 S: Q
do8 M7 t) O; ^7 g }7 p! R+ A
Lan := rootfolder.Internal.Tools.AOLlanguage;! k8 K+ e7 z w1 O# `) l, B5 _
if current = @.Destination -- else return' j; F1 |4 I/ M3 d( v
then$ Z( S2 @: P- @5 ~$ v
@.Destination := void;) t: r$ g, {0 I5 r/ s) v7 o5 ]
if @.occupied then
9 K/ N' t- o" L- a5 c. J! B2 i( s part := @.cont;
8 l; A7 d. ]" h! S0 `) @8 g& q$ a @.transpOrder := void;# T( t) b! V! X. ?( f* m* o/ D: A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 g( s* G8 d! c# c @,root.eventcontroller.simTime);7 {2 O) V3 @0 @0 Q s! r P
@.HasOrder := false;0 }0 l4 b. O( ]2 @$ X
@.DrivingHome := true;
! D1 ~8 f9 O9 |# @, m rgManager.tryToStartTransOrder;% o% @; z6 l2 Y1 a" m
if @.Destination = void2 c% A) A( G" t0 Z
then -- no transport order for vehicle @
( R; K1 j' \+ I8 a @.Destination :=
1 U6 K5 t; O% p$ Z' ~6 `7 q0 u rgManager.nearestFreeStation(@,track.~);4 i) Y8 C4 u+ Q1 y: @. U
newDirection(@); 3 r7 L& Q; G9 S ?# q
if @.Destination /= void then% A' d# A- M& f/ L3 [$ v. r/ K
@.Destination.NumReservation :=. u' e* W4 \$ g: [+ E) b
@.Destination.NumReservation + 1;0 z# V$ m7 q, T! [
end;
4 Z2 b* f3 D# {% u @.CurrIcon := "drivingHome";$ a* E. \* p2 D. {, I4 Q
@.DrivingHome := true;1 Z4 |: j: }, \
end;! w' b6 H% Z3 T& I1 |+ ]2 r) F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 O6 P3 z/ [) y
part := @.transpOrder;
* ?! C2 i0 C$ F- C. j8 F part.move(@);-- load part
1 Z. R+ o- d" u, X! ?/ { @.CurrIcon := "load";
, l8 g2 J; p* m2 z" P8 s- ~ GlobalDistObj := part.globDestination;
/ b, n( z. e; K. Z- b2 A assignLObj := rgmanager.rgAssignL;, m" g3 @, j1 \
row := assignLObj.getRowNo(GlobalDistObj); U( J0 q8 w/ f
if Row = -1 then -- since 70" u2 ]1 u" {: q
if lan=1 then. A! N4 r+ Q" D o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 h2 F2 i4 `% l9 J/ z8 B$ H to_str("in der Andockstation: \"",?.~.name,"\""));+ A0 O2 {% \5 w
else1 L; i/ V1 n$ W7 D3 C! v3 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# T9 R. Z3 u& E# x+ F6 c$ J0 G) A
to_str("in docking station: \"",?.~.name,"\""));
) q# D+ g: H8 B, T1 z7 m' n end;% g2 n- N7 f' q5 V' Y& t7 }
else# y* A( w. @8 Z1 n$ I* z6 a
@.Destination := assignLObj[1,row];
" ~8 Z' a% u7 T# B4 ] end; 1 R0 J8 g- Z7 c; ?
newDirection(@);
T0 T$ H( ~3 c) t0 @4 u. t2 E @.HasOrder := true;
. r" ~) {2 Z+ c l+ f end;
: J% k3 K! n5 k+ O* V( b end;4 l( U$ |7 O* [/ [' T r
end; -- of the method
! A( c8 ~7 o5 f& U) \8 k |