/* called by: entrance ctrl of the object 'track'
: x5 C. M+ i( V* j" U! K, P*/$ A% @1 J4 s' z9 g2 O0 D
is; g7 E$ p! B5 Z6 y) `7 y; O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& }1 _0 A6 |! ^
do6 \$ X1 ]3 X2 @* U
Lan := rootfolder.Internal.Tools.AOLlanguage;
" `1 P" Z& T0 D$ R0 t if current = @.Destination -- else return. J: X3 T: e4 k% V9 \
then
; I$ \" n( X* [, ?$ n4 Y @.Destination := void;1 ~1 _: q3 u; s1 h; X& o
if @.occupied then( {2 C, N: U# |8 z% d
part := @.cont;: E4 Q Q# k/ {9 U0 f$ Z. M" C
@.transpOrder := void;8 o, D7 @/ r% A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 H1 P) V4 N I* ?! P. ]
@,root.eventcontroller.simTime);
5 g- c: B$ f2 K1 z @.HasOrder := false;# G6 V& P1 M, j+ v& u1 l
@.DrivingHome := true;
q( g4 O+ A* @# H; W3 G rgManager.tryToStartTransOrder;/ o( p* _' n' o J. x$ N' {
if @.Destination = void3 i# a& R: Q! j# b0 O- V* K: _
then -- no transport order for vehicle @9 P i5 ^0 g0 s, s& M
@.Destination :=7 x& m" T. w v
rgManager.nearestFreeStation(@,track.~);2 @2 h5 R/ w9 M+ {4 n5 F6 k1 O( ^
newDirection(@);
7 s% }+ _! L. \2 G* B3 X if @.Destination /= void then
7 V) f9 U+ K |0 f6 ~ @.Destination.NumReservation :=. z4 r) Q; }' o0 }9 \. a7 ]
@.Destination.NumReservation + 1;
& {4 ~ ^8 l0 T$ f3 Z' x) q6 {, g2 p end;! N+ H: L* x2 p
@.CurrIcon := "drivingHome";& v, }+ t# q' G: r
@.DrivingHome := true;
* z# [- e( l% o. U- \0 L end;' |$ w' ^7 \- ^5 L0 a; |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& g0 t# H- V/ O
part := @.transpOrder;' h u$ W- o: M2 H( h7 I, k5 H/ L
part.move(@);-- load part# M; n! K' [' c% U% l4 g
@.CurrIcon := "load";5 S3 }8 K+ ~! ?2 B1 v/ O
GlobalDistObj := part.globDestination;
3 j8 {% q$ D' W3 e1 ~; d* V1 G! [ assignLObj := rgmanager.rgAssignL;
, e2 a' Q6 n& @+ e# Q8 k6 Q4 [/ C row := assignLObj.getRowNo(GlobalDistObj);6 \) u& b, Z2 l' C h
if Row = -1 then -- since 70
7 F9 n, H6 t& a f/ k9 x% Z if lan=1 then, e& H0 k U' C7 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) x2 r7 t8 w) o: C
to_str("in der Andockstation: \"",?.~.name,"\""));5 H4 r. c$ ^! O% K* f' U" H j! u
else
7 J, j4 n1 I h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 b! E( X" k/ {) Q2 ~ ~ i
to_str("in docking station: \"",?.~.name,"\"")); + n$ Y5 y: W* v3 x
end;
$ Z4 m2 D+ n) b2 Z1 i" J* ?& i q* ^# S else
' k g$ O. O/ V' `7 r @; [ @.Destination := assignLObj[1,row];
( B# J( M; a/ P1 ?8 h end; Y# I( @0 N; @+ i ~- r3 r
newDirection(@);0 [, k" E" q* M6 A3 v. c
@.HasOrder := true;
8 x) O" m) j+ v1 d7 @& G end;
& i2 `4 \) W* N end;$ z* H* r/ ^) |: K& n+ o
end; -- of the method
8 {5 b. P( l: p, t" E- d6 ^4 U |