/* called by: entrance ctrl of the object 'track'
; S) ?, `6 c$ q*/
1 O6 v2 Y1 q' ?2 e4 R O1 R gis
# ]: H% Z# @5 n- y part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 U1 x' t8 T* G$ g+ M
do! U+ e3 R& F6 ^" X1 p3 \6 W
Lan := rootfolder.Internal.Tools.AOLlanguage;& A& |- u+ P8 Y3 X6 ]6 ~! s+ I
if current = @.Destination -- else return
, m4 H- Q5 t8 L then& R- r( x H/ ]: Y8 s! f1 _$ O7 ~. f+ c
@.Destination := void;
- {" V$ X( e+ { if @.occupied then* c- J' g6 W% P
part := @.cont;
1 M& Q5 \2 ^7 M7 ^. |$ c% z6 G" N @.transpOrder := void;
6 R2 o( i: D4 D2 S6 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- p0 ~$ n }7 T @,root.eventcontroller.simTime);0 j& G1 S' v4 D" w
@.HasOrder := false;; r1 v7 V) _3 Y8 I% Y3 l2 V7 N) U
@.DrivingHome := true;
9 D" p, R4 F+ z4 B8 x, T% a- X rgManager.tryToStartTransOrder;
s2 b- K; W2 I6 G" m if @.Destination = void
) C/ e% @' y7 g$ G% t8 O then -- no transport order for vehicle @
5 n) X* b" O5 U {. C3 x @.Destination :=
! Y/ O' p ?: @2 l rgManager.nearestFreeStation(@,track.~);
: `6 S) m& ]- V" s9 X newDirection(@); , q5 R4 t# Q5 H
if @.Destination /= void then
4 _" J4 H9 b( P @.Destination.NumReservation :=5 t" n# L2 n$ @0 N; Y& L2 [
@.Destination.NumReservation + 1;
3 b. M% W; p) p end;8 a$ @6 h0 @9 ^* D+ M* ?
@.CurrIcon := "drivingHome";- Z( h3 ]* Y$ ]8 q
@.DrivingHome := true;
0 W. X7 v- N: C' z end;6 t- ~& r9 d( u/ q1 l; |1 e% R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 N. l0 C/ w3 x( s& E
part := @.transpOrder;& J$ z1 y$ E1 k6 K
part.move(@);-- load part+ X5 L& ^, @1 @" I: C) j9 ^
@.CurrIcon := "load";# F% p2 x4 r0 ^% a, f2 k& m! v. M
GlobalDistObj := part.globDestination;, f! _: b' L, {, I
assignLObj := rgmanager.rgAssignL;* X" c; u ^3 ~5 U: K# T9 R' P3 m
row := assignLObj.getRowNo(GlobalDistObj);) }' d1 p8 w$ t
if Row = -1 then -- since 70
+ x5 h3 q. j m& t h if lan=1 then5 ~( h/ ?" _8 P& [# d0 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. ^1 J y2 `8 S G. M8 U. P to_str("in der Andockstation: \"",?.~.name,"\""));
' M# ^3 | v: E' M6 I. B else& b( z9 o. b4 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 j0 z, G2 c' |2 o! [ to_str("in docking station: \"",?.~.name,"\""));
+ W0 {3 D6 Y/ J% Z0 s end;; t% ?5 b7 s, }' y7 [3 [) L
else5 y! C& s% Z# C
@.Destination := assignLObj[1,row];
; x- f3 _- q& X, f' H, U5 { end; ; Q% j; u; R) x2 Q6 Z
newDirection(@);/ R7 T7 H5 Q5 l0 f
@.HasOrder := true;
2 \; q& d2 {; b: e: b end;
3 V. k9 W+ b1 z6 z N8 F3 u- s* V2 Y end;( h1 F5 Q$ Z3 r( ^
end; -- of the method
* @2 ?; ~" a$ F/ Z3 i |