/* called by: entrance ctrl of the object 'track'# a' Z Z4 y; F5 S1 N
*/
/ G0 a2 Z& ^$ u8 t7 |/ t7 p! A9 N' Ois
3 ]0 E4 t. M y3 o9 O m! p) w part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 \& [! S' ^+ d; X5 W8 f2 U; N& s
do/ A) Y5 M5 j2 B+ _* g$ ]5 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 [* h L4 Y, G. {" k- k! i if current = @.Destination -- else return
% O$ Z* x& ]+ R; R5 \: D then
; h; ~( @% n1 p6 O5 C' Q) n @.Destination := void;
( F% \' d3 h; Y5 U i- P if @.occupied then# E& Q+ N: N' O' b: u
part := @.cont;: H) E1 j7 y i; [6 L' P
@.transpOrder := void;
8 E9 S9 ]! B" Q. Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; @' z @5 n7 j% y! Z$ y0 q
@,root.eventcontroller.simTime);- o! I, A6 j4 u& i; \. _* p
@.HasOrder := false;
! N9 n) L, V4 G. E1 @ @.DrivingHome := true;
8 R6 R5 A& m" F. M9 m rgManager.tryToStartTransOrder;
9 {& h- B4 s% ?( J+ Z- A0 h5 r2 F if @.Destination = void
. p _6 J/ v8 a `. W then -- no transport order for vehicle @
! j) P! U% y' K& T* R @.Destination :=
0 O4 T3 K, z( e' r- s3 @ rgManager.nearestFreeStation(@,track.~);
$ }8 s E# e( m1 ~ newDirection(@);
) r- b" Y' C! \7 g& l$ K R if @.Destination /= void then
: P! M: E3 k e$ H @.Destination.NumReservation :=
& v/ E% T( J7 j2 e @.Destination.NumReservation + 1;
% t$ x5 u/ y% e7 {) y1 A end;
0 C& G- p8 v" d9 C- U @.CurrIcon := "drivingHome";
- U0 J9 ]$ x% h# A @.DrivingHome := true;) j4 L- F( H! [1 ]
end;9 w) M1 l4 K* E' l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 m% Q s r! P' H; I8 y1 _5 m) C+ j
part := @.transpOrder;
j& T1 _, H$ J5 O& q part.move(@);-- load part
) Y; B8 ]% V8 B4 P& } @.CurrIcon := "load"; r+ p) l; w1 @+ _, G0 m
GlobalDistObj := part.globDestination;7 d7 G" ^# U2 Y) m6 v
assignLObj := rgmanager.rgAssignL;7 u* }; h1 O. X- x* u% n3 S; `! {/ Q
row := assignLObj.getRowNo(GlobalDistObj);& G1 o1 V! N. W1 S% q' }
if Row = -1 then -- since 70
# b9 O/ y* T" k/ K) T if lan=1 then* K& [& W( w; G8 S5 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( f$ W9 l$ P8 V( w" ?. f0 C
to_str("in der Andockstation: \"",?.~.name,"\""));. d: _- I. _( _# _0 u* l
else
! Q6 _/ a! E7 o: q( w0 D8 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Y% z9 ]% [' g
to_str("in docking station: \"",?.~.name,"\"")); 3 B- x0 k9 F# E7 i+ J6 o' U! W
end;
0 ~0 W/ `* Y8 c9 H4 J C4 w else- r% D% ?5 ^) Y3 y) h; ]
@.Destination := assignLObj[1,row];
* C' K* f; A9 l: ^6 J/ ]2 Z& W7 c end; 6 P4 Y1 F6 g; k3 S
newDirection(@);7 X/ s' [' C# S# {! C! z
@.HasOrder := true;, E' x$ H" _5 o! U( u- u
end;
, `4 O' m* k: e5 n end;
0 e3 L9 m+ T4 l3 ?+ kend; -- of the method
# R/ V* }- T$ I0 n |