/* called by: entrance ctrl of the object 'track'* r% t5 {1 D9 f3 G+ s0 c' H" a
*/% o! j# \/ K* M& h% R% n
is: [1 {0 _5 j5 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 Y& |% `7 h3 I) {# T$ y9 |do5 F1 V9 X0 n- j
Lan := rootfolder.Internal.Tools.AOLlanguage;4 S+ n& _$ Z; L: z% }3 z; W3 W; u
if current = @.Destination -- else return0 I$ ~3 }: j& `7 q9 c: y; o
then/ |+ V5 ^9 @+ v. \2 N& i% r' ?% `% M
@.Destination := void;* e" [! L) W9 o. I" V. |' _: [
if @.occupied then
% K9 c. ?- I8 X part := @.cont;' X9 G: E3 e' ]; D' a# g
@.transpOrder := void;
7 N1 M% [ o2 ?- W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j. D! Z- a5 r @,root.eventcontroller.simTime);% D( P6 `) y- K6 ?) a' _
@.HasOrder := false;
, o) H _- P& X9 k; k2 s @.DrivingHome := true;
; A3 n7 o, T$ e. G# V* Q. I rgManager.tryToStartTransOrder;
% h9 o' |1 G8 U) I if @.Destination = void
$ Q2 n! E- O8 _' `+ `7 M7 y8 O" c then -- no transport order for vehicle @
- S' `' |+ M: r8 [6 ~7 H1 |6 y @.Destination :=0 o4 | I3 I8 L7 p: \5 T
rgManager.nearestFreeStation(@,track.~);' J6 A* n5 A- T) u5 j4 }+ S
newDirection(@); 9 i4 [9 ?3 }' I
if @.Destination /= void then
- f6 s( A2 x3 T3 q3 W, z @.Destination.NumReservation :=
8 X$ T& `3 ]* W1 A# d @.Destination.NumReservation + 1;
) f. Q L5 p5 v& R0 C5 z end;
* P( F# |9 @% T$ c @.CurrIcon := "drivingHome";
* s u8 u6 i/ r/ U @.DrivingHome := true;
6 s; N- r+ l6 f" V& L, N end;+ ]; W5 \% N) I2 M9 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' d0 M- _3 @0 e" z8 {( m part := @.transpOrder;0 V! r h9 ^- r% v4 q
part.move(@);-- load part8 `2 T5 d) g+ k' B
@.CurrIcon := "load";
, L6 \1 P7 S1 _2 l& M; k GlobalDistObj := part.globDestination;
' C2 g! ~& x9 e8 [ assignLObj := rgmanager.rgAssignL;
* L9 u4 S0 ] m; V row := assignLObj.getRowNo(GlobalDistObj);
# g6 m9 J+ r' b7 z3 k; Z. P* L) \# i if Row = -1 then -- since 70- l3 }5 `4 o9 g3 w+ }! s
if lan=1 then) T) q. P. z; N9 u* \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# I& I y1 }6 y4 P to_str("in der Andockstation: \"",?.~.name,"\""));
D* [# W9 ~1 m5 g/ G7 @" F6 i else
7 c c3 ]! }5 G3 X n. x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
d0 f' A! G' {# R: k to_str("in docking station: \"",?.~.name,"\"")); 0 o1 s# G1 ]2 T/ s+ w2 x# j
end;
, [' x( l; R4 E. I5 E; e else
+ p1 r, X; y$ [5 {+ a; z @.Destination := assignLObj[1,row];
: o" \2 S1 \) Y; w end;
+ N+ M, l4 M$ P& u( t newDirection(@);; g; R( E+ Z) x& a. j. A' a
@.HasOrder := true;& S" p4 t" c- A8 @- h; i$ u3 r& Y! g
end;
5 A K1 |3 I2 J( s$ u( I _4 f end;5 _. j( m* S+ V* \
end; -- of the method- i4 e: S9 s: t
|