/* called by: entrance ctrl of the object 'track'. I E1 R/ p1 N$ J2 s
*/
2 g# ^+ E0 } ]. F5 qis; E* F$ l9 o/ _+ X% y- o. @* L, f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- V9 o" ^9 W8 D1 p5 y- H+ T7 Ndo
5 i1 ?* u. H6 ~" l Lan := rootfolder.Internal.Tools.AOLlanguage;! p; M1 a5 n% g; A7 Q
if current = @.Destination -- else return
# r$ X3 K" u- G7 k7 w9 S2 R then
% W, j0 }, B' {( h; z5 j L/ s5 f& [ @.Destination := void;
% _" A; ~ s% n& H: K7 m$ m9 } if @.occupied then
' I, s" y m9 f! D. W/ k- B$ C part := @.cont;* @1 s- B: w3 _
@.transpOrder := void;% E( r; v5 L0 r4 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- r5 t, \& f& ~8 V, l+ J @,root.eventcontroller.simTime);
6 [5 b* \) k( M. A9 d @.HasOrder := false;
: v1 a% p( U' F" s8 }; ?- B0 u @.DrivingHome := true;1 q. x( V' Z4 n( Y! P# F
rgManager.tryToStartTransOrder;3 g6 E& p' g, {8 p7 J7 h
if @.Destination = void# @. \8 F- h: y/ `, g% H7 Y
then -- no transport order for vehicle @) {% s* f. l5 r1 D1 r8 ]& A
@.Destination :=
: N' Q0 v% Y" } rgManager.nearestFreeStation(@,track.~);8 R4 L( ?& g, ^, P
newDirection(@); ! v+ r5 C2 ]; O4 ^+ Z+ e/ P8 d
if @.Destination /= void then
, E2 p B' L8 n! p- V4 K @.Destination.NumReservation :=
/ ~( W4 S s8 W' r @.Destination.NumReservation + 1;! z8 _2 x" D* m: ?/ R2 Z! b$ E J
end;
) L) `; Z9 E1 _7 V& F @.CurrIcon := "drivingHome";0 H4 ]! K, P8 R: |" ~9 ^# L
@.DrivingHome := true;
( g4 w" E3 f! b end;
' \% O6 g6 e) W! r0 D6 E/ D' { else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 M1 l& w& O3 P \' b2 r1 p( H
part := @.transpOrder;
$ G4 o1 C6 \9 a4 A6 q X4 H6 N part.move(@);-- load part3 ^2 o/ Y' @* |' M& [) c
@.CurrIcon := "load";
) k0 D8 ^0 h( C# E) p( b; n GlobalDistObj := part.globDestination;
5 R: O2 ]$ {, V3 r) E7 t9 i assignLObj := rgmanager.rgAssignL;) h8 D" X" _) n' R% J
row := assignLObj.getRowNo(GlobalDistObj);' n" O* c* X c, N
if Row = -1 then -- since 70
* R/ Y4 ~: V( _& z c' H0 X if lan=1 then/ m# N; T" i! g- k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; p' Z7 d* f2 q* o
to_str("in der Andockstation: \"",?.~.name,"\""));% C- I3 I, @6 a/ g% x2 C& Z
else
# @2 W9 B* U9 ^; k6 O& F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ m0 ]7 A5 t7 W" J1 L to_str("in docking station: \"",?.~.name,"\"")); " d5 @ ?- x2 H: E6 Q4 `6 f
end;- y2 |- i. z' B
else
0 b! ?9 F: b; P5 t2 L0 _- C @.Destination := assignLObj[1,row];) ^9 z, ?* n* i3 `0 X
end;
0 t7 o% ?/ D* `5 H* i$ D# L( v& l% A newDirection(@);! x# j p/ E, Z: T2 O
@.HasOrder := true;/ [" `# _" m& L+ @1 Y
end;: q9 r( o7 _1 X/ u+ P
end;' A; g2 G- I# e8 R9 S
end; -- of the method& a- v W4 E9 N6 A/ N' e% Q' e
|