/* called by: entrance ctrl of the object 'track'! N& _; `: O. A' r5 B1 c3 T
*/, r( L4 O! U) V/ X) `
is
3 p5 ]: F+ `$ |& k5 s' ?8 a% O part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 j) E. I4 `8 V5 L s0 C. g
do
3 X7 I; U, A* M6 S' n9 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
. ]! Y9 O Q/ j# O/ Z# R* M) j if current = @.Destination -- else return! A. H" H4 [' r* ~4 w
then8 `, H9 t0 |7 o' f6 Y) b- i! _
@.Destination := void;1 L# v$ {* b' L: @, `" {$ C
if @.occupied then" e m+ T, l$ q$ A- C& e5 c
part := @.cont;3 L) H+ |+ Z6 o& R3 ?
@.transpOrder := void;% D# N4 Z% O3 s" P1 D- r5 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 p7 M" t5 r# w
@,root.eventcontroller.simTime);
, H6 i3 t7 D$ m2 c0 K% \ @.HasOrder := false;- O% L, z# Y l! w% U. R. U
@.DrivingHome := true;
7 ~. L1 f& c' }/ S; R! f+ Q rgManager.tryToStartTransOrder;/ b. Q4 E# Q1 q, {5 v0 A
if @.Destination = void
4 ~# K4 _, v' f5 I N then -- no transport order for vehicle @8 Z, V3 _* Y# z
@.Destination :=0 z- k+ B9 z& d6 Y+ H8 S
rgManager.nearestFreeStation(@,track.~);0 I; X3 o1 Q0 p
newDirection(@); ' S3 O: B6 {' C7 x
if @.Destination /= void then
4 C/ i& a- I6 c: a! X9 G3 k @.Destination.NumReservation :=
2 V+ E+ `/ G' [ y @.Destination.NumReservation + 1;/ S- o! p# `4 A8 t- ]) X
end;
# e' Q% b7 X, k8 h/ Y @.CurrIcon := "drivingHome";# p! c; t6 z. ^9 u7 i
@.DrivingHome := true;4 V* t) D& v: O- G' d
end;
4 r! e! I0 |0 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 ^$ Z* E/ C& m! X+ H8 A9 C9 l) J( B part := @.transpOrder;3 R5 b5 [& D& X5 b0 r. x
part.move(@);-- load part
/ B9 g; w! \+ Y' B @.CurrIcon := "load";
' r- j( |2 m9 \' ]& a GlobalDistObj := part.globDestination;5 C: D3 i) G, n+ K9 ~
assignLObj := rgmanager.rgAssignL;
0 U u: b& D- |$ i, a! i7 X$ k8 u row := assignLObj.getRowNo(GlobalDistObj);
" i D6 h* f3 D/ Q2 G if Row = -1 then -- since 701 { e4 S# ?# s/ v
if lan=1 then
4 r1 u! w; x# {) b k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 ?% @, L( S! v+ D; M. q! c9 s
to_str("in der Andockstation: \"",?.~.name,"\""));
2 W1 l. i/ d0 [0 D# T9 N else
& S0 d. J: M r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! S8 z( V* n | [$ t
to_str("in docking station: \"",?.~.name,"\""));
' M* O) s" } N6 z/ l end;
4 j& ? b. `0 r/ j. i, z else
1 j) Z0 Y9 C4 m0 } @.Destination := assignLObj[1,row];9 G0 i" c2 V) d
end;
1 s6 j2 f ?: F- P5 j4 ?5 A+ W/ w newDirection(@);- l$ f* s& O8 [' T
@.HasOrder := true;8 J9 X/ k. }* ^ u0 |( z* M
end;7 c4 n9 c. }" A" A" A
end;
4 T4 g" R# i8 ~* \1 s. m! x) j2 Vend; -- of the method
+ ^# E) |5 M, b3 L0 y/ S$ | |