/* called by: entrance ctrl of the object 'track'
3 u& \+ c% c) d*/# @" X7 b- p8 y7 @6 B0 J! I, ?! b
is5 t% P( t% n X+ F, r! S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ v4 e- S! C9 k/ ~8 B+ gdo
# v' |, o1 e, \% x0 y Lan := rootfolder.Internal.Tools.AOLlanguage;7 j& R: Q5 R3 s* h" V. J- u
if current = @.Destination -- else return
% W! P+ o6 _& i3 ^ then
! z: ]# W* x1 g: V9 [& I @.Destination := void;
2 E) G |+ E; o8 o( X- D if @.occupied then" R( E. b& U" M7 |8 s
part := @.cont;9 R0 [8 _, g! Y6 f, u
@.transpOrder := void;
, }- T; c0 @* F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ _0 L3 s, q2 P R8 L! \
@,root.eventcontroller.simTime);9 y/ A$ d3 i4 J. Q0 J B
@.HasOrder := false;$ c) ]& L" \/ `! s
@.DrivingHome := true;4 q# e. |- N9 m2 l# R
rgManager.tryToStartTransOrder;
" Q7 w8 {7 ^5 b( C, b- s* y3 ~ if @.Destination = void
8 j+ R- C/ E- a q5 k then -- no transport order for vehicle @6 u/ v4 m2 x0 \% L- T. R
@.Destination :=, J5 w; ~1 H9 w- ^6 i9 M* ~
rgManager.nearestFreeStation(@,track.~);
5 ]: k1 T* N6 g0 q7 U5 L newDirection(@); 3 _: X. O4 N) ^+ N6 P t. H6 A Q( B
if @.Destination /= void then
3 T9 ~$ l. v+ R0 { @.Destination.NumReservation :=- e h6 m, i( p8 q
@.Destination.NumReservation + 1;
/ x/ _, `+ F& w9 c+ B end;
0 K+ W$ Z, C- Q: U. S/ P) C @.CurrIcon := "drivingHome";
4 t# t) i! k# n! u1 u @.DrivingHome := true;$ @9 S1 G4 m' K0 _' X) g. D2 ]
end;
! {4 W0 V# e! U# @2 z3 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 N! ]8 j0 M7 W& Z) n# }& F
part := @.transpOrder;% y" N$ q# l% g4 d$ N+ k+ w! x X
part.move(@);-- load part
! o3 Y) l4 _: V$ s, ` @.CurrIcon := "load";
! z3 f. v$ \0 Z: | GlobalDistObj := part.globDestination;( @" x4 X" e! b2 z2 g' Y
assignLObj := rgmanager.rgAssignL;) e& F) z* b( x1 X r' a7 |" S
row := assignLObj.getRowNo(GlobalDistObj);7 [- G) M; R1 ~* W
if Row = -1 then -- since 70. a# U# M7 W8 M" G. z+ Y- h
if lan=1 then
% H; B# n- q7 R! s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: g" q* {' I% Z/ z. S1 b, Q3 s. o6 D
to_str("in der Andockstation: \"",?.~.name,"\""));. f1 G! J" N- M0 Y( R+ C
else
4 W& A) _6 S) H/ S+ d& j# T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' v7 `' L8 @% l3 [6 U to_str("in docking station: \"",?.~.name,"\"")); # u+ k0 P+ }% t0 u. j/ F1 u- c4 F3 T
end;- h4 h4 n' y2 V' c* r$ _3 O, I' X F
else6 K( D8 B7 T1 n* ]3 h# ?. j
@.Destination := assignLObj[1,row];
5 K% t& j/ B$ S9 V8 f/ O/ { end; 3 o i$ ~4 }* E9 T
newDirection(@);
& F. H8 N" o; Z: { @.HasOrder := true;( T. t* f# {: _' x2 L; g! F* k* d1 d z/ |
end;# g5 _4 h6 T) z5 K) A \+ B- j: T+ c
end;
) W1 j, _. T$ C9 s! V" T3 Nend; -- of the method
- j% Y4 X( e$ O9 _ |