/* called by: entrance ctrl of the object 'track'
' ]4 } Y/ u; E% }$ L3 l*/
" v8 \( J3 S' bis
$ \0 M* F9 N( f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 h/ c& ?* j; h( R/ Ido2 d, ]9 n2 T! n1 U' j& C, [
Lan := rootfolder.Internal.Tools.AOLlanguage;- M) V" Q! R; \0 F9 S: u
if current = @.Destination -- else return( K' [8 Z, k/ X
then
+ a' f. A# M; [: t' e) c @.Destination := void;
5 H% P; V; @' [: N6 P if @.occupied then
0 |* V- f9 I! T5 D part := @.cont;
. R, O A8 v6 |& L6 R/ d; a7 ] @.transpOrder := void;1 F. \$ A& H5 h0 ^5 S% G: T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 `5 T# ?. Z9 R r# ^0 N" a$ o
@,root.eventcontroller.simTime);- w3 o7 L. I0 _6 |, t3 `& p3 H
@.HasOrder := false;
: \3 L$ G0 ~5 s0 b' b6 s. Y, \ @.DrivingHome := true;
$ g( h" t+ ?+ {% m rgManager.tryToStartTransOrder;2 I/ }4 s: L* X9 O) G9 H
if @.Destination = void
7 e8 U6 B9 K% R1 T then -- no transport order for vehicle @* I, A( }( f' h
@.Destination :=
3 V7 v- W+ ]' \ rgManager.nearestFreeStation(@,track.~);
5 }$ k- s- y' I3 g+ M: k$ a newDirection(@);
, ?0 J: f2 a7 ?8 Q/ s+ m+ m2 Q if @.Destination /= void then
; D4 k1 ]0 {( e4 w! `! [. J d6 F @.Destination.NumReservation :=0 k7 ?9 z) y6 z) r9 t
@.Destination.NumReservation + 1;, j$ c/ T6 Q8 ]; L" P# L% A g
end;9 |3 I! n* i) Z# y# {) r
@.CurrIcon := "drivingHome";+ N. L$ c. g9 \& v% b$ G' h
@.DrivingHome := true;- g4 K! t3 b+ K' H% X
end;
/ D% I1 q2 q( g9 J% [2 d! C' } else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 `4 y" b( \) m4 ?# P+ u
part := @.transpOrder;
) N2 ^7 X3 R: Q4 e7 ]# U8 Q- W! I part.move(@);-- load part7 L& @& S$ @; `% ]- z& |
@.CurrIcon := "load";
3 X. u' p. w8 u6 f) c GlobalDistObj := part.globDestination;
# |$ I; x4 C6 t3 i assignLObj := rgmanager.rgAssignL;
7 i5 H7 }) k. @8 E row := assignLObj.getRowNo(GlobalDistObj);
; O7 a4 |/ V6 k if Row = -1 then -- since 703 M' j- o( _; P4 ^# g; H
if lan=1 then
& D( z$ h; \, v7 V: Y1 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# V; d' D u/ @4 w0 _- f2 G to_str("in der Andockstation: \"",?.~.name,"\""));
5 }' i7 f. d: N/ S; J* u else
* B( j, d0 D( ^6 e" X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ]& z0 {7 @4 @& G3 Z5 S& n. Y
to_str("in docking station: \"",?.~.name,"\""));
5 C D; r* X5 x- l5 V end;1 [( T/ p- l3 m; m" \/ D6 v
else: |3 C7 l( b$ X; S* |
@.Destination := assignLObj[1,row];
$ P$ ?4 j0 F/ f' e/ ?' O8 O$ p# x end; . W8 P; R5 c% e- X+ C
newDirection(@);% V+ D$ l) S- [' G# m3 M8 l
@.HasOrder := true;
6 I1 i. c* M" E end;7 Q" j& m, ~, c% { e$ t
end;, E/ R/ J# X+ }, Y0 a3 e* L
end; -- of the method
% T& j: i5 u% {, s |