/* called by: entrance ctrl of the object 'track'+ P0 q, @, F$ `) }2 O
*/
' `3 h1 g: d: ?# his
9 }7 R! q9 \6 G; X& I/ r part, GlobalDistObj, assignLObj:object;row,Lan:integer;* m7 b# I/ H( r
do
9 b |$ a: r3 P Lan := rootfolder.Internal.Tools.AOLlanguage;- M5 Z5 o4 \* N2 C7 C. n
if current = @.Destination -- else return
: ]! A, M4 T7 V0 j then
( V( o& u9 U) S T% s& {$ u/ l" r( L) R @.Destination := void;" v9 F4 K: w+ w: v- Z0 i. b
if @.occupied then
. b: s% X' t; k, Y part := @.cont;
" p; x8 @/ F2 J( p4 S3 W4 k @.transpOrder := void;/ L$ \/ b8 G* U& f( {2 A: X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 J: Z9 ^0 U! R7 a
@,root.eventcontroller.simTime);' D# k5 }: ~8 h
@.HasOrder := false;' E% ~) @/ B0 P& g2 D! _
@.DrivingHome := true;
. r8 c8 J; h1 `% F- r: z rgManager.tryToStartTransOrder;' k) H% K2 f: U% ^5 Z+ b4 [" S
if @.Destination = void/ @1 B, ?1 A) R5 u3 j/ c% u
then -- no transport order for vehicle @- y& G! u# |5 r/ c7 Q" O- P, X
@.Destination :=
) J: R, K0 ^" F3 u; ? rgManager.nearestFreeStation(@,track.~);" c" ?5 f/ J3 I( ]
newDirection(@); % a& [- ]) j# \( B8 t1 B7 p% f
if @.Destination /= void then
: n# l/ f) `6 ~* {/ T+ Y0 c @.Destination.NumReservation :=! [8 J1 T1 _* t. T( s- i/ |6 {+ y
@.Destination.NumReservation + 1;7 y; n2 e( f9 e" u7 }9 x( T& r$ G+ T
end;' R7 M, _, L, u$ E) h
@.CurrIcon := "drivingHome";
+ Z" R/ a7 h5 T/ l J0 p @.DrivingHome := true;2 H+ K- Z2 E# ?0 h
end;
+ x: u. A( A2 h; O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 _( D7 ]8 Y4 s7 Z. ` part := @.transpOrder;# s) i6 Q# J! m* I3 x/ h
part.move(@);-- load part2 J3 D9 U( F" i9 S4 b. Y
@.CurrIcon := "load";
% [. H+ ~/ C2 p& `! [0 _% d GlobalDistObj := part.globDestination;
, u5 O* z5 |- O6 E5 p' J7 l assignLObj := rgmanager.rgAssignL;, W+ ]% Q/ u R* s7 y8 f
row := assignLObj.getRowNo(GlobalDistObj);
( ~' p2 E0 I W if Row = -1 then -- since 70
\5 c# v6 r7 Y0 t if lan=1 then
2 H: Q+ B% g2 O) O) R5 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& B6 C* T9 H; I1 @
to_str("in der Andockstation: \"",?.~.name,"\""));5 o7 T4 ^" G8 |5 |' G( r) U
else D! N2 M b7 q1 t; R. e9 c( c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 @, V3 U* t0 F3 [" v, c
to_str("in docking station: \"",?.~.name,"\""));
/ N# K0 y& T9 c" r2 h& ^- \8 j$ E end;5 i0 F3 j2 u1 k* b* `" o
else* Y2 p8 C& }5 f0 }/ f2 y- k
@.Destination := assignLObj[1,row];
x$ A) [4 O3 K- @9 M2 a end; 9 J, l( Y& Q, b, E3 B4 A, z
newDirection(@);
( O% w1 y9 s5 _& } h @.HasOrder := true;" e- d$ q. {4 v H# r# d1 Q
end;
6 d. B2 ^0 Q0 j& D- ? end;
; J Q1 `- Y, `% `! u" xend; -- of the method
3 D) C4 V9 K9 O$ C9 W+ P' `5 z |