/* called by: entrance ctrl of the object 'track'$ w: @" c& u- U" _; q0 \" k
*/
2 U& G1 J& I) B' _. xis
5 \7 ]* D8 p* } C1 z) A part, GlobalDistObj, assignLObj:object;row,Lan:integer; {1 y" c9 z$ T! o- T
do
9 O- y, @9 E/ F3 ?3 t" R Lan := rootfolder.Internal.Tools.AOLlanguage;
" Z: _4 s3 l$ F) N( }( b9 C if current = @.Destination -- else return: E" U7 Z* w& _* q% i% u
then) D$ X$ V4 p Z: c
@.Destination := void;, p' j; k* c1 |0 h; f
if @.occupied then( e* L; _' w, N% A4 Y
part := @.cont; Y; P$ z" A& \, l) U D. k
@.transpOrder := void;; [+ P, l4 I0 x) j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% Q3 B- ?$ I8 T# f9 ?
@,root.eventcontroller.simTime);
4 c/ s9 |; t4 Z! w @.HasOrder := false;* q/ |0 J7 Q0 [1 d. m/ d/ R# L& s
@.DrivingHome := true;, b: l8 F5 M& U
rgManager.tryToStartTransOrder;# _! P5 m7 E' C; q
if @.Destination = void
. ]2 Q1 B* j2 E- Y9 N2 A( g; a then -- no transport order for vehicle @
3 T. H/ t4 T; a/ J4 o ~8 Y$ `! ~, b @.Destination :=
) U5 V1 H4 U& R4 g$ S/ k# V rgManager.nearestFreeStation(@,track.~);
7 [) c! `# M. {& H; Z- F! a- [+ L newDirection(@); - r. v5 J) R6 r; o5 m6 r4 Y
if @.Destination /= void then5 \. a8 N# Q2 v
@.Destination.NumReservation :=
" c a- q1 S7 z @.Destination.NumReservation + 1;
( h2 D$ e7 y. m' } end;4 R+ E) V; o( E, @" d" |% ? S
@.CurrIcon := "drivingHome";( l* j" G A$ E5 |; @
@.DrivingHome := true;, }; o6 e4 G9 |: m0 @: h1 Z% H6 t9 ^: K
end;6 C! @" }$ u& x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, {1 w1 J x4 D- r7 p. v# V
part := @.transpOrder;
# @4 }9 m4 i* n7 z% s2 x* V' H" _: T5 I part.move(@);-- load part
: H7 s+ `8 D f @.CurrIcon := "load";, N- g' s( S l) X, o# z
GlobalDistObj := part.globDestination;
: y1 h0 Z/ |3 L4 w& i. q" Y# e; o assignLObj := rgmanager.rgAssignL;
1 N* j: T a" j row := assignLObj.getRowNo(GlobalDistObj);2 k4 _( k0 ?8 m( @7 \$ H( P! S
if Row = -1 then -- since 70& O2 R# b2 m+ S! T: `* G4 d
if lan=1 then1 h2 L W$ n* E5 ]6 v5 L, g& }0 z* i" q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 F: w1 |0 k' \* C9 j
to_str("in der Andockstation: \"",?.~.name,"\""));
/ ~( f5 l; j( r6 O else
, Z; `5 @1 [" n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: |8 z8 A6 c& ]* ^4 E: d
to_str("in docking station: \"",?.~.name,"\""));
& c( f+ ^ z: `$ M4 G end;
8 A; E% O3 [2 K: u: O else9 E- P' ]7 H' F; u# l
@.Destination := assignLObj[1,row];4 {5 q4 b& r, R) l
end;
v1 l% a9 {, h9 {3 N& c7 C# R Z newDirection(@);
5 v- q j9 n5 S4 K: | ~! J- t' A @.HasOrder := true;2 x P; B) F9 H! Q% u. A* L0 T
end;
3 I2 i5 E9 f2 | end;
6 D$ G" N7 C9 c' L" Rend; -- of the method! r1 \+ }' `- |7 U* S3 A: F
|