/* called by: entrance ctrl of the object 'track'
$ L) S# N6 d, G*/
' x7 ^ v E1 q& X! Mis
% W& i8 X+ I: n& q6 m" x. Z: R- g: } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Z( X9 z" z5 ]+ ^/ ]7 v/ edo
: n6 |! ]9 A$ C5 T! u; U: F Lan := rootfolder.Internal.Tools.AOLlanguage;' }% |+ a& Y! D, e: n8 L
if current = @.Destination -- else return# I3 | n( b5 i F% B9 a
then
# a5 Q& x2 m0 s8 A! B" ]) t' D @.Destination := void;4 b) z/ H0 @. k& A0 r6 `/ u3 q, F
if @.occupied then
% e* C0 Z% ?" V N, U/ x$ a part := @.cont;
0 U6 @4 H/ B9 d1 k( z. Q1 q& @ @.transpOrder := void;
! O5 v8 s" s: s. Z+ |0 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; \5 h( [) b# {; q
@,root.eventcontroller.simTime); P* t& B) B. G# t T7 I
@.HasOrder := false;5 s4 z, W: I$ [; w
@.DrivingHome := true;
- c5 {' x1 c1 |! t4 v9 H b, Y rgManager.tryToStartTransOrder;
) Z! R% O& ]6 e/ U& p4 L* q. l if @.Destination = void
3 t V5 [9 Q1 b! s$ I2 Q then -- no transport order for vehicle @0 `- k( {. p _$ c7 H
@.Destination :=
" a6 ~1 y% H0 \4 {. S7 Q" N, t rgManager.nearestFreeStation(@,track.~);
) {* q2 v/ E0 i' [ newDirection(@); # Q _7 ?3 d1 a/ A
if @.Destination /= void then
4 A: [( k, T6 ?: q5 N @.Destination.NumReservation :=5 ^1 B( X% _! x# r$ ]
@.Destination.NumReservation + 1;3 d9 ?& I$ A6 H* W$ s2 U
end;5 N$ W' \3 T, y$ j
@.CurrIcon := "drivingHome";
# E% @$ }" ?8 Q; ^ @.DrivingHome := true;
' l% t% C3 D% q K$ L end; o, R, \) L- B+ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ]5 |0 Q- c6 S8 n/ P4 W part := @.transpOrder;
- S4 k/ Y2 c) E y6 E& S" T' c part.move(@);-- load part4 D7 W3 R2 Q W2 ]1 G v
@.CurrIcon := "load";
& m2 k( ^ z: U& R+ m GlobalDistObj := part.globDestination;' t# V( i/ ~7 @8 S+ ?
assignLObj := rgmanager.rgAssignL;
6 e8 G# L5 Q1 T; a( t- F/ K+ _/ k) |' j row := assignLObj.getRowNo(GlobalDistObj);3 y% n+ l+ A' `$ b4 `* y
if Row = -1 then -- since 70
' Z i% T1 i9 g! z) r6 |* } if lan=1 then
6 J5 U+ R7 T9 N6 X: K/ ]0 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
c0 Y; G: i$ P9 `& W" A( P to_str("in der Andockstation: \"",?.~.name,"\""));' D2 J4 P4 [$ G) L& ~/ h. m
else+ l3 S; a4 D: p+ z9 `+ L& q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ j* {- R/ c$ u4 E6 \
to_str("in docking station: \"",?.~.name,"\""));
: E$ }( j% Y1 @$ Z, X, V end;
" n! r. i+ G7 u% m9 @6 Q/ q8 I else, A9 D' _5 Y( j- ]& K l: [5 C5 V
@.Destination := assignLObj[1,row];; m7 `: m& H: ~. y
end; * ~4 z6 L$ Z3 g# j) t( V4 @) F+ M
newDirection(@);
6 `9 b7 S: b' z @.HasOrder := true;3 K! `2 X6 o- u* }0 V7 J% r
end;
' `# t, y7 m) h5 z' { end;
- P7 E- c% `) g' o% P. nend; -- of the method
0 K7 L e- U8 k: \0 L+ P1 k W |