/* called by: entrance ctrl of the object 'track'/ v. ^3 `& t: K4 W* I @0 i7 |' V
*/
c8 J! v3 J. @( yis+ {& A g$ L8 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 `: n! E$ w. `- W
do
/ d, t; E- J+ L- }, u6 I Lan := rootfolder.Internal.Tools.AOLlanguage; {* F. O+ \1 k) C) s
if current = @.Destination -- else return
' x8 O' i! Z! d. _0 ]! J then
1 @' w. B& o# w+ J. K0 j2 K' ]+ W @.Destination := void;
# t! B( ^! p1 X2 `1 d if @.occupied then6 m$ t$ t4 Q d& q+ z2 [! K2 \
part := @.cont;
2 f/ R" A) ]# u& B# r$ J+ S @.transpOrder := void;. S2 R9 j$ S5 n K# D# h6 j8 l! B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 U$ D9 m0 F/ d
@,root.eventcontroller.simTime);5 X% d$ z% o* k4 @
@.HasOrder := false;
& i7 R; {8 u5 t7 q- }' z8 _ @.DrivingHome := true;
, {1 K, \: Q9 M% R) j rgManager.tryToStartTransOrder;
% e# M+ g5 l, _5 j! I if @.Destination = void
7 w6 j5 d% j' o5 H0 A8 b then -- no transport order for vehicle @8 ^: r8 B0 k$ n( F3 ?: Y
@.Destination :=- J# ]$ \1 O4 {, H# n: a6 H
rgManager.nearestFreeStation(@,track.~);
# V* x+ l( x2 N; j! L newDirection(@); 5 C7 @, ~' y$ S, l
if @.Destination /= void then
2 Y2 W* {0 @/ n+ W5 f @.Destination.NumReservation :=3 V. C n3 W' M0 ~
@.Destination.NumReservation + 1;
]: X0 B, m" I) u. b6 V/ Z end;
1 b/ S! M! V3 Q/ ~+ M$ Y& `6 {" ] @.CurrIcon := "drivingHome";+ r+ H, a; U. }5 ^
@.DrivingHome := true;
9 C5 R2 I; P# m# g/ d; A end;2 U' J. G+ Y4 Y2 R% l* v0 q" k& Q$ {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& M+ Y- q( `) D1 `* m. D2 ^) G
part := @.transpOrder;
4 h" X+ o- c1 ~- U- J( l2 y* l1 q part.move(@);-- load part" d" ^; Y6 q2 G; J* I
@.CurrIcon := "load";9 j( `6 ]. T/ b1 M) o; B f( g! A( ^
GlobalDistObj := part.globDestination;
6 V9 y. T& X+ p! i' s1 I assignLObj := rgmanager.rgAssignL;
( H( x8 ^. d7 l' L row := assignLObj.getRowNo(GlobalDistObj);0 W Z! k! U5 ?5 y- o+ i" l
if Row = -1 then -- since 70
0 ?: l. M9 @" B0 s: j if lan=1 then
) \5 Q U. ?/ }2 c w' F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& P3 ^6 Q. j. ~3 y to_str("in der Andockstation: \"",?.~.name,"\""));) Q" w+ ^1 k& s L- `* Y
else4 q+ U2 ^( Z2 t* ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ H- \# y; w2 J/ U, } to_str("in docking station: \"",?.~.name,"\""));
' Z; j4 d4 c" u end;" F7 i: x* q$ |* D; J
else
1 J& y% M: N, o9 e" \5 H3 ` @.Destination := assignLObj[1,row];/ @. H1 }+ M4 P. k& g0 H
end; 8 m- c& H% h4 `1 b* z
newDirection(@);
' D$ O* W5 Q" z6 v1 n9 M; Z @.HasOrder := true;
# \+ P9 D" g( L' I) S0 V8 m# @ end;/ I% u' D6 c4 u8 C) R, q2 s
end;
$ N: t% f. M& y ^9 p oend; -- of the method
/ l8 N1 Y7 z8 ^3 ]# V& h |