/* called by: entrance ctrl of the object 'track'
/ r7 Q' N" |' V" G; i*/. a5 X j" X! F" [: b
is
* v1 o0 j! x( V5 L" \% [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 u/ Y; P t8 ~2 q7 C* udo( O0 ^4 A) O6 [* `
Lan := rootfolder.Internal.Tools.AOLlanguage;
. s* b( k d5 |% K3 R7 r' U if current = @.Destination -- else return& \, M6 \1 F! O( {
then
7 |2 z" A) P) y1 a @.Destination := void;8 ~9 Z( x1 F& j4 J/ {
if @.occupied then
) d, h) m( F" O* J j part := @.cont;
) q/ k0 c1 h {3 R8 Q4 ^( `6 O @.transpOrder := void;0 T6 Q: _( l! L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) Y( ?- u$ G1 Z
@,root.eventcontroller.simTime);
/ L+ D; _5 E- e @.HasOrder := false;
1 {6 {" w3 c/ ]$ L& \2 e# X' w! s @.DrivingHome := true;
1 D. f+ }4 q+ `+ v, g" D: ~5 [ rgManager.tryToStartTransOrder;5 `. J: C7 @! i0 z
if @.Destination = void, F' f- X/ O9 C
then -- no transport order for vehicle @) y, z8 d2 [9 Y9 k& O% c
@.Destination :=
/ Q0 t6 Z8 U4 M& J rgManager.nearestFreeStation(@,track.~);
# N; |0 Z1 h4 U- H! l" v newDirection(@);
: Z% q, L. V6 f if @.Destination /= void then
9 T/ U5 t. j% \; P! j$ B, B6 g; A @.Destination.NumReservation :=) a8 p7 c- P# m
@.Destination.NumReservation + 1;
4 S8 X4 {/ G& g: Y: V* O end;: \0 _/ ^8 F* l, [
@.CurrIcon := "drivingHome";
) P6 g$ n/ I' n @.DrivingHome := true;& f" ^0 r% u5 Q* B7 s/ a
end;% F& `8 L# i5 p) K+ y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ s3 z. y$ ]) y H0 L
part := @.transpOrder;6 w# B- {7 G! y/ T/ m( K' \
part.move(@);-- load part
# |3 W0 a# o1 E! f* a4 ~9 ?& n/ R @.CurrIcon := "load";3 A2 f! i& y. h+ `/ l
GlobalDistObj := part.globDestination;5 o, a: Z* U' x4 u5 l9 M
assignLObj := rgmanager.rgAssignL;, O. t) K- W1 k' Z
row := assignLObj.getRowNo(GlobalDistObj);
9 N6 g, c1 c$ W4 m! u if Row = -1 then -- since 70
2 U( m& l, U! I3 b" h8 M if lan=1 then, A, T' L- V8 }0 P( U9 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 m* Q: h! s" Y x to_str("in der Andockstation: \"",?.~.name,"\""));
! B" `1 u9 a( T: z/ c) g+ L% q else" V/ N1 c( G7 c7 B# ~& T8 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B4 s1 S7 \: W3 e C to_str("in docking station: \"",?.~.name,"\""));
9 K7 f6 a# L* ]& a: E, H! d0 m end;
" j' n2 Z$ L1 P7 \3 [+ z' f! L else
* s8 {; d5 q; o6 @: m# | @.Destination := assignLObj[1,row];
$ U4 c5 e& r2 ^0 n& b% b* m! W end; z; T0 _, D. u5 ?3 n- {6 Q1 Q
newDirection(@);
- C6 W7 ~ g2 S+ }. y7 i @.HasOrder := true;
/ H4 V: ?9 u) i. D end;3 c& z+ o) W% Y9 K* r* \5 e
end;
. j! N' b6 K$ F! N2 F- k4 m1 Tend; -- of the method
. |$ i. u8 ^ A" t( f5 B4 D' }# \ |