/* called by: entrance ctrl of the object 'track'
8 r9 _( R: l, W1 W1 n7 I*/# p5 {7 J# I8 ?) T% ]. M) a. C
is8 x ?4 q& B: b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; K0 d1 a; @( G- B1 T+ U% I
do) K( Y+ R4 [; n$ O7 u. k$ O" ~. ]) v
Lan := rootfolder.Internal.Tools.AOLlanguage;$ ]3 y2 R- D g, V8 g
if current = @.Destination -- else return
, K% |* {3 r: m | then' G' {4 ]" R/ ?0 K# K# ]
@.Destination := void;! t" [9 U. ~: H- |2 j; y
if @.occupied then% H5 @, K, |' t+ i1 u5 \9 @# L
part := @.cont;% u1 a7 w: k1 V R' b! L# b
@.transpOrder := void;
/ o0 _$ u6 A) }& Q! S# V- @7 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) H3 X J$ i' w+ G z7 ^. t @,root.eventcontroller.simTime);
% P/ l3 R$ _+ S4 F @.HasOrder := false;0 n& c7 w3 Z1 e4 O
@.DrivingHome := true;) }" V R9 n" Q4 N# [) Q
rgManager.tryToStartTransOrder;* c" X4 W3 j: ~6 b
if @.Destination = void0 ?$ _$ v* }- z6 U9 k
then -- no transport order for vehicle @
9 h6 c# i9 H& g @.Destination :=
: `! y& {) h% U T) P1 R7 x rgManager.nearestFreeStation(@,track.~);3 d; I3 f% r1 J" ~
newDirection(@);
# P; v+ L+ q6 f$ ~! y" F& H% F( ~ if @.Destination /= void then/ y: c. c+ ]+ o# O
@.Destination.NumReservation :=
$ R0 l2 i/ R# X* f9 z @.Destination.NumReservation + 1;9 ?0 N, l5 d, M- T' r! I# K: C
end;
3 ~1 R" ~( ]8 j2 | @.CurrIcon := "drivingHome";5 K }. A+ h6 I: P7 D
@.DrivingHome := true;2 d1 D+ Y* W+ W2 f, Y3 h
end;
% D( P" x! W2 v- i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! F4 ?* ^5 O* [. R part := @.transpOrder;8 R0 p6 G/ u; u2 d1 U/ R
part.move(@);-- load part" Z1 G" M' ?! b- ?7 E& o" \( \
@.CurrIcon := "load";
- R( L3 J& J0 Z# n$ n6 s GlobalDistObj := part.globDestination;" a+ ^7 w4 B5 D4 d! K$ L6 J
assignLObj := rgmanager.rgAssignL;5 G) c- r) t0 J. h) Y
row := assignLObj.getRowNo(GlobalDistObj);
# [3 @1 j2 d A- W c if Row = -1 then -- since 70
9 j: r: A* b2 v l- y! X" Y if lan=1 then
: x, v7 p' E9 o/ H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. A# f3 C0 c q# h
to_str("in der Andockstation: \"",?.~.name,"\""));( H" W4 v. j. c" T' r% [& {7 s
else' o3 h: K: F, q) u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* _" [) t* M/ c6 r9 @; R
to_str("in docking station: \"",?.~.name,"\""));
. e. n$ d! S+ M end;' T0 u* u! @2 m' _
else
" [( J6 H; p% Y9 m6 Q @.Destination := assignLObj[1,row];
5 J; s. ~! i5 Z& e. D- }0 m end;
5 S- q4 Z6 Z4 ?* T" a- M l newDirection(@);
6 b3 n/ Z" w' g) n' S, Q2 ` @.HasOrder := true;
- N! I: q7 }5 Q. p! `) J4 E4 C end;
# J* ?: W1 I5 |$ H0 G- ~ end;- V, Z$ ]# |2 D7 ]
end; -- of the method
$ _' w+ e5 z2 \6 }& ^) t( i |