/* called by: entrance ctrl of the object 'track'5 I4 H9 U8 ~ A$ u) q. [& I- m
*/% i. H4 F, ^) y
is1 T0 a8 k0 R) |/ b$ d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 c: Z) E+ Q. O, F$ |3 E
do' e4 }" V& f: I4 R7 U
Lan := rootfolder.Internal.Tools.AOLlanguage;) `( H% J) a7 l; f* U2 v S2 J/ n& P
if current = @.Destination -- else return
2 ~1 b( n# T5 U3 j2 D0 l then: H M1 Z% @% u6 B2 A! A2 h
@.Destination := void;
) ?6 z* K3 k6 _1 C4 _" k1 d+ ]& I if @.occupied then3 |# V8 b1 F H$ _, D2 _+ o
part := @.cont;
9 s5 V1 x- I" l9 x p3 B @.transpOrder := void;
: G; ?7 o V$ M9 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# z }9 L+ \0 u0 e' B' v9 u
@,root.eventcontroller.simTime);
6 n: D. u6 r7 @% M' ~ @.HasOrder := false;" l+ i* C- }5 x2 K
@.DrivingHome := true;- T% A Q) U" ?- C3 |% \
rgManager.tryToStartTransOrder;
( p/ o" B8 G2 g0 N if @.Destination = void7 W& G3 ~4 T( j
then -- no transport order for vehicle @
4 u7 t1 i* K1 U) B% I' |: J4 d @.Destination :=
+ ?+ d2 q3 u2 h- B* J rgManager.nearestFreeStation(@,track.~); n, H8 U$ l% v: q! t
newDirection(@); ) H- n' p& a5 s1 k; O; b9 v, ` g
if @.Destination /= void then
l# ?- F( ~1 A( Z @.Destination.NumReservation :=* c9 \ v, O9 E( V+ H
@.Destination.NumReservation + 1;9 q( E+ g1 h2 k
end;
: W1 y1 r0 Q* n7 { @.CurrIcon := "drivingHome";
+ X3 U; H; i$ a* U P! C J @.DrivingHome := true;
" ?9 j E$ {! @; U3 U7 e4 p+ q end;3 G: J8 q F! G7 r- J( W6 e e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- I; m3 R0 u) z+ d# H+ O part := @.transpOrder;( o; H, a9 c# ~& b* u
part.move(@);-- load part
) H5 a% a. h* l) C @.CurrIcon := "load";
3 r, q: z+ C; p0 I$ `' t6 o GlobalDistObj := part.globDestination;* {+ H* n8 U9 Y1 L- g) O& b+ ]% m
assignLObj := rgmanager.rgAssignL;# j9 p, x" S/ b) z6 s9 P
row := assignLObj.getRowNo(GlobalDistObj);
1 M1 g1 \7 b% w if Row = -1 then -- since 70+ c" w* a5 F" p- ~5 h
if lan=1 then
9 p; Q( \7 d- K/ j% @- g& I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) p- j+ O& B( Y6 ~/ w+ k to_str("in der Andockstation: \"",?.~.name,"\""));
$ u% \1 M% M, X+ G. E# {2 K else: E0 e L$ _6 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 N2 c' i" o, t5 c. _% J
to_str("in docking station: \"",?.~.name,"\""));
4 ~2 R( n/ b; z/ d7 e i. }) H, ] end;5 r( _- X; O' P
else& C6 L/ p6 w5 d% h
@.Destination := assignLObj[1,row];
( a! |8 e1 M4 S- a+ v end; 5 Y9 C" i: m* q1 e; m. t7 A' Z
newDirection(@);
8 e3 g0 A: C- f/ ~4 P. M. r/ m @.HasOrder := true;0 l& K6 d7 d, j, `/ f
end;1 [/ h& b n( u6 Q# z+ P( h
end;
. @4 A9 y+ p* U" h) K/ Iend; -- of the method
& B! E/ j j* W, W |