/* called by: entrance ctrl of the object 'track'
) a0 T& x& ?8 [/ @7 N*/: I9 |, Z8 r- G; _. E- _& d- n; f
is7 V/ a* U& b, W$ H; O$ m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ M A# y* Q, z4 }* j
do
, Y( l8 `* V1 B P5 _7 n6 {" ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ^8 b! c6 d, z; ^! s if current = @.Destination -- else return
, Y: ], ]" D: H+ i then
' `4 }/ c1 {* b/ c6 t7 k @.Destination := void;# v6 j* @& `$ B: ~$ D; B
if @.occupied then
6 [+ }/ _3 s9 F part := @.cont;
; u% T: O5 q; S" I$ U! q1 } @.transpOrder := void;1 v* P/ Y, f3 v7 M; I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& d% {2 N& e2 J @,root.eventcontroller.simTime);6 K+ j; H; {3 S ^1 h9 u/ L
@.HasOrder := false;* \( b6 x3 \, x# K
@.DrivingHome := true;9 A$ z$ ]; \, v7 [+ y
rgManager.tryToStartTransOrder;
7 \. @8 \# |, b1 Q7 l if @.Destination = void) D: K2 B2 ? I/ S5 _
then -- no transport order for vehicle @" G# G$ S6 o7 _1 P% J
@.Destination :=8 w1 }% q# W( o4 \( h2 Z
rgManager.nearestFreeStation(@,track.~);" l n; |) j, j [; ^ Q
newDirection(@);
. z+ k5 Y* E8 C! n: g5 {6 _2 ~ if @.Destination /= void then; z9 e* b7 Y6 Q% Q4 k; h/ q
@.Destination.NumReservation :=, Q, T3 @( }! A! P/ B! S4 j
@.Destination.NumReservation + 1;
% w, g1 l/ _9 A1 t$ w0 U- |9 g end;: q5 {$ k# g& D! R' ]( B6 m
@.CurrIcon := "drivingHome";
- o& V( {0 [* r. n! c @.DrivingHome := true;3 o& t- K9 O6 r) V
end;: l4 }! h$ {; N- g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' p+ ^" p% {8 m( J$ Y8 Q
part := @.transpOrder;
( \5 K, \' p4 n" _ part.move(@);-- load part. _% b" j- _( v& z1 q
@.CurrIcon := "load";
8 S% @1 a5 u. z ?5 F GlobalDistObj := part.globDestination;/ m" i% W) W8 q. {
assignLObj := rgmanager.rgAssignL;0 q9 ], A& d" z+ c% Q
row := assignLObj.getRowNo(GlobalDistObj);; Q7 V: I; M% L0 z, W* \0 _. N
if Row = -1 then -- since 70
: p1 G: W2 M/ ` if lan=1 then8 {2 Q9 J* O5 T5 k" o8 R" p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) n0 {" @$ D8 I, h4 g. f v2 V& E! | to_str("in der Andockstation: \"",?.~.name,"\""));- i! d, [9 a, ~7 ?
else
$ z3 Q# i* N0 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) U2 z: `& G( I( J( b to_str("in docking station: \"",?.~.name,"\"")); 3 z$ U9 q+ g* A( o# l
end;
: z0 _8 L, Z/ ?- O S. Y else
- C( R1 r5 g$ C) I! d @.Destination := assignLObj[1,row];
$ R/ y* T! o" O! H& y end; # K7 j6 a, S# _
newDirection(@);3 ? P) K% K( ]2 w3 G0 f5 i2 q
@.HasOrder := true;
% o5 L, K3 ]1 S x2 I" z end;( m+ V1 K3 _2 D* ~( A; [. E
end;
. h" P* Q& E, ~5 tend; -- of the method# r9 i6 [9 E9 C; H9 Z a
|