/* called by: entrance ctrl of the object 'track'* [1 d( Z8 [3 o2 U) L9 M, E( X3 a
*/
0 g) j M6 R. C$ G$ his5 e% x9 z+ |0 v8 J9 v3 f8 z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 ?% U5 ]( j5 @$ t) e' Ydo
9 w8 A! N5 ]" n) k$ x Lan := rootfolder.Internal.Tools.AOLlanguage; X6 A! H% C: V
if current = @.Destination -- else return
. D& k' B& c6 {* m; p) K then
w) a3 R% D+ E$ b# | @.Destination := void;1 l+ b) w4 m- y5 y
if @.occupied then
; ~& k: n4 X) w( l" p9 u8 @) P part := @.cont;
/ b$ D- V% O0 d @.transpOrder := void;1 i* S8 K* ?: x) \9 G; B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 o/ S( C! g" q# T! ]8 n: j: S$ s
@,root.eventcontroller.simTime);
6 e" v/ R/ D3 k0 Q8 P" r @.HasOrder := false;9 v& l( ?- K+ b
@.DrivingHome := true;
# ^) v+ F) t3 \3 S+ C6 ^ rgManager.tryToStartTransOrder;% M, l% T" U: D: o) P6 j8 c
if @.Destination = void( i3 D! _" V, n) K9 s3 w, w
then -- no transport order for vehicle @( Y8 |1 T+ J* y/ K+ e) R
@.Destination :=/ r! f9 R. L e8 ~; l$ P5 } d+ n V
rgManager.nearestFreeStation(@,track.~);
* \7 T9 n; F% I' I newDirection(@); # q4 X! i8 a* h$ y. Y8 w7 B
if @.Destination /= void then
& i* Z6 L# I" j0 I& I& _8 x @.Destination.NumReservation :=; i# T% ^* y7 m/ @9 T* i
@.Destination.NumReservation + 1;1 M6 f; [# a4 @0 }
end;4 U4 H @& ]" T7 }- p: n
@.CurrIcon := "drivingHome";
$ F" C) Y- N+ Z9 r8 [% l @.DrivingHome := true;
5 C9 L% T+ P! V0 C o c; E end;
! J) @- ?; J! }+ Y% v" I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; \, L5 @0 _0 S" V, X8 h" A* I part := @.transpOrder;
7 K( f: n& j. |6 M) e) I2 K part.move(@);-- load part2 m" k# o5 x- H1 v
@.CurrIcon := "load"; p1 w; p! V( s1 M1 ]
GlobalDistObj := part.globDestination;8 ]% g4 @; j3 T! s7 k
assignLObj := rgmanager.rgAssignL;! @0 |5 o( E. e# Y% R5 A' E8 b
row := assignLObj.getRowNo(GlobalDistObj);2 a) A* l% v0 V8 b- J: c1 M
if Row = -1 then -- since 70
( t& E' \3 t9 I# c- Y5 L3 G/ U if lan=1 then+ Y% ^% a; ]7 ]$ E0 s g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& M( t; x) l. x' i9 O; x2 a/ E' `* f0 Z to_str("in der Andockstation: \"",?.~.name,"\""));0 B* y9 D" O& |, p
else
2 J6 |. g6 i4 i: ]! G; f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& m+ T& {9 M; ^0 W7 K' X( } to_str("in docking station: \"",?.~.name,"\""));
6 ^2 a/ y0 _$ M0 v0 u end;& e, A' Y4 |; j' ] f
else
; A g0 P4 |8 N) I. y3 R! t) I+ b1 Y; } @.Destination := assignLObj[1,row];) K* r4 w8 b& Y. |! T+ D$ X
end;
% ^' i {+ U: L- ^1 b5 |1 C, s5 m newDirection(@);
5 |+ o$ Z8 T. y8 p Z" j5 c! e6 Z5 } @.HasOrder := true;
' `' p, t0 ]( |$ C3 [- n9 _ end;% [! r, z+ ]! @
end;
6 g9 t6 g! Z: n7 Cend; -- of the method( Z, I/ {1 ^# R% ~" Q' P, U/ b. T
|