/* called by: entrance ctrl of the object 'track'
+ y2 X! Q4 T7 ?- r4 a7 p1 d4 [, H*/& g1 ~6 r4 ]3 Y5 ~& s
is+ P% K( F- A; ]0 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( _/ K n$ L( o# u! Y3 Y3 ]do( G0 e) ]6 I. E! h+ H
Lan := rootfolder.Internal.Tools.AOLlanguage;
! o& x8 S- F" y! n& ^3 b* S. T if current = @.Destination -- else return
" W0 r! Y, i8 ^, v2 S then
( ]$ c) O$ _! L- I9 Y. Z# A @.Destination := void;
! P6 _" n* d* Q v/ p if @.occupied then
. I" ~& |& D0 Q) _6 w% K part := @.cont; M* R% d* R3 T0 ?4 p4 Z5 o
@.transpOrder := void;
2 M& z* t1 w0 U+ {' [2 \+ \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 k5 v) e: a6 N1 k d8 N @,root.eventcontroller.simTime);
# T) q" h5 E; u% V+ ]/ H6 b @.HasOrder := false;1 [, z6 _/ H! x7 m6 w
@.DrivingHome := true;
+ a- ^2 t- \ s# \( M3 W rgManager.tryToStartTransOrder;6 d) F/ i9 Y2 @1 f( j4 s8 X* T' k
if @.Destination = void) M$ F t% Q _: ^
then -- no transport order for vehicle @
$ K, _" G. Z3 J8 s5 E |9 k @.Destination :=$ L! m( ~+ k) i9 y
rgManager.nearestFreeStation(@,track.~);
' ?9 T/ L! ^( E( d5 H* K newDirection(@); j2 X" E3 A6 d' {6 y- v k
if @.Destination /= void then
+ ]6 _ L/ f- i6 z9 b @.Destination.NumReservation :=% P% c9 f& z# V; b' e' r. X
@.Destination.NumReservation + 1;
2 M5 p6 G7 }* v1 l5 Z end;# H8 E+ H$ D- `5 h. {. J
@.CurrIcon := "drivingHome";
" I+ l' ]8 w: ?9 R8 k4 D# @! ? @.DrivingHome := true;
/ b" ~, |5 b' z7 Z% |7 N3 A$ O end;
1 b$ L1 J* u) S; _% u! } else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 u1 S6 S& m6 p
part := @.transpOrder;! q4 R3 e9 l& R; ?- Q" t3 I7 P8 H
part.move(@);-- load part) i& \/ k4 A. P
@.CurrIcon := "load";
, B2 R8 Z0 K7 T) v! g9 f GlobalDistObj := part.globDestination;* p- v! y% S% A
assignLObj := rgmanager.rgAssignL;$ e4 d; U5 \/ x
row := assignLObj.getRowNo(GlobalDistObj);
! N8 ?2 B$ w; B2 @ if Row = -1 then -- since 70! B! r. N& _) r8 K: x" @8 V$ L
if lan=1 then: D; U( `% C) |) [6 t; d4 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* f! n3 D* s0 h) n
to_str("in der Andockstation: \"",?.~.name,"\""));
; ^- r- d" u# t6 ~2 ^ else- B- @9 X6 A: D+ T1 j' W0 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," }5 T% P0 d ~! v) B
to_str("in docking station: \"",?.~.name,"\""));
* d! N7 h8 {2 j end;
+ _# r" D% ]/ R7 N7 M( { else8 v# d' l g, {& l% e! E( e
@.Destination := assignLObj[1,row];8 G$ ~% [" L% E
end;
$ {7 v6 C! f9 K* @1 P newDirection(@);
- t7 @% U: u0 _2 U' t4 B @.HasOrder := true;7 Z' y- E: c9 A" H2 T D
end; a+ S# J2 @# Y' P$ G
end;
# ^ B; z5 W9 l" L6 Z& bend; -- of the method' P! f1 |% J P7 _% M
|