/* called by: entrance ctrl of the object 'track', g6 |- C5 c' P' c* F
*/
. G/ P3 @- C/ P" Sis: \$ z7 O$ L2 _3 e" [2 ~4 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 A/ k' [+ A2 Tdo. \1 \# I2 F; v. J
Lan := rootfolder.Internal.Tools.AOLlanguage;
. P% E2 W. \- [2 ^4 r if current = @.Destination -- else return2 H4 q4 J% Y* g6 O( k+ j
then) Y1 n! Y0 [0 ^6 k) M, X7 E
@.Destination := void;4 I+ S5 p& w% i; d2 K1 w* F
if @.occupied then' [* e9 {' Q+ _4 U' {- ~( _
part := @.cont;7 ^7 k% t/ `! z; N
@.transpOrder := void;
9 v' \* p' l4 t/ R, ^! T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) e4 [, u' q: x& W) a- a
@,root.eventcontroller.simTime);! Z) Y% r7 b7 z( _# |9 ~* L7 e
@.HasOrder := false;
- S, i0 ]4 t" w( j C% \ @.DrivingHome := true;' ?# |/ f. M n5 o' I
rgManager.tryToStartTransOrder;( q" V8 ?- i6 w
if @.Destination = void
. U2 V8 j/ @5 Q) p then -- no transport order for vehicle @
4 ]' N3 m/ ^7 o E @.Destination :=( P% O p1 p$ a
rgManager.nearestFreeStation(@,track.~);3 C+ O% j R. p3 b3 J* T. H V, Y
newDirection(@);
9 f; j S! x7 E9 S6 O if @.Destination /= void then
8 Z, A7 B" v, ~: a* l2 m @.Destination.NumReservation :=
) \ ~" K7 V3 ?6 Y+ S, ? @.Destination.NumReservation + 1;6 m# p( k% k3 b
end;0 n" X1 `7 Y$ y* F9 L, S* ?6 a
@.CurrIcon := "drivingHome";
3 |* U/ o7 S- k' k @.DrivingHome := true;4 m3 B( Y V5 P4 @
end;! Z ?9 o R$ t; B0 K" d4 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 H" Z# P+ ^" u' I" e3 I+ h part := @.transpOrder;* v( w, e! k5 S/ @
part.move(@);-- load part j& B) C" w" |7 B( d: s0 K
@.CurrIcon := "load";$ K) Z ?1 C6 y5 k
GlobalDistObj := part.globDestination;4 V9 I5 E. H# r4 Y/ y& G d3 W
assignLObj := rgmanager.rgAssignL;& p6 Q& w: B7 O& } ~/ x4 `
row := assignLObj.getRowNo(GlobalDistObj);
" D2 n: o- J/ M! X2 W5 I, b+ O9 U' V if Row = -1 then -- since 703 t# }. S. p/ m* A7 o4 T2 a, k
if lan=1 then
( J, p9 P; C; Z6 }0 e8 |% y2 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. J0 l* g. _2 @6 P' @
to_str("in der Andockstation: \"",?.~.name,"\""));0 W7 ^7 `7 _" g# ^+ x+ g% V& Z) c
else4 n) O; S! a- {( c8 L0 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ R) o; u. }* e1 d2 D& V9 w
to_str("in docking station: \"",?.~.name,"\"")); 3 Z6 X- V/ j: s; J. B _
end;
6 l2 R n, }6 G+ o else2 R m; q- ]% M
@.Destination := assignLObj[1,row];
! N1 r2 t& f+ T end; ; _. B9 ]9 ?' P5 o2 N) x- f1 v
newDirection(@);% ?% G/ q3 L: F" f8 s
@.HasOrder := true;1 R* g1 G( I% T# h1 M& q) E' N1 P1 g
end;
. v& t7 `* @/ o, E! h$ F) ~6 T end;
5 F0 }- l- k- i6 W7 G E5 Cend; -- of the method
2 A1 @* [0 N4 M& ^- L! l$ n d; Y |