/* called by: entrance ctrl of the object 'track'
) F& E% \9 z% ?+ d*/
- W3 e) U, ^8 \+ m; V4 qis
: m8 Z4 I/ p6 O3 e: p+ L part, GlobalDistObj, assignLObj:object;row,Lan:integer;( q4 n) ~4 [- Q* l: c
do
; D$ \' ~% Y4 w+ @! R" J Lan := rootfolder.Internal.Tools.AOLlanguage;
: c. N* y0 M6 p& W. _! s+ }7 k if current = @.Destination -- else return
" M9 y9 d* o' ?! { then( l2 Y. c1 J: P# R( E+ {/ h
@.Destination := void;$ L4 Y1 G) D$ f) P. K6 y. ]3 j
if @.occupied then9 l/ ~' A. r* j" ~1 f- s
part := @.cont;9 h/ J' m1 |9 s% W! N4 h/ `* Y
@.transpOrder := void;
1 Q4 s& c. p& q" y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 i2 x/ M2 K1 ?) L9 z) K @,root.eventcontroller.simTime);
- [* |# e# n, e$ @ @.HasOrder := false;
$ ~2 _2 c$ |/ |- u3 u% ]3 b @.DrivingHome := true;
% n3 c' f- S2 x: W8 c rgManager.tryToStartTransOrder;
( S9 c/ I# o9 `+ @4 y) ? if @.Destination = void. Z; x2 C: \4 I$ J& ^2 z
then -- no transport order for vehicle @
* J2 y8 e/ H& k @.Destination :=
% _6 j$ \; E0 q5 h, p6 r( N& j! D rgManager.nearestFreeStation(@,track.~);' h" V D) M* q0 Y4 c
newDirection(@); % I; ~" a( R) y2 r# u2 h7 |
if @.Destination /= void then5 Z& O1 |+ A# q) A+ D/ s$ \# V7 \
@.Destination.NumReservation :=- [. T& _1 E# a+ n) r
@.Destination.NumReservation + 1;, G2 o2 K) e9 G ~( a1 i- [
end;
$ N1 Y1 w+ H8 a- n/ D/ W& q5 V @.CurrIcon := "drivingHome";" ~/ q9 ^0 Q9 w! S
@.DrivingHome := true;
: r) H$ [$ H0 U+ s5 ?* ? end;) g; {7 z1 ]- J, c' ?$ X R7 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ~7 G/ p. u8 G: X part := @.transpOrder; |) h+ K v/ O1 s; T
part.move(@);-- load part9 \! f6 [: x* [2 G% f
@.CurrIcon := "load";
5 M5 S% |' {. V# s; M GlobalDistObj := part.globDestination;. N: A- L# @% \: _4 e
assignLObj := rgmanager.rgAssignL;: |" m# U4 j/ C: N% Z" @+ V( I- E1 z( G
row := assignLObj.getRowNo(GlobalDistObj);
9 z z& |4 W& \6 l$ @ if Row = -1 then -- since 705 e% P4 Q! p- o9 j9 h
if lan=1 then
" n, ?" q: q5 t8 H( ?- x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 h1 B( l4 K8 \
to_str("in der Andockstation: \"",?.~.name,"\""));/ x: [6 m/ M+ z g, [/ C
else
: f9 ^0 o# @; d! w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 F! q8 J9 v' g4 |
to_str("in docking station: \"",?.~.name,"\""));
- M# D3 Z9 g/ b4 W end;6 t- N6 l' {2 {6 _* V
else9 t" W4 v: M# E4 L
@.Destination := assignLObj[1,row];
. W. F! Q) ]) j9 ` end;
- J5 c2 s' ^5 `% G" d. `7 {/ D2 F newDirection(@);/ i9 T3 X# @+ X. G: i9 A: D
@.HasOrder := true;
: H; q# ~5 q8 w+ K3 b8 X2 @6 x end;0 j' q4 O) K0 r# a
end;! F: x& e k$ S/ b% i3 K5 B$ L9 C
end; -- of the method; u9 U8 y5 y" n5 r. O2 }
|