/* called by: entrance ctrl of the object 'track'
& w3 ]+ y/ |* J0 d( w! U; |*/: q( Y1 Y! g& ^5 Y3 e
is$ C. F n" j# M# b3 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ _; ]' k- V. F% N6 }do
- G* e; C/ R8 {4 f9 m0 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
$ u+ O# k+ S9 ^9 z/ o/ p" c# Y if current = @.Destination -- else return
3 v3 ]6 C% c: U3 m5 G( v7 I- f then3 s5 ?* z, |% @
@.Destination := void;
9 R5 |& S- b; c7 X: w( R if @.occupied then+ \+ S5 y" f8 ]! C# x
part := @.cont;3 U" x; R% J( P) y
@.transpOrder := void;
( ]* W. N ^$ N+ M9 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% ^3 Q! [* N- e1 @/ V @,root.eventcontroller.simTime);. L. |0 Q% A: l4 I# k+ F# C2 }8 E
@.HasOrder := false;
1 k* o! F: p3 J9 M1 u' A. O @.DrivingHome := true;
8 \: V6 v y5 z0 G! L# C* E8 [ rgManager.tryToStartTransOrder;2 E' \* e" X- [+ L. S& B
if @.Destination = void' I; F' g! d1 W5 F
then -- no transport order for vehicle @8 ^* d$ X' R7 a7 @
@.Destination :=
" v% a. }3 L& T- O8 s rgManager.nearestFreeStation(@,track.~);
3 Q) W* c" [3 K# g% S3 z newDirection(@); & {1 D# j) p! _/ i3 L5 _# |
if @.Destination /= void then8 B# q: T( J# y+ n, p+ M* B M
@.Destination.NumReservation :=( C' A2 [; `; D6 E
@.Destination.NumReservation + 1;: |+ T3 ]; P7 k. H
end;
6 g8 ^- Z/ e. Z; d! K7 }$ E4 P @.CurrIcon := "drivingHome";
% L) \4 W* g, G$ f @.DrivingHome := true;" B# p) S2 _! H* s+ t9 d* }7 K
end;
0 \& H' N8 @* ^- d else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Y2 U- u4 J# T4 E3 O' B
part := @.transpOrder;
# R3 r* k0 R, f3 c' F& Y/ f X! j part.move(@);-- load part1 [1 P( M: _: {1 o- r7 e; J$ [5 F
@.CurrIcon := "load";
2 t0 d: V" `8 P* L6 b2 e( I; N) N5 I GlobalDistObj := part.globDestination;
+ T$ G" U) {% W) k& L assignLObj := rgmanager.rgAssignL;/ U$ C7 z9 U- D9 x6 s) D
row := assignLObj.getRowNo(GlobalDistObj);' A0 j+ Q1 }# t7 g G1 [% k8 h" h
if Row = -1 then -- since 704 e3 a( k8 L$ V- k) f: K7 @
if lan=1 then: w8 N, b+ Y' Y9 ~* d! U0 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& a5 M- Y! R* M4 B
to_str("in der Andockstation: \"",?.~.name,"\""));% c/ L" j) a5 U+ c# B! J
else
% F! B1 \5 b- {% \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# c! H ]" W1 H1 a
to_str("in docking station: \"",?.~.name,"\"")); # ~; X+ _: m% o% Q7 S' j
end;' `0 |( z' F2 `2 B! l, G9 C
else
4 X) s2 x; T) g# V: `( c @.Destination := assignLObj[1,row];
z6 I b& p# h/ D9 q end; 5 a/ o! H3 ?6 s/ `) Q& \
newDirection(@);( [- a2 Y# b, o( _# ?
@.HasOrder := true;, t% v* s2 O$ g. v. S
end;
% P" R* x* t: A, E: [ end;
! z: C5 v8 f9 f6 }9 E+ r& send; -- of the method& C; r0 g0 B$ \* H0 v4 n( q$ n
|