/* called by: entrance ctrl of the object 'track'
2 U" U0 b7 }! V% {% t( }# w*/
+ `0 a4 H: z' [is
% a1 p) y' A) M3 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" L! U- y# l9 ?do4 B! G7 X) ?1 v7 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
# m$ m$ j$ _2 c: b) X1 S* L if current = @.Destination -- else return
. W L; d& v3 g$ Z4 Q+ F5 Z then
1 B6 H# M& {+ T; o- m1 t @.Destination := void;
, m; G( u. x: t) |. x if @.occupied then
2 [: x: u1 y9 E part := @.cont;
# l$ T9 d- s; f @.transpOrder := void;) t3 Z, c9 t6 E7 S; P. Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( Y' q; G! ]% Z, w; B& G) v
@,root.eventcontroller.simTime);6 P+ m# N: c2 b0 M
@.HasOrder := false;8 `- f1 ?0 q! O8 y" Q
@.DrivingHome := true;
. _0 {; ~* Z* k. k rgManager.tryToStartTransOrder;$ @( E4 N9 J% F2 G! S) E
if @.Destination = void. Z( b+ _8 [- K
then -- no transport order for vehicle @
( U, S# k; U5 u' G" N7 J8 ?8 c @.Destination :=
, q2 r) {9 s. `8 B r$ Q: Z rgManager.nearestFreeStation(@,track.~);
- G) p+ m/ I( F- D newDirection(@);
q t" S& L! i& k if @.Destination /= void then( E+ e9 R" C* L+ t: M6 A
@.Destination.NumReservation :=; B: U. }/ B- M3 G+ x
@.Destination.NumReservation + 1;& j& r* C! A) P, T3 w6 t
end;
* q! ?% i$ R$ y( H @.CurrIcon := "drivingHome";
& H" P. ^8 E# n- A @.DrivingHome := true;2 d: M: @ b! K
end;
' U4 _0 W/ m! r7 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 D J# G* }6 w( l! o% F/ } part := @.transpOrder;" }7 A1 H0 E% G4 z) h) s
part.move(@);-- load part3 g( t2 u3 ^" U; K9 L
@.CurrIcon := "load";
# N% ~+ m( {( y$ m/ \( w t7 W7 R5 ^! N) E GlobalDistObj := part.globDestination;6 A0 b$ T2 |. g6 B
assignLObj := rgmanager.rgAssignL;
6 b( j- j1 [9 _% k+ A, Z0 ] row := assignLObj.getRowNo(GlobalDistObj);
6 z; c1 k7 S3 u if Row = -1 then -- since 700 l# D: A5 Q) n3 b+ E
if lan=1 then1 H; }7 w7 _7 }: D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. y E' b# O/ ^9 ~, }! U
to_str("in der Andockstation: \"",?.~.name,"\""));/ z3 V& G+ U& b. U# K" G$ Q1 ~; i; @+ a
else
2 i; K7 J! g( Q1 Q. |/ K8 i6 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. l, J8 l. P9 \2 E/ Z: R! G
to_str("in docking station: \"",?.~.name,"\"")); 8 J7 ^# C- g1 t0 [1 z8 ]
end;
3 M* f; n& q1 H6 p$ T* r8 y( [: o else: n$ I# ?, h9 F& |) G: p
@.Destination := assignLObj[1,row];( ~5 h* w7 h0 i K
end; + r5 r; O6 n/ ?$ Q$ c0 R4 h
newDirection(@);( A+ y* A; u9 I
@.HasOrder := true;9 Q( l% ~2 Y/ c; n( d3 k
end;% ~) a' p1 C5 `$ ~8 P) s$ P
end;! k5 q1 v2 E- {2 u3 c
end; -- of the method4 }8 Y1 V( r6 e! Z' h/ x
|