/* called by: entrance ctrl of the object 'track'0 d; Z& n5 a! M7 L- Z& m
*/" A3 C( m+ ^* A8 _4 t, H( R! N- L& a" I
is
" y1 P* } C, n: Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C& v: \6 q. p3 n, E( S
do
9 R% F! J) D3 ?8 m$ i, d. g Lan := rootfolder.Internal.Tools.AOLlanguage;" Y+ @0 G. c- T- m
if current = @.Destination -- else return
+ l3 l+ ~: N8 Z0 v then6 r' {9 }, C7 E: B5 }0 v s
@.Destination := void;# [4 _; ^& b/ Y' C6 d+ E0 _
if @.occupied then
/ M3 j+ ^6 O+ N- A' X part := @.cont;+ }/ D2 d; d" r
@.transpOrder := void;8 B$ ]" w9 K; M9 M1 N. J+ ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& o) c( B9 J K2 S3 ]- } @,root.eventcontroller.simTime);- u! M. F8 W6 ?! Q* ]0 R9 g& N0 |
@.HasOrder := false;8 O: b, x1 s6 f5 o; ?6 Y
@.DrivingHome := true;( o( m8 F1 w0 ]1 [2 p1 u- `% t
rgManager.tryToStartTransOrder;3 t8 i# r* Z# v' u. c+ N2 i9 _
if @.Destination = void- [5 D1 w; f2 R% k5 r2 a q$ N
then -- no transport order for vehicle @
' z1 P8 r" N _, ~1 A @.Destination :=
& i2 b& v: U- j1 ^5 W: a/ h( { rgManager.nearestFreeStation(@,track.~);
3 b4 F; K% u4 b% f) @ newDirection(@); + C, P* |/ ^4 N) M% \
if @.Destination /= void then
8 {/ Z/ H0 j% F/ _* E! V5 u& c6 g @.Destination.NumReservation :=7 c9 G' |: V6 v4 m1 b* |5 k8 w
@.Destination.NumReservation + 1;- ]1 ~$ G/ N( p [: }2 U0 u
end;8 g1 |# c) Y3 R- Z& F' {# W
@.CurrIcon := "drivingHome";. q5 W% Q9 J2 D6 z# @" C
@.DrivingHome := true;
6 B4 C9 r3 K5 n5 b& G6 R end;' C1 V8 c0 s. \& X9 N& V8 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 o z W7 e- q; v* ~: j
part := @.transpOrder;
, ?+ g- y( |5 m, P3 e part.move(@);-- load part
e! _4 ~+ B6 H! l( ~( O. [ @.CurrIcon := "load";# B5 ?0 C+ l3 e+ @
GlobalDistObj := part.globDestination;/ H+ t- D6 a4 W, W6 n
assignLObj := rgmanager.rgAssignL;$ b; l9 M8 `! }- @3 c. K" \8 _
row := assignLObj.getRowNo(GlobalDistObj);
" V' e9 l/ r) G+ Y8 @+ O p N if Row = -1 then -- since 70
+ H$ Y) W. N' b if lan=1 then
! j0 n$ M; J( P+ ^- V$ ~" s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- H7 }* Z' J, w9 [ to_str("in der Andockstation: \"",?.~.name,"\""));5 f! }( }6 j* z7 d! h
else
5 w; B1 w" Y) G" j- N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 G3 x* T( ]8 y/ Y to_str("in docking station: \"",?.~.name,"\"")); * H! v+ M, [+ z8 T
end;* l, \3 X! z( Y# F6 g! w4 j
else
! X9 Q2 l; |( }! N @.Destination := assignLObj[1,row];: C) E8 A; d5 Y6 R" Y3 W
end; 2 D+ |4 f; Q6 m( C
newDirection(@);- G: ~/ w" w# b; ?* S! ]4 ~
@.HasOrder := true;
- B+ _/ z3 K2 a: Z0 y# d end;+ g7 }0 d( s: x. o
end;
C8 r. T$ A; @9 N: jend; -- of the method. K- k1 H3 L3 M& [; @+ G
|