/* called by: entrance ctrl of the object 'track'
* _: [3 {! p- E$ ]*/
( H! x9 z' i: w1 uis
0 I$ ?8 s3 L9 Y! j2 v$ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 c& h% E \- _/ S/ Z! fdo0 | o" V3 c% h$ f" ^
Lan := rootfolder.Internal.Tools.AOLlanguage;: Z- d* a: i" u0 n7 A' s. E
if current = @.Destination -- else return
- d! I: E) _4 @ y* L. \2 w4 Y then' b& ?3 ~# [( i1 q& F
@.Destination := void;
8 G! ^2 a3 U8 ?7 U* F p% b" D7 T if @.occupied then
3 Q5 `$ X/ A* `0 Y+ ~- M part := @.cont;, _4 E% n: o G6 l8 `- \! X
@.transpOrder := void;
+ b* R1 {3 k6 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. e' m5 b; L0 B! c0 e6 M @,root.eventcontroller.simTime);$ o7 w8 Z9 H( o; _+ N j/ |7 m4 ^7 a
@.HasOrder := false;& ^" C' s: F3 i2 N
@.DrivingHome := true;4 |6 O0 M( y7 ~. g& ]' X4 {
rgManager.tryToStartTransOrder;0 I8 `- r. b- c1 ?
if @.Destination = void
( t% L- ^0 N e6 H% n then -- no transport order for vehicle @8 m3 u J C$ e/ O. R I
@.Destination :=2 ]: C; s) R: M$ m' E* U
rgManager.nearestFreeStation(@,track.~);
1 [! X; j" @' }/ | newDirection(@); 8 y \1 Z' w# h) |- a4 u" P
if @.Destination /= void then* Z- _0 y4 k* {4 E1 E
@.Destination.NumReservation :=
3 D# l# y3 ~0 v/ `3 N/ b @.Destination.NumReservation + 1;
2 {; ^+ |$ U! q, E end;
, ?0 E2 M; c& F$ ~3 ?/ P- @: | @.CurrIcon := "drivingHome";
) D% {" T) t6 \* x1 y @.DrivingHome := true;) F6 G$ }5 h( z9 w+ u! f
end;* N6 ? ~# G4 J' u7 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station [' [( I/ x' |+ L3 [
part := @.transpOrder;
- P: F: V7 h9 D, s% |6 S part.move(@);-- load part
1 x( m" m! D0 v; | @.CurrIcon := "load";, ?/ s: K5 I5 i4 R. |
GlobalDistObj := part.globDestination;
3 p, M U! k1 d& d1 e assignLObj := rgmanager.rgAssignL;, P. ]2 a1 x- g3 D- M7 a
row := assignLObj.getRowNo(GlobalDistObj);# z y$ j9 D! M8 o
if Row = -1 then -- since 70
: F# K) U" v- M( U5 M8 o" e3 @ if lan=1 then. `9 g; O6 G1 K4 Z+ @& I0 ?1 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) E4 L, o4 x- ]4 k- ?% j( f
to_str("in der Andockstation: \"",?.~.name,"\""));
# ~' d$ B6 ^" I3 y. g* { else/ W5 Q1 O$ i. V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 I4 @8 R9 M* r to_str("in docking station: \"",?.~.name,"\"")); $ w! [! k" \- F
end;9 q. i1 D( o1 o4 ~+ P5 F) H$ @1 v
else( W( n `, Z1 ?6 g! K% Z' ^
@.Destination := assignLObj[1,row];# Z1 A6 A/ k; X2 X- e' }+ y
end; $ b) a1 I0 _; P# F# A
newDirection(@);
( {: o h( S( L* U4 Q, p @.HasOrder := true;. y/ J, h5 m) X/ Z5 i1 J
end;
6 l3 Q4 \: I: K4 U9 g7 e; I- p) X end;
7 i8 _0 c1 _( ]7 ^ e0 Jend; -- of the method
G1 B. C5 v7 @% w) M/ T |