/* called by: entrance ctrl of the object 'track'
2 D Y; z0 B9 j! ]( y/ i1 f. W/ T( S3 I*/
0 f. J, Y$ u- L1 a! @8 v: A" Lis
2 }9 w. r: l# u- K+ E- j- C/ W$ B4 B3 X5 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: w( H/ O/ j& W0 o8 T& tdo( J9 }% Z4 R& z
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 }. v: Z1 l/ V. K4 ` if current = @.Destination -- else return
- J3 D1 { D9 |* t+ J then
- A. Z8 {( n3 K5 C' { @.Destination := void;$ b: s p$ r; `
if @.occupied then
5 J$ z, n' M) h+ j# A# m3 s+ g part := @.cont;! D- O* P) w! _/ J6 ]& s
@.transpOrder := void;* ~0 f6 G8 `* `: A5 _+ v) P& M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. S8 q) I! n/ {! P @,root.eventcontroller.simTime);
2 e7 n: H5 o$ ^- s1 i' o3 o7 J @.HasOrder := false;
8 [& o0 \6 W, L. y- D @.DrivingHome := true;
# V6 [* s. C- Y0 n7 z/ I7 [; t rgManager.tryToStartTransOrder;0 _; K; m$ ^& v/ D1 b1 @& w+ v2 `+ c1 W
if @.Destination = void
7 b3 [1 B2 G( C) g( L- P1 E then -- no transport order for vehicle @
& r. U, c0 ~! ?9 ]3 @+ S' E: T I @.Destination :=3 U3 M0 d& p& @) A$ H* t
rgManager.nearestFreeStation(@,track.~); w4 J1 ~) K: r' B
newDirection(@); ' P% J8 P/ m+ ?$ `
if @.Destination /= void then
3 p) A0 g' Y B( w( P( E8 N @.Destination.NumReservation :=3 K( {0 M: L9 s, G( z! `+ B
@.Destination.NumReservation + 1;& u7 ]/ [0 P: U( T
end;' J8 w$ O4 i/ y# n' o4 v
@.CurrIcon := "drivingHome";
/ Y* ?- c" Y/ f- o- j/ Z$ F3 ^ @.DrivingHome := true;! u5 g" V% o) ~) f) A$ x
end;
. N% d' m m* M9 `! N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 a+ j4 L. u H2 q: Z part := @.transpOrder;- f- k2 x/ B& S0 x
part.move(@);-- load part& @1 x: b1 U K! e, x
@.CurrIcon := "load";
, [+ Y1 [5 m1 W4 W GlobalDistObj := part.globDestination;
0 y9 K% `* N& X/ A, A assignLObj := rgmanager.rgAssignL;
1 A+ _ ^8 T a4 u6 i row := assignLObj.getRowNo(GlobalDistObj);' L9 u" O3 u" ?6 _! u8 Z: P: F
if Row = -1 then -- since 70- y8 u q& p( z( ?. ~
if lan=1 then
$ T) L( k& _' Z5 F2 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," Q" t2 C' `: R+ A$ m3 |
to_str("in der Andockstation: \"",?.~.name,"\""));8 L* H% N7 `0 E/ y9 Y
else6 V, a5 ?. v) l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 J: W) e+ s# d2 l/ }, C0 m. J, A$ H to_str("in docking station: \"",?.~.name,"\""));
& @1 i( b/ k) w+ S3 }- M8 X/ x$ X/ n end;
* d7 T8 L, a; n& I else# H# ^( z5 c% | L
@.Destination := assignLObj[1,row];) P( L" E4 X( |% ~8 ]. \; |
end;
, J4 U8 H3 a+ {$ W newDirection(@);
4 b0 H; L! W h' m6 S) Q( w @.HasOrder := true;8 t5 ^ k8 B2 V0 p" M
end;: E* l" D* o' v8 S6 b! u! P
end;- \2 P$ w: a( y; a
end; -- of the method+ B, q3 C7 \0 R( I
|