/* called by: entrance ctrl of the object 'track'; k9 p3 B% Y9 w8 W4 K- Y
*/
: r* F. p" y) ]" {. @5 u" Jis
* _& p# o: h8 p3 U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. X# r6 _$ `4 s4 J+ cdo
2 p1 ~4 s5 O! ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
7 ?9 b7 Z' v* E8 V W if current = @.Destination -- else return
& m7 V5 D+ w2 b. B then
$ L6 o6 N: _. N. U @.Destination := void;
8 [/ ?) l5 @5 T/ \7 J if @.occupied then
9 f$ x1 j7 ]$ k% E. e1 n1 K part := @.cont;0 ?5 T: [. R; X! B
@.transpOrder := void;3 V. @4 f6 |, W. [& x4 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ]1 b1 I+ q4 z' W, `1 G5 B) L! \' z/ m* @
@,root.eventcontroller.simTime);3 X3 ^, y. L' u: N, b
@.HasOrder := false;
& r! U; T8 S8 V' R) w @.DrivingHome := true;
- K% C1 i0 a0 R4 E& L rgManager.tryToStartTransOrder;
- \$ j% h# H8 o' U9 R3 y if @.Destination = void
6 G7 z5 s4 H# x: A8 W# m# D+ U then -- no transport order for vehicle @
' ]3 d' e; F4 H/ ]4 j' E @.Destination :=' l: @, o2 h* ^- a+ k6 X
rgManager.nearestFreeStation(@,track.~);7 F+ m$ m* a; A. O; l
newDirection(@); . G: `5 b1 I# i8 I; v
if @.Destination /= void then
s- y% W; N# \ @.Destination.NumReservation :=
% U6 \3 [9 z0 e. J$ {" A q @.Destination.NumReservation + 1;# m7 H' e6 D0 u A! e" Q, R
end;9 Y3 M* {, B5 M5 x& A9 V
@.CurrIcon := "drivingHome";
8 [7 E7 ~6 y9 n @.DrivingHome := true;1 h4 v C5 _* f# I* G; b! E2 g
end;" ]$ R. `1 p. y# s: d" x8 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 M; E, w7 b3 T3 B2 o2 { part := @.transpOrder;
1 E% I2 V- `! Q7 B. | part.move(@);-- load part3 }" V- a& c* |; b
@.CurrIcon := "load";6 O) i4 T/ o+ O" S7 ?
GlobalDistObj := part.globDestination;9 H" W( s o2 a1 l v5 y6 _
assignLObj := rgmanager.rgAssignL;# l8 I `" y& L% f7 H& b2 s
row := assignLObj.getRowNo(GlobalDistObj);# _1 ~8 p! D& [3 h& Z1 {
if Row = -1 then -- since 70
3 |7 K9 A( {% p" `5 q" y if lan=1 then
9 T7 U6 H% e' s8 N1 V5 a: Z( R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 g' f c( E6 h) e5 D4 J! `
to_str("in der Andockstation: \"",?.~.name,"\""));. n* S% K5 R9 q$ U& L/ V% L" T
else8 i" t# G; k( A5 @1 x! U& G- _9 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 }6 O( I$ o% @9 M to_str("in docking station: \"",?.~.name,"\"")); ! B8 p; o0 Y' e' e
end;. k8 e) A$ d7 }+ v6 o; |4 O0 m
else( d% q+ F# {( X+ b
@.Destination := assignLObj[1,row];
) p0 R) s, J# R# J, Q6 b end;
( i$ C2 Y( D. |2 k/ k newDirection(@); w5 C. T1 b3 w" f
@.HasOrder := true;
$ j" a# p$ H; C0 o end;% l" G/ m0 y( c# ], P' G5 O3 O- |" i
end;0 m w7 e! j( e$ D% W, N
end; -- of the method
- z: e" x! y& s) j7 N) [ |