/* called by: entrance ctrl of the object 'track'5 X$ f i5 P2 H* t `0 \# D
*/
. w( C8 N p0 r. J3 iis
# ?7 ?( r7 T" T! T part, GlobalDistObj, assignLObj:object;row,Lan:integer;: D# j7 S- S F3 u s; a7 S# [6 h* i
do& g8 I" p8 c6 X/ p
Lan := rootfolder.Internal.Tools.AOLlanguage; k( Z: z/ ^1 X* N
if current = @.Destination -- else return
* Y6 P3 v+ D) |1 [/ v$ E, |$ ~ then; ^) W0 e% d' I1 R5 s6 e
@.Destination := void;
& V* Z# D; ~& J5 x if @.occupied then f5 S9 y9 w' \2 A( a; ]$ d
part := @.cont;0 C- C2 K# o' A) W
@.transpOrder := void;
- M: F% M' c3 O; r" E- t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ j w5 J* l3 G/ o7 }+ w6 b( u4 `& K @,root.eventcontroller.simTime);, G& @$ ?! }% ^7 | E
@.HasOrder := false;8 w5 q2 L, J: A6 ?2 J
@.DrivingHome := true;) _. b# g/ u8 J7 B( {
rgManager.tryToStartTransOrder;
! w. @5 s7 k+ U if @.Destination = void+ h6 [( I* p* K" G6 ^2 Q
then -- no transport order for vehicle @9 X! p# x0 m: x, g6 j
@.Destination :=
* c6 s5 ]9 R" W' ?! ] rgManager.nearestFreeStation(@,track.~);
/ G9 H" Q( @ b newDirection(@); % Y6 b5 K+ Y1 g+ z+ O
if @.Destination /= void then
$ J% n8 r) }2 ~7 t3 q/ Z @.Destination.NumReservation :=7 y- K* f9 p7 g/ c5 i7 j d
@.Destination.NumReservation + 1;
) W! d# q1 h+ J4 P8 _3 T, \ end;. N8 O+ d+ I+ B0 b& i0 {4 Y! p4 [ d
@.CurrIcon := "drivingHome";" h% _4 k1 A" h2 E2 g
@.DrivingHome := true;
1 s( X% h( P: y4 @, A$ K% I. k G3 U end;
& L' x: ^. ~$ B6 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 I1 r9 F" O# g* S
part := @.transpOrder; \* }7 R( J& d0 N
part.move(@);-- load part
3 S5 u5 u* c2 Q6 \7 T6 r) x @.CurrIcon := "load";
+ f$ w1 [$ l! |# K1 h5 y; ` GlobalDistObj := part.globDestination;. w) f0 F& c' F4 D# t
assignLObj := rgmanager.rgAssignL;
7 z1 B( k6 N, h# Y6 K. l( @5 p row := assignLObj.getRowNo(GlobalDistObj);
/ F& |( G5 t1 ^1 e. Q( d if Row = -1 then -- since 70
# P' T" C- }( I* h2 ?% X if lan=1 then6 ]% ~! G5 |0 E( K! N* }# ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 |5 j0 K, q9 K7 t6 Q" @ [ to_str("in der Andockstation: \"",?.~.name,"\""));2 a0 n/ V4 D' s
else
% }+ e: o6 w7 f& n I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," W5 s9 V' K+ {- D% ~; Z
to_str("in docking station: \"",?.~.name,"\""));
: }0 n8 g1 F3 G! h- W2 ~% e end;- W0 J* u S: j$ `8 L. \9 p6 m
else3 ^ y$ `5 d* z9 I* J3 a' m! s! K" Y
@.Destination := assignLObj[1,row];3 M5 _1 ^# N: \- L6 k. l, D
end; 0 h- K0 D0 \+ ^% K% {% F4 w
newDirection(@);; K" A. g( i. T. Z8 U
@.HasOrder := true;! @$ _2 Q" k2 v+ F/ P! Z
end;
5 \$ A- } b/ _! M! J& v1 F end;* c) ` f4 X. \
end; -- of the method6 Z2 L1 @5 Q7 s% o w( F% E2 K2 z7 U) T
|