/* called by: entrance ctrl of the object 'track'' A. n; H: J. Z% S
*/
3 q4 r& j1 y- V" L- w8 |is* @& k% b! S& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" n4 r5 a1 N6 [do
& [9 D) g" F6 R! M | Lan := rootfolder.Internal.Tools.AOLlanguage;" u: ?! z) D7 b! r+ D
if current = @.Destination -- else return3 [; R+ D; d" e$ N( `+ i
then* ^! k) m6 o; @; Y
@.Destination := void;
1 a* e9 J3 H8 g) T# i if @.occupied then
) c6 ]$ O) X1 G' ~ part := @.cont;
# {. r, ^, ]1 f* _( m2 p2 q @.transpOrder := void;
0 q5 T$ Q5 C! z# Q8 z+ M2 ? w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 W5 z* ^; C1 Q& b5 ~/ @
@,root.eventcontroller.simTime);
8 N& R# I7 k9 _* k. ] @.HasOrder := false;
) m% e2 K- _ w3 A4 O7 S: }7 ~' Q9 c( w& e @.DrivingHome := true;1 l2 }7 @9 K) F: M# o1 D( b( b
rgManager.tryToStartTransOrder;
1 |5 ^. l. f6 [& o5 n) w! s if @.Destination = void. Y8 M9 a. P' `
then -- no transport order for vehicle @
. ~5 e7 j4 m& d8 t4 m4 ]5 t) I @.Destination := A2 l" M- H& x' Q8 j2 w' ~
rgManager.nearestFreeStation(@,track.~);1 \3 S5 G* f% \2 U* j
newDirection(@); ; j1 R3 j: r' t8 s6 E) }+ M$ w5 X
if @.Destination /= void then' h$ a! T. z% ^9 W$ g" c7 `" K
@.Destination.NumReservation :=. t5 F" J+ b0 r$ q. }' Z
@.Destination.NumReservation + 1;! Q/ J& W; B, t8 U) c; p8 u: h
end;" c2 n2 E1 z" B8 E4 \. H3 r
@.CurrIcon := "drivingHome";0 y* ?( ~3 F9 ]$ H# m2 j
@.DrivingHome := true;
: x' b& W7 T; m. u end;
9 w$ t" v& S- g else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c$ b- U& F6 L0 V3 @6 S- g4 [
part := @.transpOrder;) q: I2 L$ k6 I- ]6 ?
part.move(@);-- load part5 E8 t3 Y$ ]6 v+ l% J* r- D d
@.CurrIcon := "load";" B3 H/ J7 i7 D5 v
GlobalDistObj := part.globDestination;
9 C1 L; D2 w+ d+ s1 N: ]' o. z assignLObj := rgmanager.rgAssignL;
( t& d, K. @. @& I3 u, ?; p row := assignLObj.getRowNo(GlobalDistObj);. C6 r- j$ U+ |$ h+ H% L, e+ U9 w/ |$ s4 }
if Row = -1 then -- since 70; b2 E$ X" n0 J
if lan=1 then! t" w+ Y% p G+ I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ]$ l0 X! [4 y8 ^
to_str("in der Andockstation: \"",?.~.name,"\""));! m; I( ?5 R9 _: `
else
2 r0 s! F5 M! L, s" { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: U; v' R2 L3 x! H' a
to_str("in docking station: \"",?.~.name,"\""));
3 Z8 h' F) W! l; K } end;2 s7 k6 u" U" M3 v* U
else
. z( E4 k w0 l$ E P1 `. c @.Destination := assignLObj[1,row];
# P1 W5 X6 P8 J end; * v& P/ D* I. ^5 l3 m& D; F
newDirection(@);% D# Z( `9 d- B! Y' a
@.HasOrder := true;7 a3 Z& t+ J2 R
end;6 G! l. ]: i; x3 l& a' x# X
end;
6 A) W1 H6 [% h$ ]3 fend; -- of the method
. P a* i' d" q; l |