/* called by: entrance ctrl of the object 'track'. S4 W$ K% @+ r4 g& Y0 A
*// W- P* j' U4 t0 e P6 l7 O
is
( B. e; w1 n- |! j$ n part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 K# ?9 A& @1 j4 X
do
* T. T1 l& }2 o& i! T& d Lan := rootfolder.Internal.Tools.AOLlanguage;* ?. O+ f- B0 i; C; D' N) I+ g2 G* ~
if current = @.Destination -- else return' V, E) N% y& J' b, G- T
then. @: r, l% R8 u- p$ [* k z
@.Destination := void;
# i% C. K) ~% |0 G+ F, ^. z' j& S if @.occupied then! v, Y8 h& t# q+ m. G
part := @.cont;
8 X9 d7 _, X6 o/ y0 t @.transpOrder := void;
n/ S* }+ q0 i& x* _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" }/ ?2 ~/ ]3 ? @,root.eventcontroller.simTime);
- F/ W3 W5 @) i4 A @.HasOrder := false;
) c0 H/ ^6 w: m" D* E; K f8 n @.DrivingHome := true;: \: X( `& ]* Y( {. ~
rgManager.tryToStartTransOrder;
/ b, d* ?& d7 o9 F: P; w if @.Destination = void2 h5 z/ h4 D5 e* C+ _) r; G$ p
then -- no transport order for vehicle @
V: O0 b0 _& l; j( @8 ?/ N& }, U3 R @.Destination :=7 t8 Q( \7 G+ Q
rgManager.nearestFreeStation(@,track.~);0 ^6 [: d: t) X: |
newDirection(@); 2 O+ x) m0 c1 ?
if @.Destination /= void then" T5 g3 ?* ] P( F
@.Destination.NumReservation :=
9 [$ s! T2 o( M: q! x, z! y* N @.Destination.NumReservation + 1;6 h0 M4 A l# J
end;
' I( N' v* Y9 i$ v7 }2 V @.CurrIcon := "drivingHome";
. D3 U* s& c, W' v( y4 T" j! _ @.DrivingHome := true;
2 A0 _) o; q+ e end;4 N9 t0 b! |, C9 k) n2 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- `! H- d& }% O
part := @.transpOrder;6 r" t0 Q/ c- \' C+ e2 s1 f8 e4 {
part.move(@);-- load part
5 r' c! R# Q# ~ @.CurrIcon := "load";
2 Z- K7 q8 F5 ^ GlobalDistObj := part.globDestination;
4 O3 b0 v: _- Z) c+ u0 i3 }/ e2 E assignLObj := rgmanager.rgAssignL;. B/ U4 j5 r7 y* C
row := assignLObj.getRowNo(GlobalDistObj);4 A/ h$ U1 t) ]# W/ B
if Row = -1 then -- since 70
: H/ T) B0 q) ~$ f) V) i if lan=1 then
3 u1 P z v2 {! k3 |' j' V; I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 s6 `3 x% a. y' @ to_str("in der Andockstation: \"",?.~.name,"\""));
, D# B* {1 A% J4 P5 j9 D! T else
4 c8 q0 R' c2 G' V+ K/ _5 ~! s: u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" G5 E: ~5 K1 ]" {1 w2 V1 u* A to_str("in docking station: \"",?.~.name,"\""));
6 U$ F- W5 ]& V- }" j8 u end;
8 Y6 ?0 d @1 g4 W: b+ c else3 b% B- o4 ^" W6 N6 l
@.Destination := assignLObj[1,row];9 ~ B- n7 _1 G2 C! n
end; , s' K0 ]7 [+ A# S+ ~
newDirection(@);
7 `$ ?$ U. u/ H @.HasOrder := true;
+ W# X' C, H3 o% [8 }2 {" q end;+ }# w- @+ |/ r7 |" K4 P
end;
6 e/ Q( d$ P Jend; -- of the method5 K% |" c/ a, r
|