/* called by: entrance ctrl of the object 'track'8 l: }" E6 d5 v$ Q/ w3 j8 h
*/: E, i, q0 G( s3 a- {( Z- ~* Q
is
8 m, V- @, Z) A& ~3 a# } q part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ n- o- k! f U6 z9 J
do
5 O6 B8 d: y& J8 f Lan := rootfolder.Internal.Tools.AOLlanguage;
1 y k% Y( |+ w( @1 l" P1 k- h if current = @.Destination -- else return
- t- x1 {! W9 q2 H then
* }& _/ b" }& k! X' y$ d" L2 ^8 x0 ? @.Destination := void;
6 y' }- ^% z- a# } if @.occupied then7 f! k6 P' D5 _0 O
part := @.cont;
g6 a, x8 Q; h @.transpOrder := void; ?5 w( v0 t" B5 Y+ W' @$ t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) X& o2 M* w7 }
@,root.eventcontroller.simTime);
. j7 h5 E. u6 w; y" M8 u, Z$ v @.HasOrder := false;5 s* T8 `2 v0 o5 `$ h0 W- W$ m
@.DrivingHome := true; L! z1 \9 }& {" D& Y
rgManager.tryToStartTransOrder;' K: F" v0 Q4 B! p
if @.Destination = void8 i7 j; b( K9 t$ c N/ S7 Z7 m
then -- no transport order for vehicle @7 s: I* s6 Z/ H% q# V; O0 ?
@.Destination :=
. L# }% B* ]. \1 [% q8 x* Q0 g rgManager.nearestFreeStation(@,track.~);% d, \8 [2 z; I$ n6 @4 E w
newDirection(@);
8 Z, ?: X& \' X: ~9 `0 \% c2 \ if @.Destination /= void then+ v* v7 i. I r' K* Y
@.Destination.NumReservation :=
4 \& Y' P) A8 U3 v& J! J0 |8 ` @.Destination.NumReservation + 1;
7 W3 ~9 W, a8 u9 n end;
2 J! b7 m6 a) _4 q @.CurrIcon := "drivingHome";: {3 z# n1 ~: U9 N) A1 M3 }
@.DrivingHome := true;
/ i) M8 N9 e! U0 q end;
# I* s7 \. N4 C6 K; r! S( E' r9 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ], J! ^ x% ? part := @.transpOrder;
. i. Q: |/ |9 F2 e0 b; ` part.move(@);-- load part
D' M9 w# K1 c$ V& s7 X @.CurrIcon := "load";
* `# Q3 I* y6 h1 C% K u2 q GlobalDistObj := part.globDestination;
2 v7 l+ g U) S. a( G: e/ X6 h assignLObj := rgmanager.rgAssignL;
6 W, E5 y2 J* {/ A% W row := assignLObj.getRowNo(GlobalDistObj);6 D. O- g/ j! c" r1 F
if Row = -1 then -- since 70
" {, o# `0 L) V7 t3 c if lan=1 then
: q- k; w) O, _: h V6 _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ \1 B7 T1 z0 h, f) J! Q3 W, _ to_str("in der Andockstation: \"",?.~.name,"\""));% `; T$ Z9 [" n; E; d
else
3 I3 L: C) ^( c! f' g" L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 T' N3 X) [2 l* x- |9 O to_str("in docking station: \"",?.~.name,"\""));
' G' n: L. n8 I( g end;
' y/ P0 A, F9 o }% d else$ \- V E+ b0 u2 w# g
@.Destination := assignLObj[1,row];
; [# E: v5 Q, @1 s% U end;
( ?5 p G( [6 n9 l6 L. K) Q1 W) b8 \ newDirection(@);3 [2 m% @3 y9 P3 k
@.HasOrder := true;* `7 `* ]1 ]: v6 B# x
end;
1 T& G% O+ Z8 |+ b end;
; e9 ?( {5 u, F/ N6 X9 Oend; -- of the method8 y( T" [+ E8 \
|