/* called by: entrance ctrl of the object 'track'
; f. F% D+ ?8 {0 m*/
# f4 D% z2 h/ k+ B. `is( W" B1 E+ ?$ e @, D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ~. o! z* B3 S0 ?+ i
do% X) L3 E$ e9 b% z9 U: s
Lan := rootfolder.Internal.Tools.AOLlanguage;
' X8 c- A/ k. ^3 O3 P4 J+ a n if current = @.Destination -- else return
, T% f( n3 d$ c) D3 ]/ v then
' `8 Q4 H7 f- j8 a, R. u @.Destination := void;
/ Z' \4 c6 e E7 M if @.occupied then' e$ l$ I, M r9 |& o/ r/ f# C5 f; n
part := @.cont;- g$ \) k) G9 ^. _
@.transpOrder := void;" d9 l0 T& Z+ t# o4 H! v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ p$ N$ W+ D( @3 @
@,root.eventcontroller.simTime);
8 q& y: R8 V( O5 Y3 L @.HasOrder := false;' H! ~; J& q' |! h6 n
@.DrivingHome := true;0 _ `" f6 e9 @8 p- o
rgManager.tryToStartTransOrder;
; f) ?" m6 P0 H if @.Destination = void
1 l5 W2 y6 u5 s) w" B$ U then -- no transport order for vehicle @
2 n3 j0 ?; p# p7 S$ V$ ]/ i3 i @.Destination :=5 J; D* l H' f2 P, L2 w* [3 N
rgManager.nearestFreeStation(@,track.~);7 V- d! k6 L5 b3 o2 c; d
newDirection(@); 0 r+ T6 P) [& v3 s7 k7 G! f" B$ F
if @.Destination /= void then
6 @! M( z( p! t. x# R# u" E @.Destination.NumReservation :=
# o0 [. t0 }, F$ g( F: S! _0 Z# l @.Destination.NumReservation + 1;
& a% D9 G8 G* Q& P end;& R$ F: U" A! J$ o: ^
@.CurrIcon := "drivingHome";
( G4 ~ d" t6 k# K2 v" O @.DrivingHome := true;, @ I j0 L8 D% M' `; N
end;
, G1 H, w/ m- M2 h" L else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 I3 F& t; ~8 l( G m
part := @.transpOrder;/ w8 Q' `# Y9 \0 X; `$ y4 R+ Y5 Y
part.move(@);-- load part
[+ f0 U* N% F) K6 w2 { @.CurrIcon := "load";
% W/ }, i0 i+ Z$ T; q/ I% l/ o GlobalDistObj := part.globDestination;
# a [5 }+ {6 w) F) k) G% w assignLObj := rgmanager.rgAssignL;
- F2 O2 U, n$ s8 Q. `1 y& M8 ] row := assignLObj.getRowNo(GlobalDistObj);* ?! t/ D* l& X/ G k: Y# m
if Row = -1 then -- since 70; ^$ X) S, `5 }- ^* x
if lan=1 then+ f+ g+ m* g4 y/ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 w1 X5 O% E+ `: P2 j4 R to_str("in der Andockstation: \"",?.~.name,"\""));6 ~$ j7 a6 s5 B! H) f0 W
else( N, O& B2 t: _; f& ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 [- p3 ~/ N( _7 M2 @/ P* Q7 s
to_str("in docking station: \"",?.~.name,"\"")); , i9 k8 ^/ o- a4 a" R
end;3 r' f. O" d' c4 Z7 |8 g$ v* o8 I
else
9 g% Y/ c/ D6 [3 Y; S! t% C6 T @.Destination := assignLObj[1,row];
6 Z; R, x7 r! V end; 0 I1 a7 U3 d4 B; P( W" q- m5 D+ o( O5 c
newDirection(@);! d5 I9 }! Y: G' U+ k* j9 P3 C
@.HasOrder := true;6 {- X/ a4 e o9 ~1 ^) E0 M8 ?
end;& K5 e* E& s" |9 F) Z
end;
% L3 ^5 H5 _. J" }- c; ?end; -- of the method' j% r5 P; r" W7 v
|