/* called by: entrance ctrl of the object 'track'7 L# U: S M2 z" f0 \
*/* d D; ~6 Q# a0 G: M6 P
is% S, x( l2 \+ j4 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" H- r! Y5 U" r+ [: ~* o( Ldo
, t* ]9 i1 D2 W. t# U* ?$ H7 M Lan := rootfolder.Internal.Tools.AOLlanguage;
# `4 S0 Z1 H6 K/ T' U: ]& O3 O if current = @.Destination -- else return, s! j& S. z( n% _
then. I/ ?; j) Q0 k3 F$ g+ b2 K" w
@.Destination := void;
! `) t ^7 c0 f) }, l if @.occupied then
v8 J0 z5 w( V* ]$ W8 o part := @.cont;8 ^8 t; P; d/ c8 f9 ?& U
@.transpOrder := void;8 Z& a8 Q$ s4 k& W! V( {; S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ I/ z; g/ l( C$ T% Q: k @,root.eventcontroller.simTime);
* b0 A0 e" S& s0 p/ k( H @.HasOrder := false;3 r7 _" B( m& @3 @9 f4 |
@.DrivingHome := true;9 z) }# m/ G, I' Q3 s2 N
rgManager.tryToStartTransOrder;
. g) V: Z7 G3 ] if @.Destination = void1 n% j9 j L" _$ n& L' l8 H
then -- no transport order for vehicle @
1 V. x' T$ Z( x- a' m {6 D @.Destination :=6 S* T4 {5 j$ d6 R5 P9 J
rgManager.nearestFreeStation(@,track.~);
5 `4 ?# G- |. f0 {0 |4 u: s newDirection(@); " b& {* g3 T; O
if @.Destination /= void then
( s5 a q- I" J9 D/ L5 y4 p A3 D @.Destination.NumReservation :=
! S; |% F; l; K% l: u @.Destination.NumReservation + 1;( b1 F! V7 S- |* X* C' W
end;' _5 y5 K3 `* d# ^4 v; n5 m! C
@.CurrIcon := "drivingHome";. |4 F( s3 G( Y, r9 h+ v, b, s s
@.DrivingHome := true;
$ X. H* ~% V0 Y/ ] end;$ G+ w' K- V+ Y2 X3 A5 G7 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 o5 d9 d" l7 M$ V7 K- l
part := @.transpOrder;
( n: ?2 u) X Y4 V! b! l9 F part.move(@);-- load part9 ~2 t+ ^' z. g- d( [* b
@.CurrIcon := "load";
" S2 N; E4 Z. X- S! y0 X, Y GlobalDistObj := part.globDestination;! K4 ~* |) U8 K( J
assignLObj := rgmanager.rgAssignL;
* N5 s8 R; D& R% | row := assignLObj.getRowNo(GlobalDistObj);
# B3 P/ b& l! Y Z$ N5 @ if Row = -1 then -- since 702 L) k/ w0 l6 Y
if lan=1 then5 C2 i1 o4 ~! f+ F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 y1 z( U: z# p" ]
to_str("in der Andockstation: \"",?.~.name,"\""));# C0 f G" x( ^; {
else% z" H) {+ P2 h& W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) D" V& P: @6 T, k to_str("in docking station: \"",?.~.name,"\"")); 3 g, @0 x0 W- x9 }
end;9 V6 Q' @6 ^ q; Z* h1 ?( A
else
0 M+ |6 p( ]. ^7 k& [$ B @.Destination := assignLObj[1,row];$ z) @) P+ s6 U: f5 I
end; : c) X4 H+ }. y I
newDirection(@);
; W' x. b9 M4 ~' Y/ I @.HasOrder := true;6 C; q' ~5 ~" M/ }5 q* ^
end;
6 u/ T, J0 \% N) n end;
* @# b) M! e+ r% I T# Send; -- of the method$ {; J1 c4 c+ r9 z, |
|