/* called by: entrance ctrl of the object 'track'
& J9 L- [9 Y) a7 Z' f*/4 T, o2 ]/ G1 Z& x4 [4 k8 f- V
is6 C1 {/ i1 n8 d) l# Q3 n4 x% ]% E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% w6 o: Q2 w5 x) t- ^do
) Q! P1 n% T/ D! o" h Lan := rootfolder.Internal.Tools.AOLlanguage;
* Q3 w- l! w. [) ?: e, X M if current = @.Destination -- else return
- g0 Y0 O- ^) E) y then' |0 q/ w- T2 d' J( m2 d
@.Destination := void;# z4 q0 M9 k2 _/ A) ]& Q
if @.occupied then+ U' O3 j& U$ I- z/ A6 {! t, A
part := @.cont; n: t! i6 O' c5 ~4 G) D @# O
@.transpOrder := void;
3 V& X% ?$ g9 n' O9 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- c9 q. s C1 F2 Z
@,root.eventcontroller.simTime);
" Y3 {$ g( U7 Q- y( X% B" T @.HasOrder := false;- _: j& b" [3 u6 o2 `
@.DrivingHome := true;4 V* q( Q8 S( J$ H' w) b1 B9 U
rgManager.tryToStartTransOrder;# S& P# j* r, F6 q5 @
if @.Destination = void8 s7 P+ p4 a. R6 F1 l! q/ F4 m
then -- no transport order for vehicle @1 l$ S& Y8 P$ X& G
@.Destination :=7 F S! i4 J" n6 d: f& W3 e
rgManager.nearestFreeStation(@,track.~);
$ L0 L. q7 }0 b% J; g4 R$ k+ a newDirection(@); - L- q# |, Q+ B( V8 D1 ~
if @.Destination /= void then
* S5 m( W( H6 g- `6 f @.Destination.NumReservation :=
6 a2 B5 l: J8 ]) r) | @.Destination.NumReservation + 1;4 r" V( y0 w8 ?# W8 u
end;
! i- T' m8 d2 T3 a% f @.CurrIcon := "drivingHome";
# i$ N$ t. k# l3 y" _, A @.DrivingHome := true;
7 g8 Y8 J- j( i$ q end;
8 n3 n5 E% V2 t% |: W else -- the vehicle @ is empty, both vehicle and part are in the same dock station. P2 a S3 N( T7 e7 O; x
part := @.transpOrder;
3 c+ s9 @; ~( t# m, p8 o part.move(@);-- load part% m( [* n- C; {; n1 L
@.CurrIcon := "load";7 @; ~! @1 p8 A( _5 { _
GlobalDistObj := part.globDestination;$ K( S: e2 I0 L) T$ ]; m
assignLObj := rgmanager.rgAssignL;
( Q6 c& n2 W3 D row := assignLObj.getRowNo(GlobalDistObj);
1 P8 ?' w$ F7 c+ _& R* c if Row = -1 then -- since 70
, ~/ o6 a! {' d( C( a4 m if lan=1 then6 N Q& `# H8 I! T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" w. C9 n3 U$ A; n to_str("in der Andockstation: \"",?.~.name,"\""));
& u H5 c% y1 m6 c" W ^! } else
2 {# L" M* Y/ c1 s/ m- S! ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E( \% M: G3 b' e2 L# D1 ? to_str("in docking station: \"",?.~.name,"\"")); 9 \: }8 O. e5 M; r
end;
3 w0 X b" l( Z+ g else2 \: m* ~, H0 A1 p: D) a
@.Destination := assignLObj[1,row];
8 l7 Y1 A' M' h! W7 I& e end; 5 R) `& R/ O3 U/ P2 x1 a
newDirection(@);/ ^, T8 ?- G/ _ K) _
@.HasOrder := true;) o1 k: W- C* j( y
end;
; H' ~ D$ L1 Y3 D end;7 q$ }) b! Q- R ?
end; -- of the method+ k7 |- y7 E7 q$ g+ n9 G/ Z' o
|