/* called by: entrance ctrl of the object 'track'
6 ^; ~5 K% ~' C3 v*/: B; E d3 `# G& i& O0 X( `- k
is
% z* c) ]* i, G8 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( T3 ^9 c. S- K, v; G4 W& d) Xdo! u% Q, T: ~( z2 ]+ p
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 f$ }; {7 s0 P# r if current = @.Destination -- else return8 @8 l3 C/ n5 a; v4 b( V- m
then$ i' E( Y9 l! ^7 M
@.Destination := void;
- j6 h' l' R, M* q if @.occupied then
+ G- u2 S: u# } part := @.cont;* Y6 u8 O0 q% Y* C6 f* T8 p
@.transpOrder := void;
0 ~! {# I, z- x. O+ h, |% e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! t2 ?9 H5 ?7 g
@,root.eventcontroller.simTime);
$ O1 ~& J( B. J l1 o" ]7 @ @.HasOrder := false;
6 T, ^( g; B$ w5 r( `- R @.DrivingHome := true;- e) x# Y" q! j
rgManager.tryToStartTransOrder;
% J X+ T/ P* R5 ]1 T( z if @.Destination = void
: T0 b" s- i' ? then -- no transport order for vehicle @, f1 @/ R- ^/ y4 L6 u+ F1 \
@.Destination :=
% I. t$ S, {8 Y; t' E5 z rgManager.nearestFreeStation(@,track.~);" U0 U3 x4 Y) f
newDirection(@); 8 x) Y; S) I) I( y9 d) U3 B- C
if @.Destination /= void then H+ R: r5 k q N J J
@.Destination.NumReservation :=
% Z6 o5 F9 b+ y% s% T5 e @.Destination.NumReservation + 1;
$ o% J- @7 B# M; H! Q7 y( _9 w end;
0 j3 a ^9 J( Y4 B* [; C7 u @.CurrIcon := "drivingHome";" ~6 W" R' j/ N9 s0 _' a5 n
@.DrivingHome := true;) B% X' U1 D7 I8 H9 t% @
end;; ~" [ H7 D" `; [2 E9 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& {: T3 s- L: z q
part := @.transpOrder;
0 X% t8 \9 v& e/ H7 ?3 H2 x part.move(@);-- load part1 e1 }* \( K O/ M# c% Y
@.CurrIcon := "load";& P4 o" Y6 N2 \, j. B9 u
GlobalDistObj := part.globDestination;) Q/ a' K4 F3 z4 P" z1 f( H5 q
assignLObj := rgmanager.rgAssignL;
$ h) Y; F8 l& N/ A7 l8 b' ]- U! E" Z row := assignLObj.getRowNo(GlobalDistObj);- H8 M* o; K4 ?# l6 B$ Y+ Z
if Row = -1 then -- since 70
* K7 q& G( Q" I if lan=1 then
6 t, ~; s9 J# m$ j0 j' |# x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 V9 X5 `1 u3 ? ]# @
to_str("in der Andockstation: \"",?.~.name,"\""));" `3 |9 q A7 Q- F1 J: e/ {$ m0 `; f+ _
else; [5 s7 J# o7 `% _3 o: X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 j6 i$ G5 X: D7 k% [2 b to_str("in docking station: \"",?.~.name,"\"")); . w+ r# o; k* Z3 @0 q5 G
end;; a, R9 f. R. e
else
9 H% A' h' x* j" J- J @.Destination := assignLObj[1,row];9 h2 U6 |5 v, U: E( A
end;
' ~0 H4 @. K+ ~" Y$ A newDirection(@);
1 ], f9 i- B& D7 r; l) y( O @.HasOrder := true;$ j3 b7 t" H9 `
end;4 A: x6 ] L* o& n7 K/ F# I
end;0 E' `! j3 _+ x8 E! X- [
end; -- of the method# u$ L' \% Z% P* C' P b7 M$ l
|