/* called by: entrance ctrl of the object 'track'
! C; @+ K* J& |* V& u" j*/. V; f/ l7 B0 H, Z. D8 ~3 s
is
/ k2 h7 W5 L# ^! x9 y0 [$ G v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) h- [+ W) _" F' e( q3 J! ido
/ ^4 G- ~! a3 F; n Lan := rootfolder.Internal.Tools.AOLlanguage;
9 g$ ]' ]2 Y. s) Y) c8 S" X( u$ R if current = @.Destination -- else return
. ]0 j& z: a. m. C0 B) t1 Y/ k1 X# K% c then
3 L2 o# y( _5 F+ }. z# G/ V @.Destination := void;
# z+ O+ P/ |% s: I if @.occupied then
' G9 F F/ L+ f3 S4 q% @2 [ part := @.cont;# j# L# S# b) l4 D& R
@.transpOrder := void;3 c1 g' X7 k! A" c) \( _* m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," l) d4 L9 `7 r( w
@,root.eventcontroller.simTime);& g0 D7 Z6 c% v$ i' N. [
@.HasOrder := false;
. M3 n& s; Q- R/ t5 _' ]9 `' t @.DrivingHome := true;
& W/ \: ^+ Y2 g/ q rgManager.tryToStartTransOrder;, `7 I0 S& c; _9 J/ Y5 Y0 D
if @.Destination = void8 d8 H( J2 F7 Z& G) }2 k
then -- no transport order for vehicle @
1 p' V9 U' ~; J( e- C, f% o$ ` @.Destination :=
1 Z& ]5 ?% i# n9 d2 o) r+ E& I7 R rgManager.nearestFreeStation(@,track.~);# R9 G5 J+ `7 T: j9 J
newDirection(@); 0 V8 U. }* `6 i: \+ S- O! m
if @.Destination /= void then
+ J: r9 @6 l6 a3 G" G @.Destination.NumReservation :=2 e: @% |- b! N0 L. M2 }) U2 d0 b
@.Destination.NumReservation + 1;
+ Y! H) O# k9 t+ K: e end;7 g( P2 u; @! A) r/ C3 E; Z
@.CurrIcon := "drivingHome";
( C1 q2 N& H3 d5 l7 a @.DrivingHome := true;
. @! Y% I0 `" G5 D4 W end;
7 c, ]5 L& |, b: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 m0 r9 Z( O+ M8 ]& n* v( }& X part := @.transpOrder;7 [/ s. Z/ @5 W; t
part.move(@);-- load part+ Q0 {) S, c/ e, ?0 h
@.CurrIcon := "load";
9 S- P9 p" F! s( F2 |1 G GlobalDistObj := part.globDestination;
# H: v2 f& u3 Z' h assignLObj := rgmanager.rgAssignL;" G8 x, j0 T* `5 l
row := assignLObj.getRowNo(GlobalDistObj);
0 p9 u9 |# k& J, z if Row = -1 then -- since 70
; `( Q' ~8 _5 h$ h6 b+ d if lan=1 then
( `6 y% l2 k2 V: h( q& b7 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 e D) D, F" t3 k to_str("in der Andockstation: \"",?.~.name,"\""));
! |3 A8 W% U j. t else$ G& s6 K4 M6 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, O) j/ B6 }, E, T5 C
to_str("in docking station: \"",?.~.name,"\""));
% ?; u% Q; `% g& ^; M1 J end;
1 E7 H, g; r ^, E, V else" g7 E! o* N* {; D8 i" ]
@.Destination := assignLObj[1,row];
6 k. y0 O7 Q( i8 p6 a1 I end;
" d* R/ h! Q; D& o newDirection(@);) F' z2 h7 f5 a+ I
@.HasOrder := true;& M2 K# {: a, E
end;
* X1 z5 F* a! D9 h; o- }9 t. X end;
0 Z& P( b8 N( H6 R- } Mend; -- of the method% ?0 k. F$ J1 F" N
|