/* called by: entrance ctrl of the object 'track'1 }4 v% @, m. a9 o: \5 F
*/) c. i; e" z9 a4 c7 K1 I' ?7 K
is
' H0 N0 t, d: E' Q2 u9 `0 T5 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;. K& D |7 \5 h
do4 D- {# ^6 h" k: K: ?7 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
, }+ ]; x9 a G! ` if current = @.Destination -- else return
/ v6 \4 R, a' r9 n0 [ I* n! I2 { then3 y' c7 D5 y1 _; I! H9 }* l/ g, Q" P. V
@.Destination := void;
% m- f. u' X/ ^2 d7 ^% U if @.occupied then
5 @0 I2 N E' Q5 k N part := @.cont;
/ K1 r# @0 X, X4 q- {& L @.transpOrder := void;
( Z; W* [* _! N H+ G" G- u& ?6 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) E, Q) f' [) g% k% S. V @,root.eventcontroller.simTime);
6 s$ E$ D7 B0 U/ s ]( C- o @.HasOrder := false;
1 U6 \# ^% i& D+ { @.DrivingHome := true;- ^: i4 W) [6 D2 M2 y* r; I1 Y- S! e
rgManager.tryToStartTransOrder;
0 M, C) Q/ B( G( c4 _ Q! z if @.Destination = void( \6 Y$ D- M* y- G
then -- no transport order for vehicle @- l9 x1 y$ ?" X# A
@.Destination :=
. U; M: E* R, k- m; W- h' q+ W rgManager.nearestFreeStation(@,track.~);1 r! o1 \5 H. Z
newDirection(@);
0 {( U w1 ]5 y" V& ^ if @.Destination /= void then) d& s: Z; H" u; h
@.Destination.NumReservation :=% H* y4 k! v0 h) R3 d% V: m0 Y: Q0 \
@.Destination.NumReservation + 1;/ R3 |. y! J; G* [5 i
end;
) M8 e2 m: D$ }% Y3 S: { @.CurrIcon := "drivingHome";
8 d2 ~ }; ~/ j4 Y! c3 B @.DrivingHome := true;
% Q3 c3 g& C7 k( G) ? end;( ]1 k0 [+ h. i/ L2 c; m3 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
}6 y1 a' R/ H- K part := @.transpOrder;
/ T3 R9 @' {# u( l% x% m: l" B6 @" G$ g part.move(@);-- load part
) ~4 v( k N7 U6 M& R @.CurrIcon := "load";+ c! y7 E% ]% a3 V
GlobalDistObj := part.globDestination;
) m, {& G- K" ]2 n& |: z5 D/ D) ` assignLObj := rgmanager.rgAssignL;. L" b' J; i- ]( T; w
row := assignLObj.getRowNo(GlobalDistObj);. Y* W4 `& ]: L. {/ [7 p$ N
if Row = -1 then -- since 70
% E! M7 ^, s' G7 i1 _- D. W if lan=1 then% B! p3 x& l* C( o, C8 i# s0 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, D) U6 G; y+ {4 l
to_str("in der Andockstation: \"",?.~.name,"\""));
) ^9 ]' e- D+ G% E else
9 v% [- F% n6 M* h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," w, F; X+ g5 v* a! E9 O: u8 j
to_str("in docking station: \"",?.~.name,"\""));
6 U; L; ]' y6 `6 t) W1 i5 N7 z end;
}' U$ Z0 _8 z( \; p else! O" q& g. h, Z7 g6 @! a o8 l
@.Destination := assignLObj[1,row];
+ a- {' ?+ ^8 H# z7 ^- d end;
3 q; L; ^9 {2 Q% p1 g4 @ newDirection(@);
+ f* N' |5 P3 w- H3 C) V: d @.HasOrder := true;
7 i8 E3 ?$ ^4 {" I1 w end;4 ~, j; D4 c2 x# f# |
end;
4 O g( \% Z5 S8 }$ Rend; -- of the method
) m7 ], t2 s! W3 D |