/* called by: entrance ctrl of the object 'track'
0 _( a* R9 | I8 t& \*/& d* W' V5 X) _/ H
is
7 s5 V3 j$ d: O part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 g, Z5 M$ l( e) J
do" n5 \) w4 }' u3 ]; T4 J
Lan := rootfolder.Internal.Tools.AOLlanguage;1 W: T7 Y; G+ _" R
if current = @.Destination -- else return
B3 U4 T0 y8 n. I9 h T7 f then
0 A7 Y" O% C7 t" L! ` @.Destination := void;
% d- I$ t. z7 \, e2 ]& g+ M2 ~9 R if @.occupied then
. R T9 }2 |/ h) B2 F% s part := @.cont;+ q0 P. u! q" f
@.transpOrder := void;
8 ` P! o. j7 ~8 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. x) s9 L+ U5 A+ }0 `+ v
@,root.eventcontroller.simTime);% H1 t: z5 h7 a* y9 L
@.HasOrder := false;
- X! v5 s5 Z4 j" S- S) x& v @.DrivingHome := true;
- o9 T R* U, m8 Z* i- M+ b rgManager.tryToStartTransOrder;- M- a" l$ l0 E8 L
if @.Destination = void
$ d% ]# o/ Q3 e* r ~! ^ then -- no transport order for vehicle @
$ L+ U+ R2 r0 H$ M, R @.Destination :=
" P" R6 r+ B( e+ u6 X" c rgManager.nearestFreeStation(@,track.~);; H3 p: ?4 G1 h& E+ H
newDirection(@); : k4 r& B2 L# f2 e
if @.Destination /= void then
! c, u( c7 F: P: V- d @.Destination.NumReservation :=
* H9 I- r; g$ e1 I' c" J0 I5 o @.Destination.NumReservation + 1;
: \0 V" a$ n6 [* p: c end;
% b0 h3 u9 D2 N6 U$ ?- u% g @.CurrIcon := "drivingHome";
; W( [- ?, u8 v5 ]) I) o/ z# y( L @.DrivingHome := true;: y- v. C3 i( @
end;, T# z* d8 r n9 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Q8 x4 T6 a' |) k) N$ m4 E part := @.transpOrder; X" g7 M: G) \# W
part.move(@);-- load part4 k7 H/ V4 h' t1 o
@.CurrIcon := "load";
- f* K: w8 G" b GlobalDistObj := part.globDestination; v; y' _0 J p/ H8 m' f0 d
assignLObj := rgmanager.rgAssignL;
# ?( z- w" O. f+ e& D row := assignLObj.getRowNo(GlobalDistObj);
# F' d' q( X) ?6 S ~( I* l0 g if Row = -1 then -- since 70
; }, N! z. D ?) z9 Q, m1 R if lan=1 then/ ]# W+ }% N l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ T# Z t' k- J" J8 k4 s to_str("in der Andockstation: \"",?.~.name,"\""));
) x& K$ I. y3 S else6 Q* N3 a' g; r& y; N, a4 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 V0 U- q5 G! D; [ to_str("in docking station: \"",?.~.name,"\""));
- n' B4 @% x- K s# Z end;& n; x9 j4 U' t( L% c0 _. Q+ o
else
+ ?4 l* R$ G/ I( O. r @.Destination := assignLObj[1,row];0 f- k' ?1 S9 q$ C! B
end; 7 Z: P1 F/ H3 b9 _ O* N4 H A
newDirection(@);8 ^( D& a5 @, [1 K. S6 Z. e
@.HasOrder := true;
* \* ?) I$ R3 m" b- M) K$ B& ~ end;: L9 e# z/ o3 E! [$ \, _+ S
end;- o% I1 X! `5 E; Q4 K
end; -- of the method2 Z4 i; o" x \
|