/* called by: entrance ctrl of the object 'track'% X! W# ]; u5 w3 d: e
*/
% C( o$ t- t8 D1 z0 Sis
7 s0 L1 h/ V$ z, ?# o part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 b, M7 W6 u& B' A! [4 ^
do' U# d) W0 v) N1 L" ?4 x
Lan := rootfolder.Internal.Tools.AOLlanguage;6 p; l% t7 Q& g4 C* I3 X. I/ j3 c3 C
if current = @.Destination -- else return
$ M$ [4 r7 J/ X, H5 j( d# o4 M then9 s2 p% |, Z2 h' ?( h
@.Destination := void;# l& Q1 O/ O% E: ^
if @.occupied then
2 @, W. L3 {5 s1 d# x' M part := @.cont;9 F5 H/ V$ d$ H: D/ p
@.transpOrder := void;
$ \4 d2 N$ [* D, v2 l* f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 I2 `) z" n8 X' N- y1 G+ O
@,root.eventcontroller.simTime);( p9 Y6 Z$ a6 p5 s7 x* @: z% w
@.HasOrder := false;
2 e2 N0 y- Q ^( [$ M: ^5 X @.DrivingHome := true;
- R: x; m2 p6 P- t. o) n rgManager.tryToStartTransOrder;
& H8 x1 S; I+ C; G0 R. A( u u' \ if @.Destination = void! W( d0 s( K. m! y; t; A% O
then -- no transport order for vehicle @) G) W. b1 x. r; d0 ?- b c) U
@.Destination :=+ X1 g. Y( ~3 S
rgManager.nearestFreeStation(@,track.~);8 K7 @, @6 p! a: r) J
newDirection(@);
# u- D; C8 U1 p! [1 S% q if @.Destination /= void then
# {1 e& {" C U7 G1 D3 b @.Destination.NumReservation :=/ w* l4 x+ c1 G& z" |/ u& U
@.Destination.NumReservation + 1;
! Z$ c h; J& |) Z( S0 K end;
; s6 A) N, {& F4 ~* y4 g @.CurrIcon := "drivingHome";
E/ l* a4 r: _/ ?+ m @.DrivingHome := true;
6 P) r& s4 D9 x3 E5 s% z# m! c4 C end;
# e9 t% g0 I$ Z# U( T- y+ C& i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- g; u0 v9 E; s0 D1 {! ^ part := @.transpOrder;9 \/ I6 K2 D- v6 W
part.move(@);-- load part! I" c1 L' t) \/ Y
@.CurrIcon := "load";
2 D4 R* l4 N6 D7 B5 f5 q GlobalDistObj := part.globDestination;: C: q1 T& }0 v% C- N0 Q0 t; i
assignLObj := rgmanager.rgAssignL;1 v3 r5 o. t) X* T" n# s& G7 u
row := assignLObj.getRowNo(GlobalDistObj);8 z" _) ~9 r3 ]! ?+ U4 P
if Row = -1 then -- since 70
' c E, h3 g: k3 B if lan=1 then6 D% o8 V6 a3 _; Z: O$ D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' D. o G9 w5 ]) N. T3 D% w) a
to_str("in der Andockstation: \"",?.~.name,"\""));7 n% f4 Q8 s# n$ Q# I. I
else- \3 i6 T$ f" f( O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ @$ N4 w) u( f4 r2 P9 J to_str("in docking station: \"",?.~.name,"\"")); : ^" t, b2 K" j: v% x8 v
end;7 O3 K4 D; f% K0 {9 n! l" g
else* Q: [6 a2 N, G! g A+ H
@.Destination := assignLObj[1,row];+ ]' \6 D- M0 b+ o8 \
end; 3 Q8 W$ I+ ?$ `- n u+ m
newDirection(@);9 D4 n, R6 [' s! l2 v9 Z+ ]
@.HasOrder := true;) |7 t$ W/ d7 Z
end;
! s$ L" l' w4 S8 i& g% R, P end;
, m0 h. j4 m, G' y! wend; -- of the method
$ h4 ~5 X( ~! u: h7 X |