/* called by: entrance ctrl of the object 'track'
0 e0 m( F9 o7 C" C8 E) ?0 J- `*/
. ?- L% ?' E" W5 u I5 {5 R/ fis
( s1 Y! M; R! x6 {8 y* A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 r `1 u2 d( b' O8 V* F0 p' P( pdo
9 e- V% O. L- |6 I' B4 V6 C. v) b Lan := rootfolder.Internal.Tools.AOLlanguage;* f9 x+ K. z S j# [! b% R7 @
if current = @.Destination -- else return
- ^$ E! P/ c1 }# \' [: F/ p6 m* i then
+ @+ h! l1 D6 z @.Destination := void;+ O5 C- k2 u' i/ @' w) w1 C
if @.occupied then- X6 a& t% K( c1 ]& {5 }& F
part := @.cont;
" r( H R: N$ f/ P9 O @.transpOrder := void;
/ }/ U' z( N1 n% c2 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( w* b$ C& \" y4 ?. r @,root.eventcontroller.simTime);
. b# @$ [ f, l; C4 c @.HasOrder := false;3 g Z z, O5 c+ _8 G
@.DrivingHome := true;* a$ _$ O% K; S. V' g7 @& X5 k/ L
rgManager.tryToStartTransOrder; w; e6 |7 l' o
if @.Destination = void* R& f. D" t }5 P& E0 D* i
then -- no transport order for vehicle @: e2 [8 c- {' r+ g
@.Destination :=
& p/ j* H8 T$ d* J+ U$ ?: d- B rgManager.nearestFreeStation(@,track.~);
Z/ P, e5 ^ G) J' q newDirection(@);
# i% t% ^2 ^/ a if @.Destination /= void then2 o" q! W" h( O. t5 Y
@.Destination.NumReservation :=' `- j# W; Q' x1 J: L+ D
@.Destination.NumReservation + 1;! `' [+ X7 a- A
end;1 ]! r4 y1 I! }& X
@.CurrIcon := "drivingHome";, U b0 }' D/ O3 A$ V; S% O, d7 E
@.DrivingHome := true;
) Z, T# `9 U" A- h" h4 c1 I end;) j& z, i P9 w+ _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* q1 H7 d/ l4 i3 ^
part := @.transpOrder;/ g' I: m Q+ a
part.move(@);-- load part2 t, I( u6 v1 T+ v2 J& v% d5 G
@.CurrIcon := "load";2 a8 S2 I/ \1 s' v& }
GlobalDistObj := part.globDestination;
* x! \; [2 S: b: A; a assignLObj := rgmanager.rgAssignL;
$ q! h6 P* L- x! F row := assignLObj.getRowNo(GlobalDistObj);- j! d# w+ g0 Z& k' L7 y
if Row = -1 then -- since 70
3 F; v' D' F- _* n0 { if lan=1 then8 C; g: C- X2 S8 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ d' L& K/ A2 O to_str("in der Andockstation: \"",?.~.name,"\""));8 e# H" V/ U+ f& C
else- L8 p, c, N) K7 `' u/ ]9 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, P5 g5 a4 t1 z! |- F
to_str("in docking station: \"",?.~.name,"\""));
O' G1 Z; Y/ L- V, c, @4 B end;6 a& N! z! F. q
else6 k" `! z9 h9 u5 {8 B
@.Destination := assignLObj[1,row];
+ D2 `: J' ]! z; \' Y' ~ end;
" ` n k) U8 ?/ {: ` newDirection(@);& ~& p# A) h: H5 c- f) m7 q R! f* A
@.HasOrder := true;, |0 }# G c+ ~+ V% p% f1 H
end;
4 l1 o# Y4 u' a+ B( w$ N' D( r end;
7 _9 h" d3 ?, E( I" M$ Yend; -- of the method
$ k2 y' u1 G' m( p* I |