/* called by: entrance ctrl of the object 'track' ?! H: h& F: l, L) R# O
*/
* o: a' |3 ]; I+ |& tis
1 L& j* s4 E, m% i: j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& ? k7 d$ P8 Hdo( O+ a* d) p& d
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 J" D8 h3 y* W, d if current = @.Destination -- else return0 D( u" f5 Q7 C2 S Y8 C
then
) Q+ K e. q. T @.Destination := void; c. q/ H9 t" j4 w* c N. z2 b) {
if @.occupied then
% ?( o0 H; y" h7 w& U* Y! e part := @.cont;
8 d) A t2 }) L- n8 X, z @.transpOrder := void;
) P C, f* p& ~# r) D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& E* g% g. u* |
@,root.eventcontroller.simTime);
. @7 [7 y1 {3 x* @$ H @.HasOrder := false;
. l/ D6 E8 N# e# a @.DrivingHome := true;9 h1 P2 O9 C. U$ n1 j9 `
rgManager.tryToStartTransOrder;3 e1 t7 V- {7 D" C8 f. U4 a
if @.Destination = void2 G) o1 d! E6 W
then -- no transport order for vehicle @
4 n6 E5 R2 \% C5 I* j1 \3 p @.Destination :=
9 j% @ q, M; u; T rgManager.nearestFreeStation(@,track.~);
: z o- e: l( F: v3 K newDirection(@);
8 P8 T4 z Z2 u if @.Destination /= void then
9 @5 e! Q" E: z+ [ @.Destination.NumReservation :=
0 k8 y# o) p2 @3 o4 a* B @.Destination.NumReservation + 1;
. D- J7 E9 X$ M1 S end;; F$ J! M- ~" _5 G
@.CurrIcon := "drivingHome";
4 j& t/ V" _" _4 _4 H4 t @.DrivingHome := true;
' q% |3 g' G) `! O# b end;
; z; X: Z. I% l( e# c+ l S- s else -- the vehicle @ is empty, both vehicle and part are in the same dock station' L* I4 z9 T# r* q" d
part := @.transpOrder;+ D# ]. ?) ^* W' { a
part.move(@);-- load part
+ g9 v2 m% y1 H3 { @.CurrIcon := "load";
: x: ^% h: t2 B/ L& x GlobalDistObj := part.globDestination;( O* }( E9 e* t) j
assignLObj := rgmanager.rgAssignL;3 i* C- X7 h6 \8 @; L
row := assignLObj.getRowNo(GlobalDistObj);
2 V4 O: v6 ~, ?$ W if Row = -1 then -- since 70# S: @% [ a% O% L+ m7 E* l
if lan=1 then d2 Z& y3 o0 c1 B) y# ]# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), B' @% ]7 G' M
to_str("in der Andockstation: \"",?.~.name,"\""));- I% m* a4 r: _+ D$ B
else) V7 Y/ Z0 ]0 F5 B# L% a/ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 _6 M. B( Q5 l8 `8 G) K
to_str("in docking station: \"",?.~.name,"\""));
! }/ ~6 d: S7 w; n9 v9 u) u8 l end;
8 U0 _& Y* M& g: ?" R else; s O0 U+ Q7 j7 d( x
@.Destination := assignLObj[1,row];1 ^( f+ l2 b; H/ e
end;
* H; v/ G. R. F1 H3 A newDirection(@);
9 \5 d ]' e+ }2 e1 G% d: ]: f @.HasOrder := true;
+ ~5 ?$ F3 r2 \ A end;6 c" C( m9 U2 F: E9 z' L
end;
/ u1 c, a$ x; p: g5 f' Q/ ]4 G, tend; -- of the method, t" R, H" q3 W6 r
|