/* called by: entrance ctrl of the object 'track'
$ c: D3 z5 n- X* E2 U; Y5 r' ]% @*/- f" ?, g" V6 U9 q: f5 K7 t& n- u
is
4 v& b) Z; ^5 I8 t% F6 \; C, l( v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; f* G2 V5 h$ d8 q1 M6 }; y: Zdo2 H2 q) Q! ]5 w& x
Lan := rootfolder.Internal.Tools.AOLlanguage;" f7 N: f$ ~4 O. a9 L) ]1 F
if current = @.Destination -- else return: I) G$ `' V8 q
then3 S z# r- \8 U2 l
@.Destination := void;
) V' E# E8 T8 P) Z if @.occupied then) G+ _6 X M7 m; }1 o
part := @.cont;, }* G5 c( X" x- s: x
@.transpOrder := void;
- D7 _2 o9 N& I1 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ k' Y5 H. _ u( v9 M, P* }7 H( Z @,root.eventcontroller.simTime);
; U5 y; ~* S9 W) u" w+ A" \6 s3 P4 F @.HasOrder := false;
* a+ a5 t8 M8 d @.DrivingHome := true;
" e4 J% s( f, O+ O rgManager.tryToStartTransOrder;3 f9 K0 `+ X, @; x# G6 ?. F: U
if @.Destination = void$ S- m9 w5 e; i4 S" J' L
then -- no transport order for vehicle @9 i4 P) J5 d( H0 J* B
@.Destination :=
4 y% [9 Q) X F% o rgManager.nearestFreeStation(@,track.~);, }- P" A% j# E- C
newDirection(@); ; E$ f J! i5 [) K9 U* a& Y
if @.Destination /= void then
, S" h# N6 Z% m @.Destination.NumReservation :=! z* J' i. r+ L7 Q% A' Q! [$ R2 \
@.Destination.NumReservation + 1;( G3 T0 M& Q, {1 V/ x8 R8 D- l
end;* I) l- x8 D3 c' l4 j% H: i
@.CurrIcon := "drivingHome";
: k1 Y& w) N2 `8 s @.DrivingHome := true;7 V2 h: {& X5 k
end;
( o/ ]" I! s0 j5 e0 e* d else -- the vehicle @ is empty, both vehicle and part are in the same dock station, u4 O! \" m5 z
part := @.transpOrder;
9 q# Z' w0 t+ P) z3 ^. X3 f1 n part.move(@);-- load part7 O( K3 c! L V0 R+ u
@.CurrIcon := "load";
5 _- F: V7 N& } L GlobalDistObj := part.globDestination;
& |8 t G! \ O1 W. f assignLObj := rgmanager.rgAssignL;; z$ F/ y4 m: x
row := assignLObj.getRowNo(GlobalDistObj);0 t$ Q4 q, C3 r
if Row = -1 then -- since 70
1 Z8 h n5 h4 | if lan=1 then
2 J7 i$ @5 ^9 j+ T2 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 t1 d+ s! k N6 V; X# N6 w% ]
to_str("in der Andockstation: \"",?.~.name,"\""));
$ {1 q; D& N1 s, C, R4 m* Q else
5 d. d" H* u' G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 O4 ~- t" X1 J: ]6 j0 Q9 v to_str("in docking station: \"",?.~.name,"\""));
0 l7 y* K$ B) [, x+ q+ ? end;" l% d7 M- c- n0 c4 j7 [% N1 l4 U
else
& E# I* m, B2 _ @.Destination := assignLObj[1,row];
6 R4 z% X# S d$ r2 P! j end;
( i6 T3 o& R: m- S6 R5 @( l+ B1 t$ v newDirection(@);2 a6 S$ i# n: A% h
@.HasOrder := true;
0 l" [7 b6 X, c. ~ end;0 E D4 `' o- f- q1 Z) b7 l0 N
end;
0 D/ O, J: [8 O! I9 Zend; -- of the method. H2 } H+ E# f% y% K+ q
|