/* called by: entrance ctrl of the object 'track'
9 O4 g8 |0 z0 H( Z ?*/ p, f/ y5 Y* Q9 R% o
is
3 j( y9 N+ A J4 l8 U3 t. n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. t8 t& I% J* M- v" p* m7 Fdo
9 M! j" O) \4 j2 b4 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q1 w: |' P6 A0 a% K0 r$ b6 W0 U if current = @.Destination -- else return5 B# F8 L r$ |. t' ?( O
then
, B }' M; o# I* \7 k h1 W @.Destination := void;/ |; l" p/ a8 D6 Y! a- m
if @.occupied then
1 [5 M2 D p# p/ }; q$ H part := @.cont;
* O( p6 D9 ]* T. N; D @.transpOrder := void;5 }5 [- P/ t6 Y- K- z6 Y9 `- Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Q, h7 E s- M" P9 D; a1 @" r
@,root.eventcontroller.simTime);+ Z/ S2 Q: k' x, N+ g6 \
@.HasOrder := false;
' U6 \1 M+ g5 ]/ z" O @.DrivingHome := true;
4 N. z5 l- n* O/ ?. m9 f! o* w rgManager.tryToStartTransOrder;
& o z1 s S2 m5 ?, H3 g if @.Destination = void* _. Z, e; J* l* Q" q0 g4 r
then -- no transport order for vehicle @( {! z/ N0 y* T& K
@.Destination :=
* L s5 Q: X4 d" V' e- K8 `# y6 C; \& A5 e rgManager.nearestFreeStation(@,track.~); m% f( t3 b: L' N! P* j2 K. o/ v
newDirection(@); 9 ]$ [9 p4 L" `/ j, [
if @.Destination /= void then1 R+ @) h$ L6 u
@.Destination.NumReservation :=8 k0 S( \6 [9 E+ h% B
@.Destination.NumReservation + 1;
+ F) a. p* ~; H$ G5 ]* S' A# ` end;- f) s: i7 l% P ^0 m7 A
@.CurrIcon := "drivingHome";1 V0 j- ~2 v+ n- `3 i4 O$ r# M
@.DrivingHome := true;" H$ M0 A ^% {6 {3 P" ]4 S# a
end;: }! S$ k( u$ A" D) ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 }/ V2 q% ~9 \8 e
part := @.transpOrder;
* k' T6 F/ E+ \. O8 `8 V part.move(@);-- load part
9 O; d- U+ p2 G9 g; Q/ d* k @.CurrIcon := "load";2 }! L! M. f: m. L& g
GlobalDistObj := part.globDestination;$ b, L: }: |. J6 t
assignLObj := rgmanager.rgAssignL;$ N( ^$ P1 P& v$ L" p
row := assignLObj.getRowNo(GlobalDistObj);
# x# i4 Q" N1 x( ~* Q; k9 O if Row = -1 then -- since 708 J& ]# a$ S3 T9 h' Q" l
if lan=1 then
6 i/ d8 E9 a6 s0 `' ]: { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 S7 k6 G- S$ I; q/ o to_str("in der Andockstation: \"",?.~.name,"\""));
- G. }% ]! F5 H' S else
6 @; g$ p m* H, I1 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ M& @* r( z9 ~, y. T1 W to_str("in docking station: \"",?.~.name,"\""));
) A0 ^, H$ c. a end;9 r/ [) B1 ?$ ~1 J% l
else8 n" k$ S3 k7 n9 v# K" b$ g1 {
@.Destination := assignLObj[1,row];6 T o/ A9 _: @: m: l8 J1 E
end;
' ]8 V4 O6 `7 @! T; X: O newDirection(@);) ^& m) c" c" f8 k* V1 \
@.HasOrder := true;+ C1 F& {5 V- n9 p9 N
end;
4 o$ S1 O7 ~% O9 }+ R ^; V2 ] end;5 A3 p. {1 r2 Q! Z7 }
end; -- of the method
0 Q% W# |4 U4 V2 ]0 ~6 Y |