/* called by: entrance ctrl of the object 'track'
; S; T+ Z! r1 ?1 d/ W3 N*/
, d% ]! ?- K T; D$ H! m1 Ois
0 ~" R( {0 y6 \- P+ c# q* ~$ t/ B. H part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ?/ \* ^3 _7 g: G2 _
do- Q! K$ |1 x6 n' w$ a
Lan := rootfolder.Internal.Tools.AOLlanguage;1 ]3 H& J. g4 M/ Z" O/ S1 i( M" R
if current = @.Destination -- else return$ Z7 f5 J0 {5 @' x4 }0 I4 w
then( A$ I* p% K! c) x/ U M, ]7 I
@.Destination := void;& U9 r9 {5 K" a0 j
if @.occupied then
* w7 [" o. e! g part := @.cont;
9 ?/ G0 D- J+ S# Y @.transpOrder := void;
4 o6 V5 U$ Z! h* q' o1 i+ U4 L& l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ G, W$ o5 J! x6 l" Y' T" @ @,root.eventcontroller.simTime);
9 d% q: u% t: ^2 v @.HasOrder := false;" p; z; p* ^4 e8 o& @8 u/ \0 G
@.DrivingHome := true;0 b* w( \# Q1 z
rgManager.tryToStartTransOrder;
2 ^% s* w+ s6 }% T; r% P7 Q: z if @.Destination = void
7 ?' }2 u0 ?& x# u; ] then -- no transport order for vehicle @9 q A |6 i: @' k3 b% h
@.Destination :=
5 d0 x1 M; N/ f rgManager.nearestFreeStation(@,track.~);
2 h" W3 l1 G7 y9 f newDirection(@);
5 \; g9 `# F6 {4 S- E8 Z+ m if @.Destination /= void then
3 }6 |* Y; ?* }- e @.Destination.NumReservation :=
9 |" P8 U) O/ }; X" | @.Destination.NumReservation + 1;/ |- k* A1 C( F
end;/ M$ @" ?9 x) S3 w; W+ N7 D
@.CurrIcon := "drivingHome";
- m' G P% ]* u: e @.DrivingHome := true;
- e6 v! x. a2 C m end;; q9 ^" T' O4 F$ H; f$ `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 ~7 b$ f' T& ?+ o% x part := @.transpOrder;/ x4 w9 c1 r! l6 w* M/ w( r
part.move(@);-- load part% V0 t7 a& j. O6 w8 x
@.CurrIcon := "load";
, Y3 ^) Q7 }9 u# N( e/ Q0 t7 s GlobalDistObj := part.globDestination;: j9 S$ g0 d$ M
assignLObj := rgmanager.rgAssignL;
* i1 J* w' a6 x9 i" N1 r row := assignLObj.getRowNo(GlobalDistObj);: M6 b3 r. T) r: f2 r
if Row = -1 then -- since 704 @, p. f9 H% e c
if lan=1 then
- h' ^6 v/ x" [# Z: a* X0 z5 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 A1 L! c+ t+ N [' _$ e to_str("in der Andockstation: \"",?.~.name,"\""));
8 j6 g8 h6 W0 X. h4 d else
' m H d" ~8 H) Y, Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& ^: ?4 Z5 {, h) | to_str("in docking station: \"",?.~.name,"\""));
6 l0 F/ y' D P: { end;7 i+ k! ]0 B1 I8 }
else
1 J% |' T4 F3 p+ Z* S @.Destination := assignLObj[1,row];# a, a. e |6 h( U
end;
+ u, T. _5 B& A2 |- R* \' o: ~. B newDirection(@);; }+ y# N: C. q; a7 X
@.HasOrder := true;
" [3 t" {1 g, `! V end;2 j* ^# i& B: F1 b: |
end;: E$ h6 x" n- X! z0 T9 [
end; -- of the method
( K4 y3 o8 C9 k' x# X7 F* @ |