/* called by: entrance ctrl of the object 'track'
7 E+ J$ `: z6 z& c*/
6 x* s h$ S1 g" s ]6 vis
. D* `" A6 Y5 \4 e; D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ]+ A$ J, i9 M6 \/ Bdo
# _0 u. n N& v) z4 r0 G# P( c Lan := rootfolder.Internal.Tools.AOLlanguage;: J% z& f2 E: \) b; ]
if current = @.Destination -- else return$ c) L2 Y! B+ o
then
: ^- Z+ Z( e: I; b- d' s( B! w7 k @.Destination := void;2 H2 `6 T4 Y: I2 r3 |% v( ]) t
if @.occupied then
( {' z$ L1 l3 ^ part := @.cont;
0 e6 k: `% z9 g5 Q& } @.transpOrder := void;, \3 B5 T- W K" E4 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" l" g+ Z5 j" x @,root.eventcontroller.simTime);
+ y4 }' ]) Z; L* J5 ^" m8 j @.HasOrder := false;
# p9 p3 k& q* { @.DrivingHome := true;
. n) k; Q: _4 b( w( l rgManager.tryToStartTransOrder;
1 o4 r) \7 s# o" j5 Q if @.Destination = void
! P0 n) X% [8 n1 y then -- no transport order for vehicle @
$ }( r* Z3 T9 l& ?7 }5 Y" Z( T @.Destination :=
) w8 Z: P9 V; _: \) | rgManager.nearestFreeStation(@,track.~);
/ i# o: h5 O+ R+ d/ S; L" e) D& F newDirection(@); 0 a+ m# o/ K* W: y
if @.Destination /= void then
v6 Q( V3 L5 G/ A# X @.Destination.NumReservation :=
& a! D7 c; S* R0 p8 a @.Destination.NumReservation + 1;7 b) ^# ?/ n5 u9 M+ K' m! j
end;
9 }( Q5 x: p- u. c; @9 F @.CurrIcon := "drivingHome";
7 u4 N& _/ ]% o; ` @.DrivingHome := true;
1 T; x7 X* y& o1 _/ [' v end;
" L& c( r; g9 C7 H, X6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 l2 A' Q" d: N5 Q part := @.transpOrder;: z; \4 y8 e" T$ h
part.move(@);-- load part
3 ~! Q( b5 c9 K @.CurrIcon := "load";0 w |+ _% z, R0 D9 d: I) f
GlobalDistObj := part.globDestination;
4 v- Y6 c- y$ b) d" e) Q( [% B assignLObj := rgmanager.rgAssignL;1 X# Z: m. n$ H0 k
row := assignLObj.getRowNo(GlobalDistObj);" m7 C' C4 M2 d: t
if Row = -1 then -- since 70
( Y( Y3 \# O7 _1 L1 b if lan=1 then
1 ^. ]; k2 S) j8 u" M; l. W; e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 ?; ?) ~- S X7 G to_str("in der Andockstation: \"",?.~.name,"\""));. |( @4 w, H# W; |4 V$ F
else4 t) Q8 H& R6 U" w- i* s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- Q, X$ {5 Q3 Z x8 D' \0 A+ I% F: o to_str("in docking station: \"",?.~.name,"\"")); u, o/ T' z! H2 Z+ [: W; C
end;
! o! e4 |0 V# F4 R* n" V else) x2 Y% M2 t6 B- \+ X5 P
@.Destination := assignLObj[1,row];
- z D* C. J( m% w: ]7 w% |& V end; / }% Q. p* b2 V) F$ ^
newDirection(@);2 l$ c. k% D* z) B, a% r2 M* Y
@.HasOrder := true;
/ y8 L4 n: s2 ~6 j1 C end;# W/ s3 `% F; y5 s* j+ j1 R* Z- u$ J
end; J: {& v* j: e8 R, G8 f1 \9 v
end; -- of the method
$ R& y0 v" w2 p! d7 v |