/* called by: entrance ctrl of the object 'track'
, k+ w4 u' ?8 K" ^. H. T4 z: G*/
8 J% j( Z5 i! }9 ?6 Sis
3 T7 H' P5 r. |7 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# F& \( e4 n( N) \" H/ Hdo
& a6 L: i w6 ?8 ~: h# E Lan := rootfolder.Internal.Tools.AOLlanguage;" b1 b7 g' k" e/ [# U) U# b, G) d
if current = @.Destination -- else return
8 O6 @" i8 U) I then; g& X j! z- N0 \& Z$ R8 @
@.Destination := void;
, t+ P! p A8 ]* u7 l if @.occupied then( }5 L- C3 Y- d5 F$ r) P) N9 e
part := @.cont;
$ L" |$ x/ K7 W$ S) h/ Y; q3 L0 o1 \ @.transpOrder := void;
4 A# |: U# n' @: f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% G4 B. @ T4 c" l# r8 H* o2 @ @,root.eventcontroller.simTime);
a$ C. B' c3 t/ \$ v1 j! _5 W @.HasOrder := false;
+ c+ t& [' v' O6 I) N+ v1 E7 { @.DrivingHome := true;: f: g8 G% D! m1 R* C, G2 r, H
rgManager.tryToStartTransOrder;
2 [5 d( u m+ a" [ if @.Destination = void! Y k; @! ~( a3 Y+ m
then -- no transport order for vehicle @1 h+ h: [" F9 h8 H/ x% Y$ @
@.Destination :=
5 z' c- H e' Y" ?' b+ s8 [' ] rgManager.nearestFreeStation(@,track.~);
8 U0 F/ A: u6 m/ G6 @ newDirection(@);
3 y" v- a2 _% L; j& r if @.Destination /= void then, }/ S0 Y6 }3 S6 C) o9 v) W" u, J
@.Destination.NumReservation :=
5 E, i' T3 c8 x1 [0 V0 x @.Destination.NumReservation + 1;
. o. o0 p" g( F9 b end;* f o/ o1 J; r% ~
@.CurrIcon := "drivingHome";4 y. J/ [5 X, k* q0 Q( i: Z
@.DrivingHome := true;
$ S) U8 a$ M3 j9 O; ?( D9 h6 T" D. i end;
' t; H* \: W: @) A7 L& P4 ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station( N" t0 I! p( l |
part := @.transpOrder;
! o* T3 q0 i( q& ^3 ` part.move(@);-- load part
8 O) f3 `& I0 m C8 h @.CurrIcon := "load";
3 J0 h, d2 G* Z. f9 w4 R GlobalDistObj := part.globDestination;% A; u! g9 O+ P d2 s: W
assignLObj := rgmanager.rgAssignL;- a! k, j [ ?
row := assignLObj.getRowNo(GlobalDistObj);
: V% \9 }4 w- X1 k if Row = -1 then -- since 701 a3 \; e# P. j6 Z
if lan=1 then
; u3 c- j' D2 J4 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( D6 x5 I# s9 ~9 f- f' I to_str("in der Andockstation: \"",?.~.name,"\"")); e+ |( t" M/ \2 _. Y
else6 p$ @# O' |/ W0 _" i' Z8 R0 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 h+ l w3 n6 ~5 {! J4 B
to_str("in docking station: \"",?.~.name,"\"")); + P K" s* J' R% _& L
end;$ M) l9 E+ E6 _$ F
else& O; W2 n5 ~5 c2 B" n& M
@.Destination := assignLObj[1,row];( h a% U) E, x* n# k3 p
end;
% k2 X F% s/ m, T% } ^6 ~+ F newDirection(@);+ u. I/ m7 T+ r. t
@.HasOrder := true;
& I+ U6 Y7 G: I" |7 ]( Y end;
# Z, z r0 Z5 D end;) l( L2 n: @7 s' ^( G l
end; -- of the method6 u! L) s: A$ P( a x
|