/* called by: entrance ctrl of the object 'track'+ b2 i% K* a: n# Y( K& q$ w0 t& {
*/
2 B6 [0 C; g' ]is
3 D5 T& \0 n* J part, GlobalDistObj, assignLObj:object;row,Lan:integer;! f5 }: d k0 @9 g7 a8 g9 @3 }
do" J: g0 |; \- A; g3 w3 U
Lan := rootfolder.Internal.Tools.AOLlanguage;! S; }" j6 [. x# e4 n
if current = @.Destination -- else return0 ]4 H/ J) i" w) e
then
5 u5 }6 u$ c- Y& ~+ X; H @.Destination := void;; N+ T K& x( r; W& k# h
if @.occupied then! F( Y( _4 ^- f! M- B
part := @.cont;
$ T$ Y( q d9 I1 E3 b @.transpOrder := void;; f7 X, Q, o$ S" t/ }) I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' L% `! d5 A+ P/ Z! T; |
@,root.eventcontroller.simTime);
2 A0 j! P8 B- t, a' Y @.HasOrder := false;
# G& N' A# A. ` @.DrivingHome := true;
. @/ ]/ I& }3 K2 ` rgManager.tryToStartTransOrder;
5 B8 t1 z1 S9 E" k9 X7 } if @.Destination = void( \, i" ?5 L$ v% o5 @+ V/ G3 x+ K. \4 n
then -- no transport order for vehicle @
) h, ?0 Q$ M. E2 e1 g7 ^$ D @.Destination :=5 B% v% k+ W6 o P* h1 Y4 U
rgManager.nearestFreeStation(@,track.~);
( w. ^4 Q% ]2 T- x& j' N newDirection(@); 9 o2 p0 ~4 L4 f9 P& T/ s: {; B( }
if @.Destination /= void then& R+ \ g3 O. m/ C
@.Destination.NumReservation :=% z! u" Z- l$ o0 `* I; d
@.Destination.NumReservation + 1;) d. @5 p" a6 J1 }; V: n
end;
) m2 d' }; ~. l1 M) t( W* Q, g" q z @.CurrIcon := "drivingHome";1 O+ r4 q; H- f9 ]( u! h U8 P- Y5 _
@.DrivingHome := true;+ R9 L; X, k( B, o/ `3 I
end;
7 f$ t4 {3 r' L9 ]5 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! h5 ^2 k9 G9 _. S4 O% w* h part := @.transpOrder;
: {7 s; r: t, ?; l part.move(@);-- load part9 G+ M' C( j; O
@.CurrIcon := "load";1 Q& E$ V. Z( B. C3 m
GlobalDistObj := part.globDestination;: f* J+ {5 |, g& v: U4 A
assignLObj := rgmanager.rgAssignL;4 j2 S8 |% _& M5 o, I Y
row := assignLObj.getRowNo(GlobalDistObj);6 x+ g1 t6 H$ Z( J( a
if Row = -1 then -- since 70/ C8 i9 X8 `/ F! R% I5 y
if lan=1 then
0 J- g3 m# @: ^, i2 ~( r" y; R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 L/ s l6 J# l \- T to_str("in der Andockstation: \"",?.~.name,"\""));
* C1 v' J4 D! |, _ else/ c; P( z: g3 f& G- F: m5 y. k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 O' j* J4 E# l, i0 X! h! O
to_str("in docking station: \"",?.~.name,"\""));
9 m5 M; P+ Z" T R% g end;
+ S) y' \. \- M, U A! e else l1 T/ ~; [- J6 t! [" a& k* Y
@.Destination := assignLObj[1,row];1 C. r9 L+ A* r$ V: p5 ^$ S
end;
: w8 Q* O# g4 Z6 R6 Q8 ^" f newDirection(@); F! h* e& x5 @8 t) m& ~- s- ~
@.HasOrder := true;' \( z8 D, b9 a* Y7 l7 j
end;
4 \/ o& H/ K' Q+ ?8 @ end;2 m$ `- v, N, `* T8 e
end; -- of the method
# R& \3 \3 Y" A! b |