/* called by: entrance ctrl of the object 'track' ^1 E) I- d5 y6 l s/ x! h
*/) Z J; B; @+ p
is: W. I, `. k0 E4 m5 v X0 `- r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 H/ k# J2 e: ?9 f1 N0 g! Bdo* J& s% G: p* r) x% j5 n
Lan := rootfolder.Internal.Tools.AOLlanguage;- Y& Z5 O# l1 a+ `( a9 I
if current = @.Destination -- else return" X0 r. m# a& T& i
then- A. @) {! Q! v4 f# R+ d6 E
@.Destination := void;
9 @" H" v% @. ~$ t+ U if @.occupied then
0 W, F n9 \; E, S- r part := @.cont;2 }2 R# a7 ?1 a$ J! b, `
@.transpOrder := void;$ @" p. B4 _9 w( G" F3 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 K4 O3 a" e. J& L2 }0 v @,root.eventcontroller.simTime);8 U# h; ]& T: E, x; \7 W
@.HasOrder := false;
' Z1 r N! g% X' C- M: X) ? @.DrivingHome := true;
+ N2 P; T& V1 a rgManager.tryToStartTransOrder;8 _' m: n: i; @7 s" v" d; m5 O
if @.Destination = void
) G* H" R" J2 M# V( D7 ] then -- no transport order for vehicle @6 t9 U( d$ p7 _8 g( Q
@.Destination :=
; }5 R& o: ?, z+ ]! r" d, n rgManager.nearestFreeStation(@,track.~);
$ ?3 z+ \0 z/ \( S; x% h4 O newDirection(@);
% E8 z, |) Z7 z$ c1 `: b if @.Destination /= void then. v, I6 s& F/ a: J5 _+ g
@.Destination.NumReservation :=4 C% \2 P" {: s2 B* ]0 V+ C
@.Destination.NumReservation + 1;2 F" {) W5 h8 J. J
end;/ l1 |6 I2 o' A+ O+ {
@.CurrIcon := "drivingHome";4 v$ f/ `# Q# l% R% H
@.DrivingHome := true;4 b/ r. O4 q% }* \# U
end;
( _& Z- y' @8 ^4 ]2 b: M; [# Y5 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station- F( G! x B5 r+ M
part := @.transpOrder;
0 y! a. g5 S) g0 M i part.move(@);-- load part
" ?7 i- c2 I) _) Z' d+ x2 z/ g9 K# B& D @.CurrIcon := "load";
/ X) W5 k$ |( a9 U r8 X8 N GlobalDistObj := part.globDestination;
- I6 ]9 p- I$ @, k assignLObj := rgmanager.rgAssignL;
( _. q' y6 C* L row := assignLObj.getRowNo(GlobalDistObj);
# j% R2 \) {! p3 \' |8 m- X if Row = -1 then -- since 70' k; X" t5 u+ c6 c
if lan=1 then
% P* e0 @) b* O8 ?9 W+ \; G: P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), c; N g& u) Z: V* E) a" a( q
to_str("in der Andockstation: \"",?.~.name,"\""));- F8 G; a6 p8 v! x
else
. U9 r* I4 V$ `: i4 U# u; ]7 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 _" I: c( T3 W. | w8 t; j to_str("in docking station: \"",?.~.name,"\"")); # D5 E! z/ e% U6 k& C4 f" J
end;
0 O$ B1 I' k! y else& p; \ u# i0 z8 x
@.Destination := assignLObj[1,row];5 [( E% C6 e# L A
end; 3 J% T6 Y& F' D2 x7 y
newDirection(@);
. M9 r6 \% W, X! } @.HasOrder := true;: w4 D8 t' ^( Y2 { H
end;5 O7 u" m' x. L; X1 |$ E0 j
end;
/ S+ W- t! S" G' w- Rend; -- of the method$ H% |1 X- C8 M2 t" j
|