/* called by: entrance ctrl of the object 'track'- M9 M, H" K% Q. C+ {
*/7 Y5 J" w- f8 }5 Z. L
is2 H! k, W" ~; e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: g. Z8 A/ S8 l. ^- j
do! c, z4 L3 m2 C$ g; Q" ~3 \( l
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 D( V# S! x1 I" U/ a if current = @.Destination -- else return
0 Z) x, v* O( g% T+ s9 S* l; G then
+ i t% f' r$ x6 |" B+ o( U( G/ _ @.Destination := void;7 E. U# L0 J( y% m5 |% i. D, G
if @.occupied then
4 d( U% c* X- x- h part := @.cont;
$ f7 U2 J8 l8 W @.transpOrder := void;
' x' P D5 j& ^6 U& Z$ h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 u9 T4 }0 s2 h% E2 @# g k
@,root.eventcontroller.simTime);8 v( e* ~ w: Z4 k; @- j
@.HasOrder := false;( J6 |( l3 S$ m5 ]) Z: {0 S2 }
@.DrivingHome := true;
& `" K3 E1 j1 w4 ~$ x1 _3 t rgManager.tryToStartTransOrder;4 F' n3 F) C+ h2 G! j" n% S
if @.Destination = void
$ a) V# P- I5 G/ _, p then -- no transport order for vehicle @
* s. ?! ^! C5 k! M @.Destination :=
. o7 U3 S& H/ S rgManager.nearestFreeStation(@,track.~);
8 U. K: |* {. G% @) |; K newDirection(@);
0 o! @ `. m) _' r if @.Destination /= void then
9 A6 U7 g+ V; K) S! C @.Destination.NumReservation := f9 N2 o( r! `# M0 u( Q3 s7 q3 h+ k
@.Destination.NumReservation + 1;1 j$ g0 M) ]; _. E2 q# J! G/ d
end;( J, N' i2 Y3 e- V% a# L2 T5 v1 [
@.CurrIcon := "drivingHome";+ q" X3 o: t* q+ b% l; N/ ~
@.DrivingHome := true;
+ W. J- i B2 y end;
3 _9 \ }5 K# |! j* x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ Z4 x; y: ~" d- a; Q* Y& P part := @.transpOrder;
0 C- }0 R1 S4 B; ^* Z. w( [* r part.move(@);-- load part
, J. f( l% Q% `3 j/ Z0 _ @.CurrIcon := "load";
( l; A& P& t2 c: {- z$ A GlobalDistObj := part.globDestination;0 w) w5 R( f: ?; \
assignLObj := rgmanager.rgAssignL;
, y0 g$ U9 {+ }+ X row := assignLObj.getRowNo(GlobalDistObj);; Y( R0 e+ Y8 ?- D: {! c3 e+ h6 ^& G0 [
if Row = -1 then -- since 70, f3 P% t$ Q5 R+ [* Q+ T
if lan=1 then/ i, v' V& U7 k- H4 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 c6 G' E9 Y! f$ F0 Y& R: o! G' j to_str("in der Andockstation: \"",?.~.name,"\""));
, o( n% L& n8 N1 ]) [ else; W- B) U( r8 g8 T9 I# |5 \! @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. r" X$ Z; W, o
to_str("in docking station: \"",?.~.name,"\""));
q+ [8 u$ S- t6 s+ J end; x) I! r- w3 B( J S
else
0 J# {# f0 {" A @.Destination := assignLObj[1,row];
; Q7 N, P2 Z( t: P7 h- e/ C end;
R" x' f6 L! E* H% C# ?4 O2 o newDirection(@);/ f9 H8 B3 X: f0 L. F: h
@.HasOrder := true;) u1 ~/ T3 x( s$ v! R
end;. B: X! Q8 s( L
end;& c$ b1 S; Z( a% `2 E- [/ }
end; -- of the method
! x% x3 v3 N+ j4 J; P) n3 c5 `* U: M |