/* called by: entrance ctrl of the object 'track'& c4 D! T9 K& n+ v* c+ m
*/
* ~2 b& `+ {8 ais$ E+ M0 x% D' ?4 {2 Z( E0 t" v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. {7 O: q$ O: q& u% gdo
/ D* }( h3 r0 t6 d- e; Y6 v q! U/ K Lan := rootfolder.Internal.Tools.AOLlanguage;
: b& }9 x+ H6 k& |& E# Q if current = @.Destination -- else return
( p9 x* I) E4 p$ o then/ C s1 E+ ?& Z# M& v
@.Destination := void;
3 }+ H* W: K* w" v) h if @.occupied then* t, p; {# m- I2 K
part := @.cont;
9 Q! P3 K# B2 C5 Y @.transpOrder := void;' K9 n9 F% u( N1 t% Y4 y* r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ o1 V# w/ p& q3 V @,root.eventcontroller.simTime); }2 F8 K9 U+ j. h5 V2 H3 r4 Y7 ~! V
@.HasOrder := false;
5 w) C4 l6 V9 M( V& h8 y( d @.DrivingHome := true;
6 r& [5 h6 |' z( } rgManager.tryToStartTransOrder;9 o& U; a/ P) d. f4 h, {$ a0 {
if @.Destination = void5 h* _* b- l, ?$ D0 A/ j' z
then -- no transport order for vehicle @
" v5 s0 k E% C1 Z$ t4 F @.Destination :=
& k& w/ b! S; L5 V8 v! n rgManager.nearestFreeStation(@,track.~);- x; \& w+ |5 s
newDirection(@);
' G4 `( U$ C9 x: q9 a if @.Destination /= void then# D& t5 h: l& W0 S Z2 E
@.Destination.NumReservation :=
3 X4 y& @( Q: }- K @.Destination.NumReservation + 1;
' _& y$ I2 |# j! g2 k: y' \' q end;
1 T- c0 c+ N# x7 } @.CurrIcon := "drivingHome";
" G4 k4 g9 q* \, M t @.DrivingHome := true;
- ]4 I( z# n* ^2 N end;
4 E& r* p X$ Q o* p else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 A- D# [' Q+ C8 D, e$ K1 R: s: r
part := @.transpOrder;, x) ]5 P' D7 s' ^7 O0 S% g$ n
part.move(@);-- load part
) v0 a6 X. X* k! O8 O/ S( r' h5 Y4 B @.CurrIcon := "load";" n& e7 c e. A7 j
GlobalDistObj := part.globDestination;
5 U. T* I& V% @6 C' }" M$ @& V' M assignLObj := rgmanager.rgAssignL;- {$ ^6 T* P" E3 e' T7 L8 r
row := assignLObj.getRowNo(GlobalDistObj);2 G, V* E7 T5 F( R7 i w( N, e1 l9 C
if Row = -1 then -- since 70
1 a- |5 g5 g# B0 q2 V( N' E if lan=1 then$ l# _& f" D. t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& }8 O3 j7 s( w) ?9 ^/ L to_str("in der Andockstation: \"",?.~.name,"\""));
6 Q$ ?* U! W0 O) D: V" J else; K; m. I( _* v6 X! t* B' J2 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- Q$ c0 P9 Z, S5 r6 R) M4 m
to_str("in docking station: \"",?.~.name,"\""));
1 t7 b5 M& G! i0 }9 g4 r/ @) y end;7 ?7 c5 r. A& Z. _1 Q7 O( P* _
else) `) y- @1 p3 v; s2 Y
@.Destination := assignLObj[1,row];* f; ~/ l( i, c
end;
Z2 ~6 b k9 y" q newDirection(@);
k5 ^/ d, K5 x2 O6 D" s @.HasOrder := true;# ?- i9 o# Z; ]
end;
" [! Y- C7 @7 P5 c/ J6 e end;
, p3 p9 e1 } g( Wend; -- of the method- s, g5 K: {% i% P
|