/* called by: entrance ctrl of the object 'track'
/ f8 s9 W4 b( L) X7 S2 L+ ~* ^*/- s, _* T' K0 z- Q- h3 @
is
# W! b5 H6 v- e& D2 M5 a" G+ m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, `7 _$ X; ]2 w' ldo
3 g" B2 S* W; m Lan := rootfolder.Internal.Tools.AOLlanguage;
, o' F% E% i! m# J$ E8 o& o; k if current = @.Destination -- else return, p6 D' \) F5 [* {) I
then& W- Z' U# G# {- R
@.Destination := void;
$ z$ C" Y( _1 u7 t+ {, D if @.occupied then
" z/ k# r# e/ v part := @.cont;
2 L. L4 s; _4 k @.transpOrder := void;
9 [; w% c3 D0 \+ x6 r- C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, F" K5 t! `+ r0 d( V
@,root.eventcontroller.simTime);
& c' f, |' u+ v @.HasOrder := false;
% w( s1 g$ U% i. i. {/ G; p& w* _ @.DrivingHome := true;# D' I7 R4 I$ H+ w/ {' X
rgManager.tryToStartTransOrder;3 }# J# X/ e/ Q# T
if @.Destination = void
: N9 Q; N1 X7 L$ {7 H. n+ ` then -- no transport order for vehicle @
" ~1 k6 f6 f) |: Z2 I* s7 _ @.Destination :=
" ^7 M( L, J$ J( l rgManager.nearestFreeStation(@,track.~);, T, x- H0 V. b4 \* O( F1 [+ r+ C' O
newDirection(@); ! z1 @, _; T. R; `, d2 I7 y
if @.Destination /= void then
) T! G5 X# M( Y, d# m @.Destination.NumReservation :=
; m5 T5 N# w7 b& K) b @.Destination.NumReservation + 1;
0 q& r: R% V) z. m7 w8 ] end;
# l$ z3 U6 C: V# e2 z @.CurrIcon := "drivingHome"; X5 f9 v. s( t6 P, P1 X, O
@.DrivingHome := true;
) w. \$ Z- s% F2 B% j8 l end;
; G* s; P* G: u1 H5 r* S" }8 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p8 j9 ]. b! a9 G# C part := @.transpOrder;: b5 a' Z) ?3 E7 d2 U
part.move(@);-- load part
% A' l. Q' x0 E @.CurrIcon := "load";
" O) u' B' _; A' p( O9 D GlobalDistObj := part.globDestination;3 `, c4 U$ ~. E- b& l( Y& f
assignLObj := rgmanager.rgAssignL;
: S T) q# b; Q6 O row := assignLObj.getRowNo(GlobalDistObj);4 [; R5 w# R0 {7 M' \2 N0 M" o
if Row = -1 then -- since 70" Y' Y; s; ]3 k. p. B* \0 v. s% n
if lan=1 then
* @# O+ @: r* n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 f& N1 N$ Q, I
to_str("in der Andockstation: \"",?.~.name,"\""));& n! k Y% K8 C2 R
else
0 R5 \" A B- N( k4 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ T- N. {( B& C to_str("in docking station: \"",?.~.name,"\""));
! P- n# |2 ~6 q end;
( J. |4 @9 _! T8 a- C! _, E! @# ~ else$ E* o! v: [0 e3 i+ x
@.Destination := assignLObj[1,row];( W h1 z, K) \- G6 M) j7 y/ Y) B
end; ' ]8 u3 |0 o1 p# N% T
newDirection(@);( I/ [5 a2 e. m! {: u2 m; R S
@.HasOrder := true;
, [/ M; h9 c5 Y0 j end;
6 s2 u7 T! z. y; u1 W2 j2 m8 T* s end;, O" d- P# V; _- n& w* z( A+ x
end; -- of the method
9 F7 o" w ^+ n7 N |