/* called by: entrance ctrl of the object 'track'
& }( p- K$ i, a. h# i, z1 N*/
) |4 D$ J, _; r5 ~is, U; M6 |, z* ^( E Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 k; a* U( U5 c$ Q5 _do
( M# F2 H/ W. Y& `- c/ J b Lan := rootfolder.Internal.Tools.AOLlanguage;
! T$ w q. P6 c+ P- T4 ` if current = @.Destination -- else return _$ i. \& v8 n; u
then& O! R3 n' ^6 |* `6 I5 W* q
@.Destination := void;
% r5 ~/ w8 `3 E! d! L if @.occupied then
* [$ o. i/ ]$ h; t5 H$ ^ part := @.cont;# M- Y) Q, Z8 w3 q4 K
@.transpOrder := void;% }/ p. A; u6 u" y! o1 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; J) U3 ~! F2 D; ]/ Z. ^( X- r
@,root.eventcontroller.simTime);
4 z7 E/ r, | a, f2 E: l @.HasOrder := false;
W( O& x) e; y+ f) {* W! D" \ @.DrivingHome := true;/ ]* c4 q J r2 ]$ w( v. \0 x
rgManager.tryToStartTransOrder;1 C* t4 V0 V6 J* r7 C6 j3 t
if @.Destination = void
x. p7 @! V' u then -- no transport order for vehicle @7 c1 _0 z: B4 w. `! m8 Z
@.Destination :=# |3 a" N! |& d, ?1 e5 Q; G
rgManager.nearestFreeStation(@,track.~);
* j$ L% J; J- ]0 Q4 Q4 Z newDirection(@); * o5 v3 h- h0 d: {8 D
if @.Destination /= void then+ w. J+ E' e+ U, W* g- r6 `
@.Destination.NumReservation :=! k K/ ?3 }# S7 G' L' i
@.Destination.NumReservation + 1;
' v2 n0 Z0 M$ Z end;
i6 C# i7 b# H7 y* b* ?& m @.CurrIcon := "drivingHome";3 P9 x8 l% ~2 X% @$ F
@.DrivingHome := true;! O6 D: z0 p" N9 h
end;% |- N7 U% O" r) S8 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- H6 V9 ^# H$ s; ~3 ], H
part := @.transpOrder;& S/ s3 c! U6 }3 S
part.move(@);-- load part
c' Q; t. c. P0 J @.CurrIcon := "load";
8 x( C0 H( {9 d GlobalDistObj := part.globDestination;
+ _6 Q: l4 V( e$ j# F assignLObj := rgmanager.rgAssignL;( M" x. W0 ]$ n! D$ [9 N& D
row := assignLObj.getRowNo(GlobalDistObj);
- w/ W2 w0 e1 C- S' \ if Row = -1 then -- since 700 r7 x2 }% _4 {: B( u0 O
if lan=1 then
. X4 Z7 L+ @) K, B* O; f; O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 j/ x6 b* E5 b7 Q) O7 n5 X to_str("in der Andockstation: \"",?.~.name,"\""));
$ q$ _) k; X m1 `9 ? else
+ P7 v3 c2 u2 c1 }+ h5 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; t8 o! T- Q) y7 {
to_str("in docking station: \"",?.~.name,"\""));
: h4 U% V7 g1 v* q3 _* F- y+ g2 B end;
' [( Q+ {* j. t, B else3 _6 f# R6 w. [8 Y; W. c$ R7 y" S
@.Destination := assignLObj[1,row];3 o- N3 m( ~/ @* l
end;
, X4 a' f/ O2 e newDirection(@);6 M- `: Y* `. T. S. G
@.HasOrder := true;
: g, ^5 y, C! s6 {: c end;7 B7 R, Z" T6 C
end;1 C0 @7 h4 ^6 y4 g) d/ E
end; -- of the method, R% ?" S$ s7 j# Y
|