/* called by: entrance ctrl of the object 'track'
' t0 X, Q) f2 n+ |*/5 _$ L) t" x" y4 M% g
is
- R' m2 F( U. O# `6 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) u5 z# ^9 ]! C6 i, M% Ndo
3 N6 F6 b% w1 s* _) `( ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
" ]+ |2 N; B$ J& V if current = @.Destination -- else return# G0 j' u% {% D+ [1 \( o& e
then
/ e2 S9 @) B0 X9 M5 I @.Destination := void;) O$ t/ J- N1 V0 T
if @.occupied then
f. J* |5 S# w; o+ _: w part := @.cont;
- Y, z5 D4 c6 ]: U @.transpOrder := void;
1 ^8 B1 R2 h- Y1 g! G+ p" D: k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ~4 Q0 D& T" h/ Z3 p* T, _+ [ @,root.eventcontroller.simTime);: u# y: W" L3 D7 Y5 z& x
@.HasOrder := false;
" k4 v2 X4 j8 Q L g8 |2 s @.DrivingHome := true;1 \+ K# R; ]7 s5 R: s- f
rgManager.tryToStartTransOrder;
& k0 T7 H5 a1 M. D$ k0 E+ c! t, J if @.Destination = void
" m$ @1 [( M& {+ C1 b4 K then -- no transport order for vehicle @
* J$ p8 |. R$ m. x& { @.Destination :=9 Z/ ^, G' v: B" P5 Y2 n
rgManager.nearestFreeStation(@,track.~);
" }( A" Y4 o+ M* n$ P1 e3 u+ [ newDirection(@); " L' s( a) e; ?5 o: D$ t# u
if @.Destination /= void then
- J3 S0 f9 L$ I3 t# C B @.Destination.NumReservation :=. B7 H6 F/ M6 q1 A% ~( Z9 l4 g
@.Destination.NumReservation + 1;+ z! o/ W$ R3 o; h* {8 p
end;
0 T* L5 n: D* z: @- L, A @.CurrIcon := "drivingHome";
* L o4 w1 V: {) w5 E4 |6 x9 F @.DrivingHome := true;
( A/ {! a. {) B5 Z% N" \, l end;
1 e; t2 s! y+ { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" N7 |" S) R+ v# M9 K6 k% h part := @.transpOrder;( O. x& x. y7 ^. @' ^% R
part.move(@);-- load part
: |) b5 r% i) z/ ]$ q8 z4 J" C3 Z+ V. n @.CurrIcon := "load";
; @$ w9 B/ w% M GlobalDistObj := part.globDestination;
. o7 J# U7 e6 O& P% S e7 j, o6 R8 V assignLObj := rgmanager.rgAssignL;
8 ^. ?, S9 v. P& o row := assignLObj.getRowNo(GlobalDistObj);
: Z" M6 @" i; |" M: p1 a: u if Row = -1 then -- since 70' H, s" r4 n3 ~& F& j8 D- r
if lan=1 then
u/ B7 b' n' L# D4 ^" O; T1 w4 k/ N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) u$ Y6 @9 I% J to_str("in der Andockstation: \"",?.~.name,"\""));
" Q8 r. p) d5 N" V- ]2 ^ else: @8 ~- n5 m1 c; y( U6 r) F& y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) T) S% f& k8 J to_str("in docking station: \"",?.~.name,"\"")); " G. ]" g) f: d
end;0 P% Y! G5 O1 E/ c- i
else8 [8 F! ]6 X0 w: B
@.Destination := assignLObj[1,row];
" e5 ]3 g1 p$ V end; 0 M+ [# Z4 S: k/ F& D! B6 j4 u$ s
newDirection(@);/ n- g- A" b% ^! `0 p
@.HasOrder := true;
9 v: y2 \- ^! r end;
" V, F# z9 [. K- u4 H( {% D5 Y end;# Q+ l$ }2 u' o; M5 e/ J
end; -- of the method% v* [6 G1 ~ w0 f* m2 m
|