/* called by: entrance ctrl of the object 'track'
4 |( N! k! _* e+ E! m8 X6 Y*/
' D# L2 F5 R6 M c: K/ S+ ?is
& G/ D& {9 o2 p2 G, D- u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 H' _5 l4 u+ S7 ]/ d! E5 x; D: `do
# M3 c' y+ s3 { Lan := rootfolder.Internal.Tools.AOLlanguage;6 j; @: o- Z2 n( B6 M* L& }% K
if current = @.Destination -- else return
4 l: l0 L* `7 T* c/ { then
; l ^; q; P3 H+ ^8 A% U @.Destination := void;! u/ y$ g3 ^; b' l/ @
if @.occupied then
3 h+ M2 Q) s0 n$ F) E part := @.cont;) t- [) l6 j0 \# k- [+ N
@.transpOrder := void;
: {. H |# p) A m" X; J* }( E( } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 B5 j% m1 x9 }# v ]9 u O% { @,root.eventcontroller.simTime);
) J& E% V8 Z- `) r) k) r @.HasOrder := false;
, p3 \; [' D T" t3 ~. p4 Q @.DrivingHome := true;' [( e* V( u$ Z" v0 ^% J; d
rgManager.tryToStartTransOrder;5 @: w9 C0 ^. I. P. b$ F7 j
if @.Destination = void
8 d: w2 ?# I/ I9 s/ L then -- no transport order for vehicle @
2 K% G4 H* y# U6 g* V7 }# o" Y @.Destination :=5 N: J5 |/ n8 A. N' A1 o' H5 V2 b
rgManager.nearestFreeStation(@,track.~);
4 g: ~: V9 ?: V/ c" O. b newDirection(@); 7 a* [5 I9 t% e! R: J9 k
if @.Destination /= void then0 z& X/ N, l2 J7 j6 z( G
@.Destination.NumReservation :=4 y) t, i4 E3 w+ l' u* e
@.Destination.NumReservation + 1;
. o# O. ?7 D- ~6 E1 T end;' o$ B5 e) A' Z( U, d
@.CurrIcon := "drivingHome"; t# y9 l9 N2 S. Q( c' j
@.DrivingHome := true;
% e) H( k8 ~( G) a l9 H5 U end;
7 p* |; [7 T/ u4 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 E }6 o6 Y' F/ T6 z8 `
part := @.transpOrder;
8 n# s! z) C5 D4 P* s' y& S% t part.move(@);-- load part
$ R+ x; B+ F w1 ? @.CurrIcon := "load";$ K4 Y8 }/ {% y' Q: Q
GlobalDistObj := part.globDestination;
9 f5 L! n' e# B6 b assignLObj := rgmanager.rgAssignL;
2 z, ?$ p# Z6 m% ~) P: s row := assignLObj.getRowNo(GlobalDistObj);
: g5 |% L8 ~ O% q; p4 } if Row = -1 then -- since 707 N* t" c% j: t
if lan=1 then
* t/ h( J, D' `0 H; t* S: J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 N6 X; o$ _ `, m; ^6 e, v: X to_str("in der Andockstation: \"",?.~.name,"\""));
4 K7 @8 j; F9 ?/ c3 [ else6 [2 M1 A3 y( p/ r$ e' y/ l/ L k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Z/ \5 [. X( G+ O, s! B* M* u
to_str("in docking station: \"",?.~.name,"\"")); & D" R3 I5 K, Y( f1 X/ g
end;
! B- ?/ X: t( }3 B: N) E/ s' W" } else
8 S" ?9 L6 p3 f) L" L8 W: | @.Destination := assignLObj[1,row];
$ D9 y. @2 T: B; p2 i6 I end;
6 S6 y- t% e9 r! h' x% K newDirection(@);) [( T( ?! K0 N1 G, R
@.HasOrder := true;
" J% l2 ~7 R' \) ?2 O end;& f2 }3 i, {% H( M) @! f0 n
end;- X/ R# i V$ R
end; -- of the method2 B( ]( ?) W. k$ A/ k' a- o/ `
|