/* called by: entrance ctrl of the object 'track'+ C# q6 Z' M$ [
*/& @3 W4 \, C0 D9 m3 G
is
" G. e& p- {$ n! R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 A K7 _6 B/ ?8 P% r2 O) qdo& l" k, P# r/ u( e; e
Lan := rootfolder.Internal.Tools.AOLlanguage;
, q) ~* a6 d, U/ p( \ if current = @.Destination -- else return
2 E+ N7 ^$ t) n then
4 p" }# n1 ~' ~9 u+ ^ @0 I! x0 c @.Destination := void;1 C" ~) G3 \8 v G. g$ B2 T
if @.occupied then5 |# A3 L: l2 G2 }, j) n1 W# q/ g
part := @.cont;
. e% M: O; l4 G: g; F; S @.transpOrder := void;6 q# Y( C$ l; _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" e7 ^+ M9 D2 Q) r9 O- S4 W0 l9 s$ ? @,root.eventcontroller.simTime);
; W+ j$ H; Y4 P$ o( c @.HasOrder := false;2 h0 e) @) w$ a0 h: K n& B* P
@.DrivingHome := true;
# c* m/ d: l J7 B0 j! \ rgManager.tryToStartTransOrder;, D7 E7 l/ Y1 u/ k: A1 J
if @.Destination = void# ^: x$ n( C0 L2 @. P
then -- no transport order for vehicle @; |9 P5 Y7 v$ a/ T U
@.Destination :=
7 C6 \1 Z) ^7 [ rgManager.nearestFreeStation(@,track.~);0 o" Z3 }, n } G$ o6 S4 ~
newDirection(@);
4 e0 x+ t1 H! l' ~' U! A* z if @.Destination /= void then) y& I" @; q* \. \3 @+ Z' M
@.Destination.NumReservation :=
$ B7 ^; l0 O+ n# m @.Destination.NumReservation + 1;% }0 }; g( Y3 o: F
end;7 \) k o( N5 _; Y* y
@.CurrIcon := "drivingHome";1 u. j8 {, z/ ` A
@.DrivingHome := true;
P% _# G+ }! I1 Z end;# E& U" b# I3 k ]. L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ W4 P# K) m1 {2 B. E2 a part := @.transpOrder;
9 {+ L* U! Y+ f3 ^, c part.move(@);-- load part
: `2 z& K4 r! G @.CurrIcon := "load";
7 d# }0 d3 U8 [* y6 J0 Z GlobalDistObj := part.globDestination;
9 ~0 q0 p- r5 \& E( T assignLObj := rgmanager.rgAssignL;& S% D0 t) X% c$ ?6 L
row := assignLObj.getRowNo(GlobalDistObj);
! X7 {* S0 @1 { if Row = -1 then -- since 70
2 s+ L1 x2 @8 \# c7 p ?5 A' V if lan=1 then5 F- D" y3 i6 }# t. k) b: C, K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) k" ^# o: I8 S to_str("in der Andockstation: \"",?.~.name,"\""));
' L |# T7 k9 R else1 u c1 F# o( Z1 ^! f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) V1 O2 n) i; q" p1 [# m* v to_str("in docking station: \"",?.~.name,"\"")); 8 E; v6 z, _3 |6 Z" x, y
end;; N1 a6 T2 \! E& o3 R1 R+ B
else& x |! b y" \& c
@.Destination := assignLObj[1,row];
6 @* g7 e/ E4 E end; 6 t# S; z9 [1 `3 E$ T
newDirection(@);
' \5 i% K- Z; z @.HasOrder := true;0 X" }0 f' `! P8 o+ N4 F2 w
end;
( q2 p2 t6 F [, Q8 Q: W end;/ b! l/ @' s% Z* P
end; -- of the method- `' V* V2 o; O6 V. b* f9 W
|