/* called by: entrance ctrl of the object 'track'' `) y: s; R- O5 H, I! C
*/4 o0 v8 c( O( a" Z
is
; X4 |* Z6 C1 d, `* @3 k) h part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 V) g+ l$ H6 p) i# p
do& s4 ^0 E' g* F$ O' P+ p" m
Lan := rootfolder.Internal.Tools.AOLlanguage;, v& a1 A L+ |8 w; f5 p% c
if current = @.Destination -- else return& d4 V x1 U. v
then
' y/ x% N& ?6 z- n9 I5 Z @.Destination := void;
5 m/ P9 v" u, ^4 W) G: k if @.occupied then. S. x. d. _# L
part := @.cont;
9 q, a$ V1 J9 R2 j. D4 ?7 O @.transpOrder := void;4 F$ K$ I" ^0 N) {% m( [6 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: V$ X$ X G* k; _
@,root.eventcontroller.simTime);/ X# v; b- l4 R+ L) e
@.HasOrder := false;
- k! H r( b5 j @.DrivingHome := true;
1 {: C/ `, ^8 t( e% }9 K( d rgManager.tryToStartTransOrder;- d. }2 S3 T5 U# z% t) l M- n
if @.Destination = void
* Z6 C# U" x6 A% B& u' o then -- no transport order for vehicle @- ]1 w! ?2 z' a4 u, ^- Z
@.Destination :=$ F7 _$ X+ d6 N$ {3 v! p
rgManager.nearestFreeStation(@,track.~);0 z3 i$ j) J; N: g2 g
newDirection(@);
2 ^ x0 `. G. V" \ if @.Destination /= void then
, A2 |( b* y, z% T+ K- m% a @.Destination.NumReservation :=
$ }/ b# }+ Z+ o( X @.Destination.NumReservation + 1;5 s# ~" ?- `( D9 z
end;
! l% P% i. w. M9 x1 \! v @.CurrIcon := "drivingHome";
# N. I4 |& H5 \! C8 \2 Q @.DrivingHome := true;2 j/ m; s# G9 K6 j5 F/ _! E
end;
! o3 ]- n2 n$ `0 Z2 V1 G* f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! K X- [0 _; T( r9 n! p part := @.transpOrder;
6 p# R% r! w* b) w2 P" M' U7 f$ z part.move(@);-- load part
1 z& } Z2 ]) ? @.CurrIcon := "load"; Q/ w( s. _/ [( d( ^
GlobalDistObj := part.globDestination;
5 ^9 ?& _5 v3 i assignLObj := rgmanager.rgAssignL;: N) x- A, k1 b4 ^! P
row := assignLObj.getRowNo(GlobalDistObj);( S8 ^0 K( Q8 N2 T6 v
if Row = -1 then -- since 70' i( q* D, \' @) {5 L7 z: F& w2 }
if lan=1 then
1 X i8 G. Y" G6 X1 m; i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 n2 ]- Q1 c9 W' ?- j% B# w J
to_str("in der Andockstation: \"",?.~.name,"\""));. a0 w: X9 }9 E& I
else
4 k7 A2 y Y$ e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! r, l5 J2 D' Y; r9 {: Z. h2 q to_str("in docking station: \"",?.~.name,"\""));
& Z+ r( c' B" h! l5 b3 `4 R! o end;2 ?/ D/ h5 `( Z9 n# V
else. v, F! X8 i# S$ R9 \
@.Destination := assignLObj[1,row];% ]' V' J- P' e9 j. G# v& @6 \
end;
" K b. e0 h2 @1 z7 f8 }5 P newDirection(@);8 r5 {3 W3 ?" s) Z
@.HasOrder := true;
* n1 B! C+ u4 b F7 G' u( X end;
+ H# R# y) k" B1 J end;
& [8 z) J8 |( i1 {% n/ N, kend; -- of the method
! l+ m, w s# H& | |