/* called by: entrance ctrl of the object 'track'
2 M3 t6 W& c7 B Y1 W*/
+ I' E9 |# C% W3 P" s' r+ Fis& L! P( ?% p) z, y! ?" q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' A2 Y4 v* b4 z, N- ?: tdo d( W) |/ ]$ I: B6 m! v
Lan := rootfolder.Internal.Tools.AOLlanguage;4 \' y9 K1 r y' d( P
if current = @.Destination -- else return
7 n6 j! N+ g8 @0 l& C then
8 `4 Y- S! s. x @.Destination := void;; J4 p" p( Z9 T9 X$ N) U+ h
if @.occupied then
7 Q6 n& ^/ [6 x% d6 o e part := @.cont;1 d3 y" c; h( N, C
@.transpOrder := void;
! z/ w, [6 S( }& x% \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 a' {" T% [& K# R; m
@,root.eventcontroller.simTime);; c- j: I7 |" g: q2 p0 X
@.HasOrder := false;. P+ }3 k3 j: \2 x6 c
@.DrivingHome := true;# U! [) R2 q) E# \
rgManager.tryToStartTransOrder;
+ B$ t4 q+ O' }9 V if @.Destination = void
/ u& ]- |3 @& ~$ G then -- no transport order for vehicle @
" s4 n2 G- E/ Y# i8 M @.Destination :=9 G; W5 G- ]8 S" g9 C
rgManager.nearestFreeStation(@,track.~);
2 L' v/ O% @% D, h' E0 p newDirection(@);
' S5 H! M$ l" P. J4 A; P if @.Destination /= void then) t- Y( R8 y4 f. k' [7 B4 s) m
@.Destination.NumReservation :=8 z* o) Y9 o0 F) p
@.Destination.NumReservation + 1;1 r( U# v- k# [/ f. ?
end;
+ E, }/ s0 Q: [6 k1 U8 S/ o/ O @.CurrIcon := "drivingHome";4 r1 U) U3 O6 Q8 [/ i
@.DrivingHome := true;
* ], w$ Y$ V9 Q5 _: R: r end;6 V9 X3 Y. ~) J8 ~* m4 ^) y5 v* @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) h' E7 s0 ^& b4 h
part := @.transpOrder;7 R3 v- m4 f" B% j
part.move(@);-- load part
* ~; m- |- ? _4 W: ?$ p @.CurrIcon := "load";7 y5 a, ]& Y8 y J& ]/ C3 Y5 j) x
GlobalDistObj := part.globDestination;
1 `9 N4 w% n2 J1 ~- | assignLObj := rgmanager.rgAssignL;
& f3 C3 q8 a6 z2 o. \& | row := assignLObj.getRowNo(GlobalDistObj);
# S8 Q6 h5 u2 V0 s if Row = -1 then -- since 70; O1 Q) M" @% J" O$ x" ^
if lan=1 then/ v. z6 y' u0 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R; A/ y8 g* O4 Q5 f' i$ |% { to_str("in der Andockstation: \"",?.~.name,"\""));9 {5 l% |3 U6 e, [5 ^& q: L
else$ I1 O6 Y2 `2 n# z. s+ S$ c4 d+ A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- L% O0 O: t, G to_str("in docking station: \"",?.~.name,"\""));
" p6 s6 M3 H( a" b$ C end;# d; W) n% ?4 S0 v" t+ L
else6 Z; t+ O3 O+ [8 z9 W+ i
@.Destination := assignLObj[1,row];
1 |8 }' m7 A4 @/ r$ E" [ end; - }$ @: t5 d& L% M
newDirection(@);
$ S/ A( Y% t/ h4 @: U1 a( @8 ?; v @.HasOrder := true;' P3 S$ H' n9 y" S
end;, P5 e& z) b1 S; m* E
end;1 H4 c# p$ k! p6 j: ?+ U4 U& R+ U
end; -- of the method
8 _9 f- j \; g- B5 P |