/* called by: entrance ctrl of the object 'track'
, e$ Q8 O! S. V1 _: r/ |- a*/! }0 D9 [0 }6 |5 c4 I; W
is
6 |7 j- J5 r) J2 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;- {+ s7 Q% D' f6 \* W; F k/ i
do6 F8 z2 e- Y, c) X: N7 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
~4 N+ F+ r- t8 N if current = @.Destination -- else return
$ J, T8 h/ p' \$ R& ^6 P( S0 B then
, C" f+ \, w1 I8 U$ K$ P @.Destination := void;# J9 [* U3 Y, `, Y
if @.occupied then
% {$ H7 R8 v- v V2 t part := @.cont;5 F. q Q2 }; {) c/ k
@.transpOrder := void;
~1 o, U) g$ Y1 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: [- U; \1 x4 i2 I7 n0 u e, r
@,root.eventcontroller.simTime);
' Y% \9 \" i1 H( h5 V! q @.HasOrder := false;# Q0 G- Y% v# w6 W
@.DrivingHome := true;4 t1 u$ K' n+ B, x
rgManager.tryToStartTransOrder;8 _" |1 | ]. J w& H
if @.Destination = void
, p. ` t& S: f6 o0 K$ y then -- no transport order for vehicle @
+ F/ p/ \! T/ f/ v @.Destination :=; b p; N$ t# Z/ ~0 ^* E, ?
rgManager.nearestFreeStation(@,track.~);1 z" X5 @- Q$ N3 Y d, t; X7 F1 C: q
newDirection(@); ! x9 y* |. `" D/ V- D
if @.Destination /= void then
! `1 } B2 Z. j2 b @.Destination.NumReservation :=, ?2 v& y$ {! \+ x3 _
@.Destination.NumReservation + 1;
9 w! M* \ j0 d1 f p end;
5 y/ @2 R, h* l/ `' u @.CurrIcon := "drivingHome";; k8 c5 ] K! T" E% q% n9 _
@.DrivingHome := true;/ g4 d7 N) ~2 E9 J1 f+ g
end;
1 c i A* x# n9 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 v i1 b* j6 g5 L
part := @.transpOrder;" E6 c5 B3 L4 o) H& ?1 k: x0 a
part.move(@);-- load part" Z9 u% k( o2 P' r/ Y5 o3 S
@.CurrIcon := "load";% F5 c( A! g# k
GlobalDistObj := part.globDestination;
# l y; {* H3 F4 x4 D6 p0 B( x assignLObj := rgmanager.rgAssignL;
- @( w0 o, P- J+ @' O row := assignLObj.getRowNo(GlobalDistObj);3 X2 ?8 m$ G( m- ]
if Row = -1 then -- since 70
% K M/ L, Y" O if lan=1 then
1 y& R9 z- k) t9 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 {" Q# _' ~0 }5 }" ~/ [5 i
to_str("in der Andockstation: \"",?.~.name,"\""));) z% U* }/ l# c. T
else& z9 \2 M; g5 b7 t$ n4 { v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 u8 c+ ~7 C4 i1 p7 j to_str("in docking station: \"",?.~.name,"\"")); 5 y: ~3 a5 Z3 ~' c u6 d p
end;- Z, Y: f; `' _& ?4 e7 }5 e* W
else
8 h4 j4 B g3 D& Y4 L3 x @.Destination := assignLObj[1,row];
4 {( _6 _" o9 O$ @+ D end; 1 F' w' p; ~) ]7 b) X4 H
newDirection(@);6 ~1 v+ n$ R" g% W$ a; n1 y& Z" _
@.HasOrder := true;0 Q b( p# v1 T) K0 p4 d
end;& U+ x5 p% |! Z) D
end;8 R% L. r! M: o' Q$ D u
end; -- of the method8 Y! x$ }1 @( N
|