/* called by: entrance ctrl of the object 'track'; V" R+ k$ p3 d' W8 g
*/
5 r, ~* f! [( {/ R! A8 Sis! T0 B: _0 m0 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' M5 w% [ ]4 N5 u' M* q. \
do
. R( V1 y- Q3 D* i2 b3 g! q Lan := rootfolder.Internal.Tools.AOLlanguage;
3 E6 F% O8 _( E/ m# S, \ if current = @.Destination -- else return
& D2 C$ V9 y3 H! _& f; r h) ] then
0 b1 n& g& F8 l. X0 x @.Destination := void;
2 X$ p: \) h: \1 z7 d if @.occupied then
9 {, T K2 h: } b; u3 `$ V part := @.cont;
, `* X0 x* o! c @.transpOrder := void;
1 @' l ?& E! P( h8 V5 {- u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 y$ W, ^2 X# w6 U2 F @,root.eventcontroller.simTime);
) [+ O" } l7 j1 K- N @.HasOrder := false;
# c: O. G3 {- i) V @.DrivingHome := true;
8 B0 h% \$ L3 q% B rgManager.tryToStartTransOrder;8 y: m; F# w; W% m x+ F' [' Y
if @.Destination = void
5 V! C" W6 N( x then -- no transport order for vehicle @
7 @, h% f7 u" Y) S3 E @.Destination :=
9 J! e' l5 z; N8 T8 L rgManager.nearestFreeStation(@,track.~);8 K+ [2 D* Z0 _7 \# b) h
newDirection(@); 6 U* Z; b1 C0 E- d" c" t$ N0 f) G0 t
if @.Destination /= void then
0 z7 h4 j! E2 O% ?9 ?1 v& q! v2 k) u @.Destination.NumReservation :=
7 `4 ?- k3 M3 x9 ^5 |( n @.Destination.NumReservation + 1;
# z0 \/ P$ Z9 f) T1 q* c end;8 H4 ~( U7 q! m5 K2 Q1 F, B- D
@.CurrIcon := "drivingHome";
9 G) s( b$ p* `" Q3 ? @.DrivingHome := true;
' i9 p4 ?* ~/ }4 B5 r/ b7 V end;, ~8 A: Q6 O% m# I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* q5 V' l0 F% \ M4 B. c part := @.transpOrder;( G" A& A) {# A8 Q O
part.move(@);-- load part
3 \' o% T, |, p v1 z( w: K @.CurrIcon := "load";4 E- _/ l: _& s3 \) H* z; d2 Q" S
GlobalDistObj := part.globDestination;
, h( D7 f; S8 w! ^ Y/ K) w assignLObj := rgmanager.rgAssignL;( y' h, q! A" K' I
row := assignLObj.getRowNo(GlobalDistObj);1 Z% f7 b9 ^+ L2 Z; m& m J
if Row = -1 then -- since 70+ P2 B% m% J! i
if lan=1 then
" }, Q/ M# C- A) p( l. } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 J1 Q- O! ?2 q3 }
to_str("in der Andockstation: \"",?.~.name,"\""));( E& |: {: y7 u; f) `
else7 T* M6 v8 A2 t- j$ {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 G5 @# ?$ a9 k9 _
to_str("in docking station: \"",?.~.name,"\"")); ) U7 s. f7 j, y7 H% ?8 @6 s6 P+ m
end;
/ I( d; F9 g& [# t" ^7 r" r* R else; w3 K7 Z4 ~+ O$ r O7 m2 u
@.Destination := assignLObj[1,row];
$ @ r, H' l3 Y- r end; / m3 \7 b. d Y, S* z# B1 P2 e
newDirection(@);
9 ]7 K9 K8 S! R7 S8 {) t @.HasOrder := true;! B3 u6 Z3 r: N8 W, Q3 O
end;
$ U9 ]0 H$ P f9 N end;
+ t* B1 T9 L; u7 u+ O; iend; -- of the method
3 C% \% ~, Y. i4 { X |