/* called by: entrance ctrl of the object 'track'
w; K$ I, L1 J* W( `+ ^*/
( Z+ o0 k I6 B b( Fis6 [4 E1 j0 |' V% X' c" c* J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* s! x. F5 j* Z
do/ i. n3 W4 k! L1 y# J/ ^2 w% d
Lan := rootfolder.Internal.Tools.AOLlanguage;: s# x- P* z$ a. y
if current = @.Destination -- else return' a$ \6 ~* j5 ] B, B( \4 L
then. O0 g6 f( Z( a9 A
@.Destination := void;
& t; i" ]2 J/ q if @.occupied then
- F7 p# g4 _+ g( A" N! E part := @.cont;& c, l5 D6 c9 s$ |+ v
@.transpOrder := void;
2 N6 j' ^$ h& Q- b$ V7 g4 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 k1 M5 T- V8 [4 F! Y @,root.eventcontroller.simTime);
& n- b, x9 B# D4 ?0 L5 i @.HasOrder := false;6 O9 _- a( s- N. ^& E! _
@.DrivingHome := true;
; E. j4 V" ~2 }2 z rgManager.tryToStartTransOrder;
% o0 |" E+ v( U0 p o0 s1 b if @.Destination = void/ e- e& L! O. J
then -- no transport order for vehicle @
& Q t$ u! Q" ~1 d }6 n% H& ~) s @.Destination :=3 Q3 U- P( z0 P/ V+ l4 ?, G
rgManager.nearestFreeStation(@,track.~);
# ^9 l% W: Z( N0 e9 e# R" T. S newDirection(@); 5 f5 m U, c7 \( v( |% d
if @.Destination /= void then
9 E. n5 v- u9 F5 P @.Destination.NumReservation :=
* o' g' h, {/ _* s# O4 [. E) H @.Destination.NumReservation + 1;
. e& Q! Z. L4 e5 u3 ~9 U end;4 L( F# b3 U2 I* V" k/ ~5 a. o0 G
@.CurrIcon := "drivingHome";
3 q( c/ c9 W$ r- r' X' Z2 C @.DrivingHome := true;
C' S' V6 a0 ~$ u end;
% \3 V9 @. ~+ L0 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 s# a; d3 N" Z! g' ]% }3 z
part := @.transpOrder;
, H% B8 C+ G5 O0 s+ s9 J0 c part.move(@);-- load part
8 M) \" u) o6 W6 D/ D @.CurrIcon := "load";
z- T4 B* z K6 {1 v GlobalDistObj := part.globDestination;; z8 U) q: j9 i& _
assignLObj := rgmanager.rgAssignL;
. z& f9 D9 q) \( B# O( [7 ` row := assignLObj.getRowNo(GlobalDistObj);2 V8 R/ V% N3 o4 s8 I; c v$ b
if Row = -1 then -- since 70, [/ H1 J; @- ~7 s
if lan=1 then+ X4 }( s; }: i) D% E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* T" g, c3 Q& I; B) ]" A( N% Q" g7 E# C to_str("in der Andockstation: \"",?.~.name,"\""));' g; n M) x4 ~$ J) c- w
else1 m7 }* V6 x$ Y4 m( a" t# i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; W" H3 N7 l2 u; i( }2 `. U6 a to_str("in docking station: \"",?.~.name,"\""));
/ j% F7 o; G: T6 E end;
7 p/ c* K, c& p2 l0 a else
- h; I& K8 R: D, j( f4 u @.Destination := assignLObj[1,row];
" H0 ^: A( F+ I$ w end;
9 j d* U3 ^/ D+ D, z% |* s- D newDirection(@);
6 R2 L9 M0 ?7 ]8 c. b- J+ u @.HasOrder := true;
! y" k7 @- ]+ W9 `, {5 K1 V A end;4 l3 T0 p1 z I r5 C
end;
- Z6 m1 ~3 H! `, xend; -- of the method* x6 ]- m" @: _
|