/* called by: entrance ctrl of the object 'track', T4 M9 d& i% v& W. I% k( i' X
*/
: ~, V; P7 o" {6 G u, V- Mis! H+ U W3 r2 O2 F, C% A" ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* ~% s# _) U1 j' Q( f4 m0 ldo. D6 \7 A }0 C" ?/ p
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 F7 y/ Z. w" b5 L) n if current = @.Destination -- else return
1 A, b4 v5 ^' `( [ M3 b( i) K then2 Z, k) F0 M4 {1 ?
@.Destination := void;
* M7 f) R# S4 h/ B5 i7 z8 C if @.occupied then3 {1 l( n8 c2 e$ F `5 K& q3 ^0 j. L
part := @.cont;
, K1 J7 B) X4 e: M4 d' |0 L' m @.transpOrder := void;2 ~$ @* p# `; q$ ^, D* A' i' D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- J0 T o$ Y( f9 _" S- ]& |6 N2 T @,root.eventcontroller.simTime);
5 i0 H- G! M5 ]% G# ~9 F' \' p% | @.HasOrder := false;
! ^* Z' ^8 v( Q+ \; b" o- d( k. J/ { @.DrivingHome := true;
% N+ O! _8 g* Y G" A rgManager.tryToStartTransOrder;3 ~* \, r* F. a+ E
if @.Destination = void% }5 Q5 `0 c6 g7 T
then -- no transport order for vehicle @
3 I4 t* A+ D- P9 Q" O' P @.Destination :=
8 J9 {/ Z/ v$ T ]$ M rgManager.nearestFreeStation(@,track.~);
9 J/ T. r$ q% T/ D. q newDirection(@); 6 p3 [9 S; I2 t# N! T3 S
if @.Destination /= void then) i' ~2 {+ ~* o& j
@.Destination.NumReservation := Q4 Q+ u5 u! Z( Z3 u J0 Q- ^* X
@.Destination.NumReservation + 1;
( U5 a1 e5 a1 D" H- e1 q7 f end;" y; o; U% m0 p! `0 y
@.CurrIcon := "drivingHome";
3 Z* y8 a5 J/ N- d; p @.DrivingHome := true;
6 i' d5 M, v3 |+ R& B' @ end;
3 P' P) F: ^1 q& Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station! H Y) ^* _; s9 ~6 Y1 P
part := @.transpOrder;
9 w# R' _8 C5 u! D8 p( [5 h part.move(@);-- load part
) S. c% X) {* g9 P @.CurrIcon := "load";
" J% e, f( q* t8 W% L* I! U2 K" b GlobalDistObj := part.globDestination;2 \. x1 X& R! q0 J! x# a" s
assignLObj := rgmanager.rgAssignL;0 u7 G O- H' E' ], a
row := assignLObj.getRowNo(GlobalDistObj);
$ S! G2 O8 }6 y9 N if Row = -1 then -- since 70
' g2 |5 n& M; n if lan=1 then* u9 \3 Z, j7 ]# P5 q9 J1 V9 r" N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 u+ t1 x h! Z. y L- j9 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
3 y* \4 e9 O: w' O3 |/ X else, U9 W) T, t4 [+ Y% x6 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: o6 F' M8 M* _
to_str("in docking station: \"",?.~.name,"\"")); $ B# N; J6 c5 u1 t5 c3 x8 |6 s
end;8 v8 c! z/ U3 _. Y2 E, D
else* p8 y8 L( e: l+ d
@.Destination := assignLObj[1,row];% |. K8 e9 {8 O4 ]9 e- t5 s. ^9 l4 ^
end;
# S$ [2 s4 t$ G/ z6 ^9 T. o/ t9 Y newDirection(@);( G( L) u, [6 ?! V4 H: ?
@.HasOrder := true;5 i% h* m: l6 Y' X
end;" }; |/ x9 a$ ]1 X+ X0 y
end;
% y0 u; O4 { j" g% Gend; -- of the method
3 }+ A! z7 P3 B2 w+ ? |