/* called by: entrance ctrl of the object 'track'; ]0 @7 G1 H h
*/2 R) _9 c1 u& d3 |0 P+ {1 p
is: ^( _5 p/ }" B+ i2 x2 E# Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 l$ V; m. v- E$ R/ [do* {7 j* K' G+ M! i0 ~3 G0 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
' N0 v0 D! u6 r6 h if current = @.Destination -- else return" y% r8 m6 ~2 `# v+ A q }: O
then
( b/ d: G7 l; H @.Destination := void;3 l) x" l; K1 J4 A$ w, Y
if @.occupied then" [) p! W h, y q
part := @.cont;
! V* z- n4 G( j @.transpOrder := void;
2 j" G% X4 x/ Z6 d) H9 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' Y1 f& Z- y. S" ` @,root.eventcontroller.simTime);
0 P I1 c0 j& Y: s$ L( D5 \ @.HasOrder := false;2 ~; j1 H( L6 U9 B' Q/ o4 y$ i( x2 @: |
@.DrivingHome := true;
! K& D$ \5 [2 j* p rgManager.tryToStartTransOrder;% R( D1 l( K+ c$ s
if @.Destination = void
# T# z& T% k x+ u then -- no transport order for vehicle @9 n1 a( D8 w8 p# |5 T
@.Destination :=) n U' u) T( f8 b
rgManager.nearestFreeStation(@,track.~);
# w$ i l# v3 p; Y2 I5 j newDirection(@); ( b( @7 z8 R( g, _. ^ K$ n
if @.Destination /= void then
1 r: V$ o7 g' S4 M0 @9 c @.Destination.NumReservation :=
3 g# m4 X3 P6 o" h w4 G/ D9 p @.Destination.NumReservation + 1;! m1 o# n8 w: A5 L5 F
end;
% s: n! f* j1 e( e @.CurrIcon := "drivingHome";
2 ^( [# z( }( f' K% ]( x; | @.DrivingHome := true;
2 o* a% `6 f0 X( G$ t* k: p0 K end;( W7 b, ]1 a8 o8 ]9 a9 q& l$ W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& m1 H" b' t; c) F
part := @.transpOrder;" i$ n' |# I8 J
part.move(@);-- load part8 [- N+ Z+ n5 H) e- M
@.CurrIcon := "load";
& e+ H2 ~% B8 `4 z- M- U GlobalDistObj := part.globDestination;' j2 Q. i7 A6 Y) {+ Q8 h* D) S5 _9 r
assignLObj := rgmanager.rgAssignL;& Q7 K; s) ?4 w: U+ I2 a
row := assignLObj.getRowNo(GlobalDistObj);
- [+ j9 g) C3 Q$ w' y T4 W a- ] if Row = -1 then -- since 70
) B& L' U6 S: | _5 ` if lan=1 then; [: c- J f; C3 i7 ?6 c) f7 N$ S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ z5 q! q) j% `4 n
to_str("in der Andockstation: \"",?.~.name,"\""));, a" @$ y" O, j
else
6 l" k2 o5 Q- @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 O' M) [1 s6 N7 H) B: V to_str("in docking station: \"",?.~.name,"\""));
& G/ o# @4 U$ A9 C$ u end;
' P; P+ V, r1 M+ C' w' j' l else
9 K) l9 x0 w/ G! ^) A( i @.Destination := assignLObj[1,row];2 H" q) W. j' Y6 L6 v0 u
end;
6 y# U# d6 Q; ]' Q ~ newDirection(@);
2 F2 p" f8 `+ j, b* [ @.HasOrder := true;
6 l2 j8 I$ c- h: B end;+ Y8 m, r7 r4 y4 M+ D7 T
end;
* N# E+ M2 r2 y" y# fend; -- of the method
- [- ]$ W/ |+ i |