/* called by: entrance ctrl of the object 'track'! k* |3 x1 S2 e& p
*/
: B, H, w% D' a# b9 w1 H7 zis
" s: J+ r% i( }' B part, GlobalDistObj, assignLObj:object;row,Lan:integer;- c! ?' A! ^! }% \1 z. L/ a2 b
do
i' _ N7 `. k1 C0 a& t1 N; u Lan := rootfolder.Internal.Tools.AOLlanguage;4 T; e7 }' }2 i8 ~& v5 k7 Z. r/ n' d
if current = @.Destination -- else return- ~4 V' r' S8 J2 g: D
then' N( X% X2 e9 R6 ]
@.Destination := void;" _- a4 @% y, b* b4 J- q9 m/ P
if @.occupied then
( M$ ^" \; ?) g7 U part := @.cont;
, w) d# W! V/ N" T7 V @.transpOrder := void;
( G; j% F" G, M9 ^1 @# {% _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ]+ q+ W8 r* R1 y
@,root.eventcontroller.simTime);2 U6 |$ d, s1 M# x
@.HasOrder := false;
1 l4 u% J$ Z( p1 I @.DrivingHome := true;1 a n q! _8 P6 U) R
rgManager.tryToStartTransOrder;) ~% ^4 [- z3 F/ ~7 @
if @.Destination = void2 q! m. q3 ~ c6 k0 `; r! b% d
then -- no transport order for vehicle @; g% S! F2 Q# H. N' w
@.Destination :=/ I& i1 ?' U: c R. x! Z5 J
rgManager.nearestFreeStation(@,track.~); T! ` F/ X/ `
newDirection(@); ' E; ^6 U5 k4 } v
if @.Destination /= void then
% u" H2 ]2 k1 y- O1 q0 H1 p) R @.Destination.NumReservation :=
8 _& R" I1 q9 X L6 r: g9 f; c9 o @.Destination.NumReservation + 1;9 D( [0 E9 S _ B4 S
end;
% T! X) { a1 j7 e0 _, v @.CurrIcon := "drivingHome";: g- G& o: }! L. E
@.DrivingHome := true;
' f6 a, m/ h: _* u; C6 S! M+ b% q end;/ \0 S+ q" K6 q" |2 a: I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ^ [9 E- u. |, d; X. Q) z
part := @.transpOrder;$ `+ r( c4 [5 [) U1 n
part.move(@);-- load part& x! s- V5 T7 P/ w
@.CurrIcon := "load";# R; ?& _ O- V8 W Z( Z3 ?! Q/ y0 \: _
GlobalDistObj := part.globDestination;5 d7 R" I9 ^% P! Q, v* a/ ]& N3 u
assignLObj := rgmanager.rgAssignL;8 `4 i @5 J" K, ]6 V. C
row := assignLObj.getRowNo(GlobalDistObj);3 u1 d& `) m! Y
if Row = -1 then -- since 70- {* G9 H; L6 a# x5 ]
if lan=1 then2 P9 o u6 o" O" b$ ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' W) h0 @8 D$ l" o: ~4 F) u
to_str("in der Andockstation: \"",?.~.name,"\""));: `; `3 Y* [4 a X+ Z# e
else
: s* I$ O+ B' D) N' y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 `0 p4 j- L+ m8 o' R
to_str("in docking station: \"",?.~.name,"\"")); 6 `2 L8 C! e: ]6 p
end;, C* h) \2 I2 C! n/ v$ j3 b- k' L
else. w# t3 w$ B4 L& o
@.Destination := assignLObj[1,row];
) z+ \; n, t/ n: r6 j end; ; e$ R6 D2 C' k: V
newDirection(@);
) L9 ]3 A2 E" ~ A x4 Z @.HasOrder := true;9 k- ^& m# }1 I/ ]8 o- h
end;
/ W5 E- G: s4 I( p end;
: x, F$ x- p3 k0 y- t D4 v3 wend; -- of the method% M) b$ a7 S# V: x
|