/* called by: entrance ctrl of the object 'track'( W( m$ E5 G4 e2 _: \& C
*/
: J* N3 A- x2 Q, ]& Qis
; V5 m. s6 u# Z, L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( S T/ W! E' [: Z9 @+ pdo; @/ Z5 w; b; A* N! ]
Lan := rootfolder.Internal.Tools.AOLlanguage;; m0 G9 R' D$ i( w) e
if current = @.Destination -- else return$ r' i0 ~9 j' c) c/ I' V- t
then) @3 e- _6 l, H4 [
@.Destination := void;
( G# r4 _; a* a( H if @.occupied then
+ W4 h8 A7 J. a3 F) M part := @.cont;2 r+ d3 F3 Q4 B1 k4 v" U
@.transpOrder := void;* A6 g5 N) s- c/ O) p2 w' x. N5 U1 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 \3 p. o- n9 u# v3 p+ n2 S; C o- h @,root.eventcontroller.simTime); |- x' M; G, ]1 M) e; ]1 l
@.HasOrder := false;7 a2 V/ x* }! ]( v" {; f3 s* v
@.DrivingHome := true;2 T$ v+ }6 @! w& |9 o; O
rgManager.tryToStartTransOrder;
8 p/ j1 h$ i; R" ~0 }6 A if @.Destination = void
8 d# `' u; j1 ^ then -- no transport order for vehicle @2 {; B0 v" {- o1 K! S" y4 J
@.Destination :=
( Z4 x! D% L5 L rgManager.nearestFreeStation(@,track.~);0 ^: o9 a* y5 V l5 u: l
newDirection(@); 5 P+ c T q6 s
if @.Destination /= void then0 I* q+ V* J! S6 _, Z$ D0 o
@.Destination.NumReservation :=
0 n" H a9 Q T; P/ [5 X @.Destination.NumReservation + 1;: A8 d6 g, |4 v/ F. L
end;# o) g. {, G$ n- Z# ]% j
@.CurrIcon := "drivingHome";; _0 }. _% g7 o* {
@.DrivingHome := true;8 V5 ?3 m8 v$ A/ y% H$ h/ n! B" U
end;
$ z+ r2 J2 e" t, x2 K- Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station ^4 w S, V7 j) q2 f' G
part := @.transpOrder;
3 l" d5 U8 r! \. [# n) y& g part.move(@);-- load part R4 ]" G0 C1 M% s0 j: {
@.CurrIcon := "load";
3 ` O) s7 z# ~% a% q. W GlobalDistObj := part.globDestination;$ ^; _3 d& y1 K# ~) s
assignLObj := rgmanager.rgAssignL;
2 `* L0 H" M8 K; N2 i* ~' R7 r" t row := assignLObj.getRowNo(GlobalDistObj);
B4 n% M R/ h5 a if Row = -1 then -- since 70
4 a- D* I/ _3 B$ `4 {) S if lan=1 then
" K4 M& [5 B5 D; T" ?3 |, i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 k) M, T3 q* J7 v& U
to_str("in der Andockstation: \"",?.~.name,"\""));
+ U$ \4 M; k5 f+ [3 _ else+ ~/ W8 E3 t, v) F$ D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; a/ l1 Y% n8 d+ L; D H
to_str("in docking station: \"",?.~.name,"\""));
) d+ j& S# c) G: m* M end;
" X7 E' U9 \: t8 g4 L# ^ else; m9 ^! z6 N3 T/ _" P$ `
@.Destination := assignLObj[1,row];
+ g& I+ m: I* s o$ A7 J7 c) y end; ) h" t% H2 E3 k, a. c
newDirection(@);
' ?& U) m0 P8 ^* K5 Q @.HasOrder := true;) ?$ Q2 I7 @" d2 _: }
end;
. E; l. k# ~2 K3 }6 I' ~8 a$ P- u$ C end;
( b& k% b6 G& mend; -- of the method" }9 w7 L; _" E& a
|