/* called by: entrance ctrl of the object 'track'0 f7 K7 X: \: a8 `
*// p& u, U9 O+ j. l3 [/ p1 g) ]
is. M$ S \# `' S2 L# A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 |; N' e6 U3 r5 R
do
7 M3 G! o, n' v$ j/ h7 i Lan := rootfolder.Internal.Tools.AOLlanguage;: U, _# F; _2 P7 @4 ]7 \" v3 O' d$ v
if current = @.Destination -- else return7 C) g7 {2 v. ]" f# h3 f6 l4 o
then
' M: f, h6 W5 X @.Destination := void;
3 _' s8 [$ Y% f6 d if @.occupied then
! i C4 Y3 N3 E6 h- E d part := @.cont;9 u" T: Y5 s; i5 Y
@.transpOrder := void;$ H; |! S" E+ V3 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" I1 P( ?: a. i3 E2 u# c @,root.eventcontroller.simTime);
* _. `( {1 r& b% Z; l8 m; l @.HasOrder := false;* a6 q5 m t, o
@.DrivingHome := true;
' R* O5 h: I- W( Z- f" O' E s rgManager.tryToStartTransOrder;
1 z, b+ X) ?" n8 O if @.Destination = void
% S% e: r1 O9 `+ G5 W then -- no transport order for vehicle @. q5 l; X0 ^! J" b
@.Destination :=
8 B6 p0 w5 |7 Q+ M* i rgManager.nearestFreeStation(@,track.~);
6 X! @* P: r7 P8 W+ S' O) v1 Q* C) D newDirection(@); 0 |: v" D( i# @4 x& j
if @.Destination /= void then# t* F% f" F2 e, D4 z1 z3 N
@.Destination.NumReservation :=
' L; A" I- |$ v+ d @.Destination.NumReservation + 1;/ T0 O- S1 j, u
end;% s/ Y! @3 w# G* d2 i
@.CurrIcon := "drivingHome";
1 M0 M( X0 x" Y1 T @.DrivingHome := true;. y7 }: L, a6 q( x/ J
end;# |% B* q1 ]# k: F# y b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; G! F+ `5 x. L; ^' d# U7 L5 z2 O part := @.transpOrder;$ S0 r8 z3 n6 K) E; D
part.move(@);-- load part2 d" A4 V/ n# F3 M! Z
@.CurrIcon := "load";
5 \3 R) u4 C. P: h% `, ~! ~ |+ Z GlobalDistObj := part.globDestination;/ y$ T( ?1 z9 m3 [
assignLObj := rgmanager.rgAssignL;
3 E* D \8 Z: r, }3 L( i; V row := assignLObj.getRowNo(GlobalDistObj);( r, @' O8 K9 _4 i/ _: e' d7 m8 Y
if Row = -1 then -- since 70
. Q! n% U7 W- p% f! k* J if lan=1 then% {# N# o0 D# \3 I6 U& H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 p# ?; ]( P# V2 Y: C/ }4 T
to_str("in der Andockstation: \"",?.~.name,"\""));6 `3 y4 l% V8 M( k
else- Z: I# G; }" m0 a9 O S2 d& @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ H3 t* r/ R0 F4 @
to_str("in docking station: \"",?.~.name,"\""));
: Q# y# s' M* ?0 L end;
+ b" T& C* Y2 Q else
7 I. p+ w5 s! M& _0 P6 [ @.Destination := assignLObj[1,row];: y2 h, U/ ?0 M4 \
end;
} q9 k5 ]3 v2 b& ~$ @ newDirection(@);, k* N. G# V: m" T
@.HasOrder := true;
: M( p3 D( X& o ]1 J end;
4 N* S: `/ M2 G9 D. \ end;
+ v/ t4 S; v) I% f/ Send; -- of the method
4 f, w( R4 ~& n S& a5 u |