/* called by: entrance ctrl of the object 'track': O: d3 k9 X8 T
*/
! @8 Z1 i [' \% Xis( F/ \% v: A6 b% }6 A& w3 T/ x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ _3 L1 ?$ `8 x0 M H+ Kdo
( n* L- u) z( [8 z( W4 Q- ? Lan := rootfolder.Internal.Tools.AOLlanguage;
6 J+ d& U! i# E6 @5 X+ [2 Y if current = @.Destination -- else return3 R* w+ t* S1 ~; r8 o
then2 L+ n! V: c# R# ?
@.Destination := void;
6 n5 _% |7 _9 D% V, r" s+ \' a" b if @.occupied then
8 a( b. b8 ~8 i' L part := @.cont;
) ]0 E6 ?, H: W2 I- ~5 B! j$ ~ @.transpOrder := void;
6 Q* F' _4 q: J. Y9 Q- H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. h ^ G& |$ Y9 }0 G
@,root.eventcontroller.simTime);
1 e6 `4 y+ C; @7 _0 h @.HasOrder := false;
2 j) S, T, R, o @.DrivingHome := true; R3 ^8 d. H8 f$ d4 R3 P& `7 j2 H
rgManager.tryToStartTransOrder;* Z2 P0 M) Z( Y: N P
if @.Destination = void
, ~( {' l' ~& O7 I& k then -- no transport order for vehicle @
/ v7 }' ~% f9 I* T$ m) g @.Destination :=2 O& ~" @+ p1 R' _3 d+ @3 H
rgManager.nearestFreeStation(@,track.~);* h( |; `5 X% y+ W0 u5 }
newDirection(@);
_5 i/ c- o$ b: | if @.Destination /= void then3 N+ K! z n+ Y+ x$ j
@.Destination.NumReservation :=
# C, h; m6 i: l4 j8 ]/ a @.Destination.NumReservation + 1;
4 v3 s" _0 L7 ^6 t1 K8 ~7 S; J, S end;, ^* S0 L' ^: b9 J# s
@.CurrIcon := "drivingHome";
# Q- c7 s3 y! U# P5 F& ?. Z5 q' a @.DrivingHome := true;. g+ W5 @" g- t( e, Q
end; r: O) j2 x: A: ~ v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% M9 _' T+ ]# @" m% |' D part := @.transpOrder;: ~6 T9 Q% D; D, \4 A7 t
part.move(@);-- load part
- @% ?1 s" O! n/ ^ @.CurrIcon := "load";
6 {6 d! `; W4 J1 {2 |0 m- ?; g GlobalDistObj := part.globDestination;
( b& b1 o8 D* p) v& t3 K& g0 f- M assignLObj := rgmanager.rgAssignL;8 m9 }; I' e" c( D# X1 K# J5 |& t
row := assignLObj.getRowNo(GlobalDistObj);
5 \& x" [2 g1 L0 s! G if Row = -1 then -- since 70
7 i# M h; v8 M/ L3 p3 F if lan=1 then
- `9 l, A- v3 _/ U4 H r: l+ G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 w9 o2 I. D9 @! D- O' o/ R' S to_str("in der Andockstation: \"",?.~.name,"\""));
7 }' |3 G( v; | else
( i1 d$ b: u. v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 b8 y; i! y, i9 ^4 m. { to_str("in docking station: \"",?.~.name,"\"")); 7 I+ X8 ^- O; n7 k+ A! t
end;
- u2 n3 w5 Q1 @% z$ T& o6 `' H& ]( U% f else0 y# z3 U) t( {, i
@.Destination := assignLObj[1,row];" p0 j2 a/ Y1 j; G m2 M
end;
" t o) T$ }. b1 ?- `3 D$ I newDirection(@);' d* a& @! [* ]# ~9 h& a
@.HasOrder := true;
; B1 \ x. H9 x) j) q* | end;6 I; m: K) S( l" c8 |& W# t" Q
end;" U- U& i( q* A% T+ @9 k. M
end; -- of the method
9 f; [; w; x3 i& f6 B |