/* called by: entrance ctrl of the object 'track'
! j u8 Y# ?8 }8 c*/! {" S# Q! {3 s1 U: p
is
. _+ M* Z# I; @6 H4 Q; }+ n$ L part, GlobalDistObj, assignLObj:object;row,Lan:integer;- x) @! y1 f3 E' b# k# f/ Z2 r
do
: z$ D* V8 O* `. q Lan := rootfolder.Internal.Tools.AOLlanguage;
+ F. M4 T5 r3 a& L$ }; l if current = @.Destination -- else return
$ o g* Y4 Z/ ] then
4 c& U& m- o6 D- G) X" A5 p! J o @.Destination := void;
, r6 j/ y1 o, a/ F: q if @.occupied then
" ?8 U" h5 J. q' o: d part := @.cont;
% B% x+ \) |2 K. }. m @.transpOrder := void;* M: U4 t0 J. |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' `# O$ i9 h& }
@,root.eventcontroller.simTime);& z, |7 j4 S! k5 X
@.HasOrder := false;- g* f7 o' y, N7 k3 t9 P5 h
@.DrivingHome := true;) V5 D5 ]% c0 |% T( R
rgManager.tryToStartTransOrder;$ O* J# b q- r1 z$ F9 g, M$ }2 k
if @.Destination = void( W0 }3 z9 e4 X+ {
then -- no transport order for vehicle @
9 f) e4 g1 M9 R; v' O: z. b+ a @.Destination :=
5 N! p* w; y9 V: |, d- H rgManager.nearestFreeStation(@,track.~);9 c0 P5 `* q% I, s2 F1 ?
newDirection(@); $ a# h W& _' q& d' w5 `
if @.Destination /= void then: H% e2 U: d. W6 O" C% h
@.Destination.NumReservation :=7 \: l* \* o! {- V3 f
@.Destination.NumReservation + 1;( \7 K& H. G# j
end;
- u/ _3 X. d& _0 t @.CurrIcon := "drivingHome";
9 z0 e+ `4 J$ ^- L3 e. t @.DrivingHome := true;& N& s' Y6 i8 s* i. E, O* s
end;/ Z! V, [. T1 i3 n" o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 i9 j5 b% F+ Y& g# t+ z% }8 Q( C4 C) p
part := @.transpOrder;
+ Z5 `4 A1 }% V) u7 t ]% x part.move(@);-- load part
& k5 _2 x* B; u; h3 b$ \3 r* k @.CurrIcon := "load";+ P4 i$ Q. u3 O; T, |2 ?" c
GlobalDistObj := part.globDestination;
" n) N2 @& i a" |# a assignLObj := rgmanager.rgAssignL;
) d$ [6 O* `/ Z9 @3 l) k8 \ row := assignLObj.getRowNo(GlobalDistObj);/ _. r* O) V/ A8 E
if Row = -1 then -- since 70+ k: V$ y! y0 W& n2 x) T8 \
if lan=1 then
1 Z4 I* r& | z/ X/ U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 D8 J4 D* T/ J4 N' q4 Z, T3 e to_str("in der Andockstation: \"",?.~.name,"\""));- L3 Z! R, V" L0 Z$ C" J
else. x2 W: ]4 w; C$ O1 M* m/ R/ C5 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) w% \ e5 j+ d$ C5 |% D3 \. G
to_str("in docking station: \"",?.~.name,"\""));
" X q' T* b0 W v& q end;
5 \( M+ e$ m. v else
7 O% v% @; ~5 `1 Y @.Destination := assignLObj[1,row];
0 h5 w/ W# u7 x; |( j end;
" O9 B4 k: O5 I8 u newDirection(@);
2 X- p- M( A9 I- {% k/ G: y @.HasOrder := true;) s' _9 }6 p; Q) @7 ]1 Q
end;! d: e5 u- q9 A. p J; v. j
end;
, B# c; T# ? cend; -- of the method, U7 j( Q. }* T7 ^, o4 x
|