/* called by: entrance ctrl of the object 'track'( Y$ p9 M6 @$ d8 ?8 Y/ R# Y
*/3 B# S- Z8 s. ?" G* l
is* W4 ~: I! ~9 X0 U- g# s+ l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ d8 x" N2 x4 N9 W" n. gdo
3 v+ S/ ^1 Z. c/ J Lan := rootfolder.Internal.Tools.AOLlanguage;! m6 U, m9 R- R6 n( r
if current = @.Destination -- else return
9 R/ U( q' C1 U; @/ z2 F8 ^ then
: x4 L- c1 g+ ]" \' \' A @.Destination := void;
, F: r" B1 L" r if @.occupied then1 g1 p& N9 c4 l, m
part := @.cont;3 f. I' o. b$ ?
@.transpOrder := void;
) U5 E9 R- O* W2 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# m& M1 Z5 o' B4 n8 `" L/ L4 S
@,root.eventcontroller.simTime);
, m* W5 q7 l6 \# n5 X' | @.HasOrder := false;
# i e$ _( Q! O @.DrivingHome := true;
, ~7 i, y/ V% q4 x6 ? rgManager.tryToStartTransOrder;5 C$ z ^) `% n" ^2 r- A
if @.Destination = void+ Z. d* t5 m$ w( S! W3 B1 [2 H
then -- no transport order for vehicle @
4 h6 n: u/ C$ m# E# M) g Z6 ^) W @.Destination :=
9 \4 _( j$ B: ^ rgManager.nearestFreeStation(@,track.~);% J* }1 w2 t& n3 g" {5 k
newDirection(@); + I/ ?: W) n: N4 x% m% c+ _8 `
if @.Destination /= void then: g# ~* W1 f7 E
@.Destination.NumReservation :=, n4 C( b- T% m) \( d+ a' P! V
@.Destination.NumReservation + 1;
6 a+ t# Q W* ]. R! S& r- L5 C end;7 o7 B( a% Q5 w. \! K
@.CurrIcon := "drivingHome";
* e2 Q- D3 r# G* t6 r4 T2 J, k @.DrivingHome := true;+ ~1 v/ X; D5 d
end;
" B. K; w* z7 B5 y J else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ?1 ], y9 E) J! N) j; ^
part := @.transpOrder;6 `5 q0 p2 E$ m5 @0 V" y, M
part.move(@);-- load part0 B$ [- \" z1 b1 R
@.CurrIcon := "load";
. r4 r: t8 B8 q K. G GlobalDistObj := part.globDestination;/ Y" @7 q* N: J$ c" T5 T8 H
assignLObj := rgmanager.rgAssignL;
1 p, h; o6 m# a% n0 e3 t row := assignLObj.getRowNo(GlobalDistObj);7 N/ ^0 h j# U3 z" Y: ~
if Row = -1 then -- since 70
* X4 |6 P# o$ a2 D! w' Q if lan=1 then4 R! w; h S! ~% i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 v x" s$ x9 j" ~: {+ j, r
to_str("in der Andockstation: \"",?.~.name,"\""));
3 m! [9 o- r$ }1 ?$ a/ h else7 C9 B& w2 T9 {8 L2 ?+ c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( X4 U/ y, k+ j8 j; N* w to_str("in docking station: \"",?.~.name,"\""));
1 M ?. B: y; v1 q$ d4 e end;
: L% S* O2 o) M5 B5 s else
6 ~5 M, {/ M& K* A @.Destination := assignLObj[1,row];
! _4 d- n; c3 c" b H end; $ ?# M, t5 b0 C8 P3 R) |4 t. U6 s
newDirection(@);. B5 k8 T! F- @; n
@.HasOrder := true;2 U2 v" \8 c" {- Q; F; I5 n
end;- Z) A6 T3 K; ~$ ]% n+ m
end;4 ^: P' `. P7 m! W+ \3 U: H
end; -- of the method
" \, n- c; t0 w( ? |