/* called by: entrance ctrl of the object 'track'
7 t( {# y" Z8 B6 N6 l1 j*/
+ F- ?, }' L4 d; |is( a: x( c( k) G0 [4 h6 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ u7 r' Z$ m0 T) G. i4 G. Y
do
' a5 ^: c3 e. Z% O Lan := rootfolder.Internal.Tools.AOLlanguage;
# b/ G m" J8 l: C% U if current = @.Destination -- else return4 e' o" C% e* _3 z1 n; b7 [
then
! a: b- h6 r2 ?& _& r. q @.Destination := void;
6 Q6 k, R% m0 C9 g- n3 t if @.occupied then
8 K7 ?' P) l, M% W' K part := @.cont;
8 h" Y# r& \$ S9 b @.transpOrder := void;
( c4 {: @) }' h4 D y5 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ?1 e! J. B6 ?& ?" F4 ]; i+ }( s# q @,root.eventcontroller.simTime);
9 y# e/ x9 j# z, m; H @.HasOrder := false;/ X% j' i8 ]0 w2 Y& [2 H
@.DrivingHome := true;
1 b, p6 x3 q/ A3 U- G1 Y( D rgManager.tryToStartTransOrder;% n2 I: i6 g" k. @/ T! X8 j+ ?
if @.Destination = void" N0 [- B: k% X- U
then -- no transport order for vehicle @
2 {( f5 Q) D( L% B6 g* @" P @.Destination :=
3 j) L0 [+ P w/ g' V, @7 X; W7 R. N rgManager.nearestFreeStation(@,track.~);
8 `/ b( b, m% W- A2 ], M Z newDirection(@); ) j& J- |( X4 Q5 `! {
if @.Destination /= void then
/ ]9 \" S1 p) D9 J' ?& i& k @.Destination.NumReservation :=
' U/ l0 ^5 U; V0 Q @.Destination.NumReservation + 1;
$ I; ~5 J3 K6 b" k end;
7 u1 E& Y& W! `) ^9 h @.CurrIcon := "drivingHome";
2 u, U1 C Y, i, n5 M. m6 J @.DrivingHome := true;, ~( i7 X5 J7 ^9 P5 J+ ~
end;
, |5 P& Q# g8 l- ?" O# u$ w( c: F else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 h$ n1 \; S0 ?* E ^
part := @.transpOrder;* p5 q4 Q$ t, X9 Z5 e$ z9 l- o
part.move(@);-- load part
7 [" u2 s& p1 o @.CurrIcon := "load";" K8 ?7 a: h0 h- D! Z; O. c0 e
GlobalDistObj := part.globDestination;8 W* |5 n8 u+ E' J1 l
assignLObj := rgmanager.rgAssignL;
. t7 @- m- f7 e9 T9 x! @' B row := assignLObj.getRowNo(GlobalDistObj);" m% f1 n4 s7 v. f8 O% H
if Row = -1 then -- since 70
; I/ m# V" s& m+ P3 X$ F) _ if lan=1 then. q- w& f- Y) \6 q/ r( X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," g" |, N$ g$ | l/ V* U* [0 l
to_str("in der Andockstation: \"",?.~.name,"\""));
$ }' `- s0 G1 S4 l, t else
0 U9 J% Q7 O; e8 g+ i: ?) f$ X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," B) B1 x. D1 p* T' O
to_str("in docking station: \"",?.~.name,"\"")); 4 Y8 g. k9 f) j Z; t$ b+ t( a
end;
% m# |( f& o$ x2 f2 ^ else
% \9 D$ w3 P2 R; g$ J @.Destination := assignLObj[1,row];$ n, E* u, X1 O y
end; ; }' L- y9 H7 I2 O, c6 e1 L8 Q
newDirection(@);
4 X5 w: Z5 I" o" \' M. n @.HasOrder := true;
& N5 a( G- R3 U! d' B end;- X7 D5 A6 X T! x- |8 D& O( w: }
end;( L/ Y* E* u7 |& T& L& w2 R
end; -- of the method
) y2 a5 k! Y+ J7 {: k8 S6 a% ~ |