/* called by: entrance ctrl of the object 'track'1 P0 ~/ K6 A" o- }3 h! ^8 J! Z
*/' r, `( e% f0 v7 F' \, g* d
is
& h: [8 L" V4 ~: d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, p n" ? c7 ]( Cdo! `( \. X1 ?7 C* | h
Lan := rootfolder.Internal.Tools.AOLlanguage;, b- b/ W ~/ ]
if current = @.Destination -- else return+ s' ]) ]' L. s
then: `3 Q% ~: _- w. k
@.Destination := void;
1 \& t- u; h/ N. c1 U+ l, [, f if @.occupied then3 j& u# {8 h0 Z; j8 @7 ^* R
part := @.cont;
" A' c; T6 `5 [5 ?, v @.transpOrder := void;
0 R/ k4 G% ^/ I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 d: Q$ _- i8 ^, H! [2 T$ l. A4 @
@,root.eventcontroller.simTime);5 g3 V1 w: O4 a+ `3 C9 b
@.HasOrder := false;' R$ |: s" k. P* {: y2 W9 b: J
@.DrivingHome := true;0 d M3 f) ]& N+ p; q* c4 N* h
rgManager.tryToStartTransOrder; c+ y- ?4 A7 v4 t- ]
if @.Destination = void
8 h6 N2 h& l& | w" |" p then -- no transport order for vehicle @ B; w+ E/ b7 Z' Z% [0 j2 R
@.Destination :=% {" A$ ~0 J7 P% L; X1 W
rgManager.nearestFreeStation(@,track.~);
# O- J; e& d8 O' a. H newDirection(@);
* x) I5 H3 m$ c t0 Z/ ? if @.Destination /= void then+ z4 D6 p3 H- {2 R6 }9 f. ^
@.Destination.NumReservation :=. Q2 c) W. M/ e" z* R
@.Destination.NumReservation + 1;
8 z# r/ V, W v9 R; w" } end;4 ~. d3 Y4 H; G3 Y
@.CurrIcon := "drivingHome";1 \# c% b4 y) H% }3 ]
@.DrivingHome := true;& W& m1 c: B2 \0 N
end;
# |/ e3 u9 N; x6 c( z8 c* A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 z! U1 R( y$ h( p4 J3 J' ] part := @.transpOrder;; Y9 t; W( S F; E3 E
part.move(@);-- load part
- c) x% y- l F7 k1 Q' J @.CurrIcon := "load";" M1 M5 N& |# k# a: |8 d' [
GlobalDistObj := part.globDestination;# A" c7 F; H- q! v
assignLObj := rgmanager.rgAssignL;# w+ A. |4 a6 P; k; |/ F9 c
row := assignLObj.getRowNo(GlobalDistObj);" ~8 c7 J6 Y \; R
if Row = -1 then -- since 70( v& U/ t9 i& R- C# v# w! g
if lan=1 then
; X2 I6 V% F& q2 ?9 b+ ^8 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," w$ k3 `3 t E3 E) Q- n
to_str("in der Andockstation: \"",?.~.name,"\""));' }' a* t5 [) h4 j/ M; _5 j S
else3 G; [! O% H2 {+ S a+ f5 `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* B& P6 s. u* E8 L% L5 }# f to_str("in docking station: \"",?.~.name,"\""));
( B+ W0 c$ G) w; h end;
5 X" c9 C! s" b3 S* j: d% _- u! b else& A' [: q: T& T5 S
@.Destination := assignLObj[1,row];- E( I+ f& C/ J M
end;
9 g* D6 @6 d7 t+ v c+ A& j: A newDirection(@);: r% w7 J% `' I5 o! E
@.HasOrder := true;
7 ]7 e+ V, I5 S end;
- g6 Z1 _& x, ~; K7 [5 i end;, q7 _' k/ |" H& @
end; -- of the method7 Y% p" D" ?2 @
|