/* called by: entrance ctrl of the object 'track'
: f1 r0 B; U3 _! t; B*/7 ~9 w* o5 |' }3 B. Y2 j
is# i0 f% k! h3 {; {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 U1 d0 Q1 s% E# ^4 h4 ]4 vdo' B# R: z/ L$ u+ o8 e3 D
Lan := rootfolder.Internal.Tools.AOLlanguage;! G6 S# w/ V9 B# Q+ q5 _( a% [( O
if current = @.Destination -- else return
' K( ?! ^+ o8 y then: g4 h$ N) J3 G3 L1 P; |' Z9 V
@.Destination := void;
- F2 L) t( d z* x3 T1 B if @.occupied then
$ p+ ^. F+ X3 h, z# X3 z+ ? part := @.cont;
5 m" n( {+ q3 A, q$ v @.transpOrder := void;
: _0 r; X3 W+ O: r; y6 v* ? B, Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ]; R% o6 E* z+ S
@,root.eventcontroller.simTime);; E- O- Z4 `/ C% ?
@.HasOrder := false;
) k& i9 D" U- L @.DrivingHome := true;7 W, r% ]0 u; V; C" }
rgManager.tryToStartTransOrder;$ o3 a4 q9 s9 ^! z
if @.Destination = void
4 K. x/ ?8 Y/ J then -- no transport order for vehicle @7 I& ~4 v6 j" \. A7 X, H8 i3 s
@.Destination :=
# \+ C! C1 J( j2 F5 U rgManager.nearestFreeStation(@,track.~);' y* \ q& E3 \, _ X
newDirection(@); , }$ `4 s2 f0 z: c; [$ a9 V) J- m, p
if @.Destination /= void then
- Z; G. G6 g( T) \0 l @.Destination.NumReservation :=& B* X: W3 L* g
@.Destination.NumReservation + 1;$ B: Q+ K6 G8 }* _
end;
5 A2 J! C; y8 C8 d. H w4 d- A @.CurrIcon := "drivingHome";
/ i5 H: R( \/ p4 E8 u! z& q. m& h @.DrivingHome := true;
# \: ~1 f5 ?( I8 B end;1 {% G7 i5 `" P6 @1 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ a1 _4 O$ a7 W part := @.transpOrder;
# c9 \, i8 ]) l' S) j part.move(@);-- load part! o7 \( F0 }1 Z$ j1 w+ a
@.CurrIcon := "load";
. J" K. c0 W! _. u+ } GlobalDistObj := part.globDestination;. M3 y7 t c- w( f; r2 f
assignLObj := rgmanager.rgAssignL;" m) {- f, o1 f) c" l$ [
row := assignLObj.getRowNo(GlobalDistObj);. U4 {! m$ Y4 y4 R ^
if Row = -1 then -- since 70& A3 X: h4 n; u5 D6 a3 M2 [0 H+ q3 v
if lan=1 then
3 f' N1 O- z# O g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 J0 O( R7 e( I, z5 j- ~) d- z3 x
to_str("in der Andockstation: \"",?.~.name,"\""));
" D2 }" R6 p) K( f else
E/ q* Q& G9 \; ^5 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! _' G: b, W/ W
to_str("in docking station: \"",?.~.name,"\""));
: w. a ^% {9 c$ Q5 {1 J2 @ end;: ]. Y t- N- c/ e4 S
else7 _$ X1 _ W d: X: R6 m! W* @2 {
@.Destination := assignLObj[1,row];. B7 U; X3 s4 u, f" r1 i
end; ( @; ? M. } Z0 Y# {% x0 F- k3 i$ U
newDirection(@);
- v$ _5 d3 }4 L @.HasOrder := true; h7 ]# \7 R9 i& ~9 y" g
end;8 ]7 x0 a! h8 V# @/ H2 K
end;% X! E }6 P! F
end; -- of the method: U, \0 |- m) P. [" B
|