/* called by: entrance ctrl of the object 'track'4 S% E" B5 H4 e/ n9 u# u9 y( y
*/9 P6 a ]* ?* h( C8 e% i" |
is
7 g* _9 m, t- L+ T part, GlobalDistObj, assignLObj:object;row,Lan:integer;* W! _1 @6 x8 P9 e* d7 r
do, a3 X8 U; I9 @4 X% Y/ w' Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 s: h. x" e( w, d+ o! q if current = @.Destination -- else return
3 o% T" M% z/ j# \6 T then
: g: t/ g9 C; f \4 { @.Destination := void;6 ?5 W' T: @8 D: v' W
if @.occupied then% F+ ]7 i4 q0 x& W" T$ F
part := @.cont;
; i5 v3 k$ i/ X% @4 d @.transpOrder := void;* m5 o. f1 l J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) f& u! d' i# o" _" l$ U: Y9 k
@,root.eventcontroller.simTime);
$ Q$ K! w2 f6 H, a, R0 A/ } @.HasOrder := false;
& s0 D3 ~. O3 I @.DrivingHome := true;8 b+ n( |2 q" W2 ?' U; K% e
rgManager.tryToStartTransOrder;
, c% I4 C% C- U$ J+ C7 B& t if @.Destination = void
1 |% e9 a! p0 q3 p+ e% O' o. ~ then -- no transport order for vehicle @
; m& z+ P" f9 v @.Destination :=
c$ l0 q$ h. @+ m: x rgManager.nearestFreeStation(@,track.~);1 \* }: B- A/ Z0 ^9 O9 L
newDirection(@); ' t: P3 D7 L# S' ]
if @.Destination /= void then6 O; O: V4 G, q) |. L6 {9 V
@.Destination.NumReservation :=1 k! l+ p' h" Y' \) A
@.Destination.NumReservation + 1;8 L* ^ ?+ H8 m1 Z9 a* d% P) c$ y
end;
: f5 M: |7 b# P% Y7 s- N) a, ? @.CurrIcon := "drivingHome";
2 a* [; f, l& w8 n @.DrivingHome := true;
/ z1 u* ]+ f/ v- y& U5 \& O1 G end;
% |% w+ U; L6 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' A% G3 F1 N3 D, {0 N) [ part := @.transpOrder;+ |3 Y- |. _% A( R: W, n- u
part.move(@);-- load part4 N$ l. u5 C7 X3 W2 D
@.CurrIcon := "load";
+ T- G8 q' e( ~5 H9 b1 _ GlobalDistObj := part.globDestination;
I' ]- U+ g" v3 V0 ]' L( i; j assignLObj := rgmanager.rgAssignL;# S# L) J, d6 Q
row := assignLObj.getRowNo(GlobalDistObj);
: h( a& p' y4 m# q1 |9 }1 ~ if Row = -1 then -- since 702 \" I) R3 v$ }1 J* \( |9 P2 }
if lan=1 then
6 c7 ~( J$ k& l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ u- N9 A$ j# t5 _: ?9 p' k6 r2 s
to_str("in der Andockstation: \"",?.~.name,"\""));
8 [% ^$ `5 y0 i else) U. \7 D" e* D* I6 P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 P. c& W Q9 l( k
to_str("in docking station: \"",?.~.name,"\""));
( s' m' F, |& z4 r" o7 O4 s% S end;
/ z) _; a. _3 y0 H! b1 o else/ |5 e* F9 I4 T& [, F: ^
@.Destination := assignLObj[1,row];
& y" J8 h$ L: p; ] end;
( X4 V5 J, R& P8 _3 Y1 E# z0 h newDirection(@);& L+ i- r$ a1 _! t
@.HasOrder := true;
4 m9 p& k7 U% t2 [ end;- e+ ~" }2 b- H; L/ R- t
end;
F1 p& s6 C$ x) w& D# C, Send; -- of the method
/ Y) C( w$ t2 Q5 X |