/* called by: entrance ctrl of the object 'track'2 T' X* m9 _! S( ?
*/4 v9 ~& _7 I0 N- L$ d
is
3 T8 B f* t" i6 G9 c7 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;" h; s, W: s k. ]4 j e( l
do
9 U! D. w/ M$ c3 K! I Lan := rootfolder.Internal.Tools.AOLlanguage;; t; N1 I0 C" @, A$ e+ ?
if current = @.Destination -- else return
6 r' B5 V, ^, l- T' C% J5 S* Q then4 R2 u% b' e5 E5 P- Y
@.Destination := void;
* t! U/ G. m2 M% E if @.occupied then
/ `. s* `+ A) ` @- ~' i part := @.cont;
7 G; H* p6 y2 A: F1 t$ X8 H @.transpOrder := void;* z/ w: X% o) D; L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 R2 W7 n6 N* Y! @ @,root.eventcontroller.simTime);
/ o9 q/ C& Q$ ?% z2 f( M8 p6 X @.HasOrder := false;
# w- \9 d+ d" z6 m @.DrivingHome := true;
7 m/ B; K+ Z7 I2 O8 L rgManager.tryToStartTransOrder;4 Z( A% z9 [' w6 u
if @.Destination = void
) i* w: _7 M4 I% F3 ^ then -- no transport order for vehicle @
8 t9 B5 s+ F N9 a8 Y3 c; [ @.Destination :=
- U9 ^9 t2 t- W3 S* j- Z rgManager.nearestFreeStation(@,track.~);) h8 r U. x; m! w6 Q5 z0 l
newDirection(@); : S! j1 J; |- g
if @.Destination /= void then# P* F1 A% v) Z) w
@.Destination.NumReservation :=
0 g, w( u- k2 h8 p+ a @.Destination.NumReservation + 1;/ Q( Y" Y2 W% \' l
end;1 j. d* M& l" H S1 ^; u/ {& T
@.CurrIcon := "drivingHome";
! E+ i- L: A+ Q& L, k E @.DrivingHome := true;
6 ?6 R9 a, y* K) I end;* ?* I. d( A5 s B$ q4 d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 @& H) v, E8 o0 W L; o part := @.transpOrder;
. t/ U$ b8 I; g- A; ` part.move(@);-- load part
5 d* J, F: _( H; { @.CurrIcon := "load";$ g; r0 T) m, V5 s/ z
GlobalDistObj := part.globDestination;8 v/ n3 V. f5 \) h7 r
assignLObj := rgmanager.rgAssignL;
8 J# ^* D; ]# C+ Z1 p& S/ I4 U; M row := assignLObj.getRowNo(GlobalDistObj);
/ o; h9 v4 a1 U% c9 Y8 U# U if Row = -1 then -- since 70
1 U+ F% V p' y% e8 A if lan=1 then
" {' J ^- C. L1 W5 E/ R% J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 H6 f% e! u4 m2 \ to_str("in der Andockstation: \"",?.~.name,"\""));
/ G8 w; B) Z' m! i else" b1 D W9 W' p$ r; E" g* u. f9 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 @/ x& N N, D: ~$ T' S
to_str("in docking station: \"",?.~.name,"\"")); - Y- G! c5 j+ i" c( D
end;' f4 E3 r1 m. q( u- e
else! g. V0 k9 m$ p5 ^
@.Destination := assignLObj[1,row];$ b+ o, H8 O2 ]5 \1 j7 `) E5 ]$ H& ?
end;
6 P/ x2 F- E4 h% Q2 X8 c. e newDirection(@);
" }% N" s* K. u" g- G/ J+ Q6 t @.HasOrder := true;- r8 X9 H5 q9 ?6 G0 m A
end;
, G4 L& j; x7 @0 O+ b end;- j5 x) Z6 I7 H& z( ~/ U f% S
end; -- of the method1 I& l- R5 n! ?
|