/* called by: entrance ctrl of the object 'track'
) H/ n0 P0 f C*/
1 _% Q) a7 s2 {3 z2 pis8 x- R, O* E y8 ~. |& w f+ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 i D9 c" n" y" R+ f; V) ?7 ?: udo. j( f4 B3 N. F+ x
Lan := rootfolder.Internal.Tools.AOLlanguage;7 ?! N+ a3 H1 T% L; W* K _3 O
if current = @.Destination -- else return
9 F& F) n% |+ H* W6 Z1 w. b then0 {0 Q) ~0 u. \
@.Destination := void;
. z }" \. E: K B S+ m( F if @.occupied then
5 i" B0 K F4 S3 y3 C: |( z/ J part := @.cont;2 e) i. J7 f4 U4 `7 s1 { q
@.transpOrder := void;6 ^& ]2 O5 I3 _* P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! }" B6 i, q6 {; D5 q& f7 ~
@,root.eventcontroller.simTime);
$ i% L6 p3 T* e# T/ X5 \( P3 o8 u @.HasOrder := false;
; D; u& @* e+ \+ }: N. _ @.DrivingHome := true; C: D. b( M/ B+ F. e
rgManager.tryToStartTransOrder;
) y' s4 i% D/ G" J if @.Destination = void6 D' L6 w% f% I# O3 N6 M; u
then -- no transport order for vehicle @
6 P" J7 B+ D- U. |+ p2 A @.Destination :=9 d9 c+ m9 A& G
rgManager.nearestFreeStation(@,track.~);
$ U+ h e9 v) M) f' w newDirection(@);
2 p4 Q' ^7 L& e i" x5 O& N if @.Destination /= void then
" H. |; \+ |" ?0 G/ I @.Destination.NumReservation :=
+ t: L& I# e" B6 U# {- V @.Destination.NumReservation + 1;+ c D8 w( I! |# A
end;3 F( u. ^' ?, J/ r
@.CurrIcon := "drivingHome";
5 v( H+ _0 u* _) `4 ] @.DrivingHome := true;. ^3 t7 j( B3 ]" R! K
end;9 e$ G- Z% k! N5 k; q& ?" B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- q& [7 F, c% B% g9 Q8 b# q part := @.transpOrder;
& I/ ]3 [0 R# t- O2 r8 Z9 x N% w part.move(@);-- load part' i3 Q z& e1 q: u' d, f
@.CurrIcon := "load";
; J7 S$ E3 ` w$ B: ] GlobalDistObj := part.globDestination;4 z# `1 X) Q; k' Y: g
assignLObj := rgmanager.rgAssignL;9 @) O0 x% _4 g) B$ p
row := assignLObj.getRowNo(GlobalDistObj);
7 J& h0 V! B. f: }' U9 p if Row = -1 then -- since 70
& @) K/ c. D# F9 u- n if lan=1 then! }2 j& {6 \& I) B: r: U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 e$ W! U* p2 h8 K9 d8 ]% | to_str("in der Andockstation: \"",?.~.name,"\""));- E1 ]+ ]( }8 _4 _* u4 t: i9 o
else# |$ q2 w0 M7 y3 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 x5 f6 n& m% W
to_str("in docking station: \"",?.~.name,"\""));
: _( e" q* b# X# T& B; K6 D$ V5 a end;
; B4 c3 y* c9 n( z' C3 T else5 j; O8 `& f, Q; y* |; ]
@.Destination := assignLObj[1,row];1 G& o& p3 ^! H r H8 p
end; : D/ K$ p( Z. a' Z
newDirection(@);3 E: P( h8 H. z! t, s
@.HasOrder := true;; o( I T( d. i$ j( D' U
end;( p" ]4 w% s6 [" v* Z( U
end;. l9 Y9 z3 M' L
end; -- of the method
! w. Z. O5 I8 D) R |