/* called by: entrance ctrl of the object 'track'
' V) ?( z! G l( V+ c. i*/9 m! E" \+ G0 H$ w
is4 L' p7 w9 H( u& a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. O3 d& _$ X" Q! V; k: T tdo
- o6 W6 W) O) D$ W0 n9 M Lan := rootfolder.Internal.Tools.AOLlanguage;+ X6 i5 j2 I9 q
if current = @.Destination -- else return9 x% @* ^! ^$ e# M; d
then
$ a' a$ ~4 d1 j! L1 k/ H @.Destination := void;
# S1 Q- j3 T1 o) ]+ U9 K O if @.occupied then
6 \& L9 N0 K$ x) b1 u) ~4 L8 g' O part := @.cont;" I) A* ]' c0 N1 D
@.transpOrder := void;
4 u% C W( P6 B4 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# O" r8 H: e' M8 B: p6 h) z
@,root.eventcontroller.simTime);) O, L& Y9 A+ p
@.HasOrder := false;6 F" Y \( L$ P6 V) b, I$ }# L
@.DrivingHome := true;
$ q6 \- P( y) Z- H! l0 N rgManager.tryToStartTransOrder;8 j% {+ {. `0 ?# f/ Q
if @.Destination = void
/ i6 g$ P, P" ] ?1 p then -- no transport order for vehicle @
8 _+ }7 s1 C+ O& l$ l0 G @.Destination :=
4 g6 P+ d+ ]$ n B4 t7 B rgManager.nearestFreeStation(@,track.~);
' S& p9 k7 L( i: _6 u! | newDirection(@);
& ~. u) K* c. ]' C' B" y$ l6 X7 c3 { if @.Destination /= void then- Q* a( I! _* q$ ]7 V$ i, v, m N7 {
@.Destination.NumReservation :=: l) c$ d" Z' T9 [
@.Destination.NumReservation + 1;
' p2 u# _* ^+ F end;
7 s8 e. _3 y$ e @.CurrIcon := "drivingHome";
$ s: N& E8 ^ a* E" y* l: \ @.DrivingHome := true;1 Z$ i- c4 ?( q2 N3 Q2 L3 o
end;
! E+ e1 D, u& q3 y- ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 q' w, f# p: x; c+ S0 @ part := @.transpOrder;
5 n! W" Z( A$ u% | part.move(@);-- load part. x, {! r" |/ z: m w
@.CurrIcon := "load";5 f" B* p& s" Q) C
GlobalDistObj := part.globDestination;! a$ P6 F6 B" P- {4 K
assignLObj := rgmanager.rgAssignL;
9 t7 j0 K( M j9 {8 c5 r$ c5 A row := assignLObj.getRowNo(GlobalDistObj);4 L( {0 X2 g, J' c" R O: K' P
if Row = -1 then -- since 70/ U& g( l- t. ?" Y" E
if lan=1 then; A E2 X1 _) w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 X& `8 H; ]" A! S$ v/ M
to_str("in der Andockstation: \"",?.~.name,"\""));2 g5 d$ f" \4 b n* d2 S
else. E! A' a& y! }3 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 p5 k4 _1 O# ?3 Q; y) L to_str("in docking station: \"",?.~.name,"\"")); 6 l2 {! [! g) h6 |3 q
end;
' c$ M& \5 l# X0 ^* s else9 g! u+ D7 T; p; ]
@.Destination := assignLObj[1,row];
4 h6 Z0 l( m* T3 i4 f end;
' u3 t2 H( w( G% d' ^9 l& J* n newDirection(@);
/ ?/ F4 a c, ]4 ~ @.HasOrder := true;( l% l% j b) x9 d3 O
end;" T' M! X6 R4 C: C. N/ Z
end;
# _1 j9 K! ^$ n+ \3 Q9 }. F W" Dend; -- of the method
; d) H# Q/ L. p" z$ Z7 q9 Q |