/* called by: entrance ctrl of the object 'track'
: v: r z4 M4 G: K*/
& N z' [2 Z/ \is* _6 J) t4 v+ F5 W4 @0 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# O7 ]" Z% ]$ w; ]! b0 ?
do) j _2 s- \6 f4 i1 u: e% E/ x
Lan := rootfolder.Internal.Tools.AOLlanguage;# V6 L/ {. ~/ f' U
if current = @.Destination -- else return
; G, K. C5 l9 L$ d( m" @ then
- h% \# f5 H4 z/ { @.Destination := void;
7 N; K. v, X( {. E& R if @.occupied then; S; ~% k& b. _( p1 U& S
part := @.cont;
& D; m1 L2 O5 ~: `, O s { @.transpOrder := void;+ F3 Y+ V$ p' z0 o/ V. U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' @: o* E+ M: H! Q) c n+ P @,root.eventcontroller.simTime);$ |+ n8 F' z1 M+ Y
@.HasOrder := false;5 q! a$ ?% r/ ^
@.DrivingHome := true; }$ Q9 X" `2 { B$ Z! b2 C3 q& w8 [# n
rgManager.tryToStartTransOrder;
6 g+ S& ]4 e% I6 P" U# r1 o) ] if @.Destination = void( R3 J8 y# e4 y9 r
then -- no transport order for vehicle @4 ]+ v% \1 {) h# `* @6 i7 j
@.Destination :=: a& U8 ^2 P1 @. T$ c
rgManager.nearestFreeStation(@,track.~);9 E A, |/ G0 j: d
newDirection(@); " ^. j9 X# `) b
if @.Destination /= void then
' P# T; e; B+ E- b7 A8 ^ @.Destination.NumReservation :=$ h' w) ^. \$ T* U. i, Q7 O& Y
@.Destination.NumReservation + 1;
7 j- ~0 ~$ A0 F# I8 u L3 h4 j end;
* a' \9 r2 y1 N; S9 D4 M @.CurrIcon := "drivingHome";
8 D: L& r8 m. v5 C @.DrivingHome := true;
5 _0 G0 D' O7 D' a* z end;7 B% J0 S5 j, E2 \0 u2 |* c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 r6 u9 q' r$ ?# a part := @.transpOrder;6 E% q! }, p' O: m; l& S% ?1 U
part.move(@);-- load part. C7 j# V# j7 A8 T
@.CurrIcon := "load";
- \( {7 a2 k9 d' d" h0 ^ GlobalDistObj := part.globDestination;
$ E* B# k7 g1 N2 V O" y+ h( c assignLObj := rgmanager.rgAssignL;. p+ Y; k3 ]# W
row := assignLObj.getRowNo(GlobalDistObj);
4 d: s$ y% {7 d) ~# h if Row = -1 then -- since 704 ]$ d' N& k) Y$ d: O2 _
if lan=1 then
& J' i2 g% L* y+ E/ o* @# z% V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ^# d% |. S' }. o2 O3 L9 c
to_str("in der Andockstation: \"",?.~.name,"\""));
0 B: f+ j9 x0 C7 ~0 b else0 @/ t; N8 @% d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& F) k! m! j i' M" o0 u
to_str("in docking station: \"",?.~.name,"\""));
4 R# N& y9 ~( |4 m end;
# s/ q! _! j$ {" e else( o+ [1 P5 B' U6 |) j. I/ }) [
@.Destination := assignLObj[1,row];4 S6 \7 Z2 g2 Q' N& u
end;
5 t$ [$ G7 B6 Z newDirection(@);9 M; q/ `2 |9 V
@.HasOrder := true;$ H# e+ \: y: C4 C+ S8 d, k$ k K
end;
/ X0 I) b- |4 ^! A6 j Y0 W end;+ u+ g0 Q$ w; N* ~: \
end; -- of the method
( j o+ g( `/ H& E+ Z2 W |