/* called by: entrance ctrl of the object 'track'
7 q5 }) s0 M2 p*/
& z# u/ b* G. `% _7 `2 e2 l3 m6 g0 H! \is3 q0 k* g8 L/ ~9 G h2 D1 q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( s% B* V2 B9 b3 T$ S8 u9 xdo
% ~/ L* O3 @5 u/ A* t Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ~" b+ |9 [6 l7 O! E. P if current = @.Destination -- else return! K2 K. z% l r
then
2 A9 F* e9 k3 U8 S @.Destination := void;
5 W' m* t3 P4 i+ ?6 U* b) Y if @.occupied then
; [! ^/ b! Y4 v7 M0 h; H- v part := @.cont;
l" L0 x# E# K- u" M4 o9 F @.transpOrder := void;
) x& V7 k U* e" |' j0 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' t* v* e7 i( Y2 Y4 Z- V
@,root.eventcontroller.simTime);7 {) A% l O2 Q; l+ J5 H) s
@.HasOrder := false;
P6 z2 {2 T8 h3 Y7 j. V @.DrivingHome := true;
6 z. a n3 {; u/ j; o rgManager.tryToStartTransOrder;9 q ]* G( L; p0 l5 S# o& C
if @.Destination = void
, B$ Q0 x4 r6 n/ ?! o9 P7 {% O6 o8 } then -- no transport order for vehicle @ ^" b! ^2 b) Q9 t& [* M. i" d
@.Destination :=
) q6 \# l' ~% Y8 V1 ? rgManager.nearestFreeStation(@,track.~);$ w/ D( T; v0 B0 J: H
newDirection(@);
. t3 ~8 `8 c* D' f' a: I if @.Destination /= void then
& E( _9 K* @+ r5 Y Y4 V @.Destination.NumReservation :=7 c. `7 n" c: f
@.Destination.NumReservation + 1;
( S1 ~' ?1 a4 m end;8 Y7 j" m% w [, R' r/ V
@.CurrIcon := "drivingHome";
' t2 A) z5 f9 I. K3 p: u @.DrivingHome := true;# O1 Z8 X+ W0 V0 l. n
end;( N& `' t: O/ O0 O6 n) ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- |' W9 D% Q' p% f- y! d- H( {4 l
part := @.transpOrder;
+ H- R$ W% k* \+ T, m% ] part.move(@);-- load part: P2 Q. b! E) a ? d3 c
@.CurrIcon := "load";6 i* y2 g. G: p% }
GlobalDistObj := part.globDestination;0 ~ k- Z+ f' H Y* G# s
assignLObj := rgmanager.rgAssignL;, F/ W X. e' Z$ Z" Q
row := assignLObj.getRowNo(GlobalDistObj);8 T2 @/ d0 M/ i6 s* i
if Row = -1 then -- since 70
$ L* ~, c9 W4 C if lan=1 then
6 x& }# M/ J" s1 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; ]: g6 b/ R" Q# e
to_str("in der Andockstation: \"",?.~.name,"\""));
7 s b4 R0 ?# n% w else
- M( ^9 g- O) N+ `8 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. ~" R- O0 A" X, f5 [( X# U; d
to_str("in docking station: \"",?.~.name,"\""));
% s, |3 D d' I n/ E end;
) ^- U3 A3 P4 b* g% Q3 g/ f9 [' L t else- X1 e( L8 X$ u- W
@.Destination := assignLObj[1,row];
, Y, a- `! J8 M' n; y- o3 E end; $ b* [9 e4 M$ W5 ?$ G, @
newDirection(@);, [) ]( z( h5 J; j: o$ Y
@.HasOrder := true;& ?% L S9 K* _5 z
end;$ O& E( Q {1 v9 P
end;; r8 _4 q" p7 [" q+ W( W
end; -- of the method
8 ?. J$ V8 a1 v |