/* called by: entrance ctrl of the object 'track'' r' ^& f Q; ^; s0 f. x U
*/
) H" u4 r% g8 j! A4 j& c2 dis
- R% s" c/ ?% {2 c/ x1 p/ @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;! b; I5 P8 N C- D G. F% U
do: k0 l: K$ H, [- v) b/ F( C
Lan := rootfolder.Internal.Tools.AOLlanguage;
; ?0 P) o. y1 ? D( g1 q if current = @.Destination -- else return
9 l5 p. Y, W1 l* B/ e& _ then- R; ^- R% [, ] O8 k
@.Destination := void;
1 d3 P7 R9 Y1 j& v if @.occupied then
0 f! C& w( V5 k part := @.cont;
' l2 X1 t5 x x8 `, N" P2 q @.transpOrder := void;
v+ l* j! G4 t' Y1 o- D. F3 n$ s/ g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 A& E) l G- p
@,root.eventcontroller.simTime);
1 T: o! `$ V0 v: W6 s$ D @.HasOrder := false;
# C* F e/ R8 v7 E& f: s @.DrivingHome := true;
: `% F' k- U% a) z rgManager.tryToStartTransOrder;
0 a" i5 a0 o5 S* @4 O B/ ] if @.Destination = void
5 y$ Y* h/ F$ c5 Q, ^* J5 z8 T then -- no transport order for vehicle @6 t0 n+ d3 Q' |9 ^( r2 ]
@.Destination :=
7 G: r9 n) g$ {) d; ? rgManager.nearestFreeStation(@,track.~);. x( b, M$ P5 h/ C- m% q9 j/ A$ h
newDirection(@);
# P7 t: j7 M" Q6 H& I9 d: r if @.Destination /= void then0 K% a! I1 n" d. r3 i
@.Destination.NumReservation :=9 r- S* [% W3 s! D9 l: F6 h! ]# I+ i7 ~
@.Destination.NumReservation + 1;. e* K' W( h3 R- d8 w! x
end;
6 U6 m+ C8 s) X- M$ T) l: |* f @.CurrIcon := "drivingHome";
# r* D% G$ T; C7 H5 R! N! P1 I @.DrivingHome := true;
4 m% k& h! r( `2 X$ ?" T end;
, H! W; n3 e5 d9 r, o else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 O9 C0 {$ S- n* O" L
part := @.transpOrder;3 p5 [ c g* r3 D
part.move(@);-- load part" J' H1 O, P% P3 m
@.CurrIcon := "load";
) Z* D" B' @5 W GlobalDistObj := part.globDestination;8 q/ ~- u$ G- b4 N
assignLObj := rgmanager.rgAssignL;8 H; |4 Q* m' N8 q" m7 y5 g
row := assignLObj.getRowNo(GlobalDistObj);" P' r- w0 W$ G& ^
if Row = -1 then -- since 709 B1 D& g5 }, r* k, z3 \
if lan=1 then
" O% s( j) d% K4 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Y0 E4 L# C4 v- ?
to_str("in der Andockstation: \"",?.~.name,"\""));; J2 ~5 ~+ ~' p& o& w3 [
else; H/ M. d5 A6 w2 s8 s7 v m9 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, U( b8 l9 p& [. o, C* Q1 Q
to_str("in docking station: \"",?.~.name,"\"")); ' H/ t" G( B7 Y% o# L- k9 V" [
end;/ T5 R" l3 Y4 p# Q' s
else' M+ m P" R7 q9 w- x/ w
@.Destination := assignLObj[1,row];
; P6 W7 i8 r7 a, R: G end;
. _/ Z( b1 o, {0 b( }+ f3 N: I/ e7 M. z newDirection(@);
( h) d) S7 F3 [ @.HasOrder := true;
6 f7 s7 _ V$ J/ D4 G: t3 O end;
# u8 i4 K7 Q# ~. J end;0 s0 A. V8 ~1 H& ]1 \. y( q
end; -- of the method
8 ~- C2 j# ?4 C/ `$ N |