/* called by: entrance ctrl of the object 'track'/ D+ L, m+ e! T% i( T: A
*/3 D6 g! P8 \, _2 D& _% L9 y$ D' |
is1 k5 u, V9 p/ k1 @% n) Z1 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! m5 l0 Y" o. ]4 u5 O- Q
do
+ X( I6 Q Z U7 I0 v Lan := rootfolder.Internal.Tools.AOLlanguage;
9 T0 w( J- q+ Z. V* | if current = @.Destination -- else return
, O+ V u q* s" k {/ { then* @8 r6 X) P$ }4 f m+ _* m/ v" n
@.Destination := void;; C0 N9 d4 {( ^8 [ R d, z3 p5 t
if @.occupied then
8 Z4 b( S7 s, a0 i( z part := @.cont;
k4 Z5 ?+ t6 F @.transpOrder := void;- r5 `' B! `; T$ }( H7 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; E; J, |! `( B3 w
@,root.eventcontroller.simTime);7 k* f1 W) `, F& Z6 i6 _! d9 c
@.HasOrder := false;- m3 r" p" |3 _
@.DrivingHome := true;8 O2 @, P! i$ }( ~* `2 d
rgManager.tryToStartTransOrder;
$ E- f; q% Q+ |* J if @.Destination = void% o0 U/ m# i/ N! B, x Q& _( o
then -- no transport order for vehicle @. X( X$ R6 k; ` p/ R5 r
@.Destination :=
]1 f! E( B, F+ G5 f2 P( X& c8 l" A rgManager.nearestFreeStation(@,track.~);% K, T" H$ z! z
newDirection(@);
" @$ [7 T8 D$ y5 k) ~. j if @.Destination /= void then* l5 C8 D% h* u6 g' U4 Z
@.Destination.NumReservation :=/ S8 s, H. X3 E
@.Destination.NumReservation + 1;
, N& U% _5 z& `6 ` end;8 |) v$ l+ M( g
@.CurrIcon := "drivingHome";* D, s1 j$ @/ h7 _
@.DrivingHome := true;7 l7 g0 j1 P* C9 M/ U5 q
end;
9 B( v- ?' ~1 K- T7 X" a0 H" q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- s+ [/ U% @+ H) v part := @.transpOrder;
) X7 E9 E0 T" R8 q" A3 ` part.move(@);-- load part
6 Y6 W, k8 G: P! m @.CurrIcon := "load";4 _9 A% I" d6 x8 M& ]8 J
GlobalDistObj := part.globDestination;
' U# g, _# X: a assignLObj := rgmanager.rgAssignL;
" v4 ~# a# [( m* _ row := assignLObj.getRowNo(GlobalDistObj);# ~: J, |2 `3 S2 o
if Row = -1 then -- since 70% _ J1 h0 ^# \# @% C0 Q
if lan=1 then
3 J& K& t/ h6 {/ ]! ^4 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 T5 o- X( C: n1 q to_str("in der Andockstation: \"",?.~.name,"\""));
- P5 X- W8 T3 q% | else
4 ]/ P+ q" i9 j, L$ G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& N3 V$ l2 ?1 R- S) D# h# y* {
to_str("in docking station: \"",?.~.name,"\""));
# T M+ ]$ D% I8 u end;
( q% u0 S% E: I8 j* c9 j& H else
. ^7 l: @; T: ^& F4 P; y8 \+ S @.Destination := assignLObj[1,row];/ j! ^4 M3 L9 J5 y+ t
end; ; m) T1 _% {% i6 c7 \7 b
newDirection(@);' u3 ?- ]( ?) l( g2 o; ^6 Y
@.HasOrder := true;' S) _8 W& h+ `8 c. P% q
end;
" H O1 j4 K- T9 Y end;
! y" O d$ G& j% g( r. D# b+ ]end; -- of the method
* G7 r" t6 K5 N" y6 E0 v! c& I* z |