/* called by: entrance ctrl of the object 'track'4 h2 T1 p- }1 @- c
*/
0 t. _+ R, U5 M4 J! P8 Ris
' Q7 a" T8 v% \. B+ o' } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, c: j" p8 J0 m5 ydo0 e. {0 U( i7 t0 X% j8 K7 `5 N
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ N6 ]7 x- X" ^4 p7 N w& A6 i if current = @.Destination -- else return) w5 P c, y5 |+ u
then
1 d. I& C& f& O( \ t# x; J @.Destination := void;
a8 }2 c v* O+ h* ?( D8 b* g if @.occupied then
, h- G4 }4 Y, p part := @.cont;) d: J! u, o8 t7 y( n5 d* Z5 J+ `
@.transpOrder := void;0 _: x) N" ~ S7 @9 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) y1 N1 C9 J) O9 p N& `' R# j$ w @,root.eventcontroller.simTime);4 M/ ]% w, @! F. H) ]/ H* W
@.HasOrder := false;8 x5 U( q4 N; b! G. [' D6 l
@.DrivingHome := true;
5 h3 v, I3 `: T% B8 X rgManager.tryToStartTransOrder;( c; ~! `1 O/ C; [4 G5 L
if @.Destination = void& f0 B* s- a, F
then -- no transport order for vehicle @+ F4 q8 {4 x* B* H' {
@.Destination :=
* t& x4 l" z) R5 l7 @& E rgManager.nearestFreeStation(@,track.~);
) ^5 H: v, n% L% o1 ^: q newDirection(@);
: L J. \& S, m! b6 x. n3 D7 l' u if @.Destination /= void then* \+ l# P1 q3 t% M+ T3 G5 ~- I# X
@.Destination.NumReservation :=, J5 P! ?. |% ?" F
@.Destination.NumReservation + 1;7 _" F9 _7 g9 _4 B5 g
end;& A8 Y% d: D: J, m8 J/ y7 L9 Z' e
@.CurrIcon := "drivingHome";3 k4 |: l5 |2 ~2 L( m
@.DrivingHome := true;. J+ {- @! V* S) {4 ~; o$ N
end;$ y. m0 X: V6 k1 c6 [& `* ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
r S6 y4 `0 D4 | part := @.transpOrder;1 S6 x2 k! H1 M1 y; t; G
part.move(@);-- load part6 O8 z8 n) G/ }: E; e4 d
@.CurrIcon := "load";
3 w1 O- C$ O$ s" q$ F GlobalDistObj := part.globDestination;) r' v. v0 k' \; a; I- u8 L% C
assignLObj := rgmanager.rgAssignL;" L R* [5 `6 c, `5 y
row := assignLObj.getRowNo(GlobalDistObj);, Z* u e& G5 H' a( O! N/ x
if Row = -1 then -- since 70+ T. B$ @. Y2 S# J
if lan=1 then
, L8 [& x; O( i( E1 {( ^ a4 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 R) D4 N% e% h to_str("in der Andockstation: \"",?.~.name,"\""));9 @% \; M& m4 f8 B
else2 ]/ ~, m) {" k) V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- g4 ~# O* P' _) M3 w, {* Y2 C" ]9 j to_str("in docking station: \"",?.~.name,"\""));
8 S+ K, ~7 \; q' e$ G, h" K end;- H |, d7 I: j, I# {% ?
else7 J; |5 v3 a1 O. P, i$ R
@.Destination := assignLObj[1,row];
1 s# Z3 b# @' X- R2 w end;
8 a8 O7 g& Y! [" Z5 J3 i( z newDirection(@);% @6 s4 b- C$ N6 A
@.HasOrder := true;! x# h4 f/ B) p* y+ r
end; w9 o7 n1 \$ N. y* Q& [" t
end;
8 P0 a/ f! f1 B+ R; q* O) send; -- of the method
! n2 J" A8 d$ i v7 g7 g |