/* called by: entrance ctrl of the object 'track'
9 Q+ a, y9 e) u. ?7 e*/
6 ~+ u p- b9 n1 `* ]is
2 }$ s, v) x* q( U: I( h part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 i4 @( e. p* _& _
do
6 o' l! C& w1 { Lan := rootfolder.Internal.Tools.AOLlanguage;
2 y) Y! c. ]" ?% f if current = @.Destination -- else return" Q8 a0 {, q1 T, ?
then
9 s& y! v# c( y' f( D @.Destination := void;/ L% h4 M4 I$ ]/ _$ w( l
if @.occupied then
0 q7 `( R6 C! x/ r: ~ part := @.cont;
+ N3 [7 J2 G1 e* x4 U @.transpOrder := void;( ^% s' Z: p* q( ?8 Z3 ?9 x0 e( L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, h; Q0 ?& \. ^1 e @,root.eventcontroller.simTime);! M' h- G* F5 n" d! }% S% u) ]6 T: G
@.HasOrder := false;1 p# M' E" j9 e; ]9 r( p
@.DrivingHome := true;
4 c1 {. P# G% D0 S4 O2 G& { rgManager.tryToStartTransOrder;1 Z7 N) r( \9 R
if @.Destination = void9 G" S2 `$ ^- J* ]/ s
then -- no transport order for vehicle @/ X% y) N% z' d( Z; A; u
@.Destination :=
. A* b' W4 J/ c3 q rgManager.nearestFreeStation(@,track.~);( [7 Y% g6 u' @" a
newDirection(@);
6 W) o( L; z: ?4 i: w if @.Destination /= void then
0 c {7 p& u7 A: n& _$ w @.Destination.NumReservation :=
Z1 V) O( {" C2 m @.Destination.NumReservation + 1;" i. Y5 X; v# T& u! O. P6 U
end;& ]3 a" E3 u: p2 H2 O" U
@.CurrIcon := "drivingHome";7 E. C0 `" o6 E( D/ F Q: b
@.DrivingHome := true;
8 L {7 F. p8 {3 W end;3 o7 h! x1 N ^' c( Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Q* K" R% Q8 W( W part := @.transpOrder;7 g, Z7 ~( Q$ K4 O7 m$ W& l6 y
part.move(@);-- load part
2 j$ x& d! F0 u7 u, ~ @.CurrIcon := "load";. T, K/ ^% S" H1 [( |
GlobalDistObj := part.globDestination;
4 g2 _% b) O2 E6 _* T1 L5 E assignLObj := rgmanager.rgAssignL;
8 u2 F+ d9 L8 k' k% ^; Q row := assignLObj.getRowNo(GlobalDistObj);
+ o- o% B6 {# S3 ]: a1 k3 [* I if Row = -1 then -- since 707 X+ {& j1 M, k! U9 I" u
if lan=1 then( ^! j0 g/ L" ^# r S% ~; |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- a9 t6 {: h2 h/ G7 A3 z
to_str("in der Andockstation: \"",?.~.name,"\""));
( d) `0 @% \: q7 X else
9 D# X; V$ Q7 N& S3 T# M4 ^1 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! [- [# c# L3 N0 Q) |
to_str("in docking station: \"",?.~.name,"\""));
; O3 S u; f" N: b& B# k$ N end;
% L* \% ]2 I2 u. F" {' c else
5 C# X% X* C) |+ R* x @.Destination := assignLObj[1,row];: ?0 N3 K8 {4 ^5 M+ g( `5 j
end; ! Z" z/ ~' _: }$ h" L A' I2 g
newDirection(@);' b8 t* |0 Y U; R- n" H! g8 R
@.HasOrder := true;
2 w+ K& ]' K- N" p8 i end;* X' c5 f' B6 t/ u( g9 u! S
end;$ {% \5 H* \* Y
end; -- of the method
J: q' v2 |* n H |