/* called by: entrance ctrl of the object 'track'
/ B: l4 C1 H% G0 i, X*/
4 c' V! S. ~& d7 Jis
5 c) v6 s; y4 m, m' e5 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% Q2 D! m" y( j/ Y: v gdo: F3 x, m& \: Q8 a- a+ \
Lan := rootfolder.Internal.Tools.AOLlanguage;
" G) }. u! H0 i2 f6 e( p. {2 L9 _: |$ i if current = @.Destination -- else return
; K5 n( u4 ^/ w2 Y& a+ X then
1 G4 _# L8 Y2 W. x- [ @.Destination := void;
4 g: C9 A2 b& T% r' ^% g3 \) s$ u if @.occupied then
% U7 ]( H- l) _5 T a4 A part := @.cont;
7 m9 O$ `6 T' N- o. ` A# X @.transpOrder := void;1 u c' w& W2 s/ Y+ |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," _3 c1 G4 \. @4 l9 \* C- O8 R
@,root.eventcontroller.simTime);
4 U; d9 Z4 v6 O @.HasOrder := false;
% o+ T( k# B( b7 [, L" M) B4 u @.DrivingHome := true;
& S! A* h O; E0 [ rgManager.tryToStartTransOrder;
6 N* B# U! l y" O( n2 C if @.Destination = void" k r+ l7 A3 b
then -- no transport order for vehicle @8 H4 l) Z3 A! h* |: u
@.Destination :=
" ], C! h& @3 ?/ t, R; r rgManager.nearestFreeStation(@,track.~);
2 t( G/ o7 p' P! k6 {7 k newDirection(@);
6 y e0 V, S2 o8 u' d if @.Destination /= void then
+ Q7 E {# P4 C* s @.Destination.NumReservation :=+ B. f8 D. Q$ }8 B% N
@.Destination.NumReservation + 1;
p( K( y% ]2 l) A/ N% q7 q end;
! I1 v" `% @5 i$ ^0 \ @.CurrIcon := "drivingHome";0 l9 u& Z( v( A
@.DrivingHome := true;
& {3 I* x+ z6 p% q4 T end;
) P5 l7 W5 u6 f) N- V% x& ~: o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; J0 S9 Q+ L& S3 ~6 B: S part := @.transpOrder;7 B: n- r! h: D/ U+ E7 f4 z. U
part.move(@);-- load part8 i; @! A) P, G; Q# c
@.CurrIcon := "load";/ j7 x( L) P' E5 w4 i7 w
GlobalDistObj := part.globDestination;
7 i/ y: G; X$ ~% e4 h- a, P9 ~ assignLObj := rgmanager.rgAssignL;4 [3 h" f/ c! i' u# {
row := assignLObj.getRowNo(GlobalDistObj);
- w2 I6 c" b6 m3 m if Row = -1 then -- since 70
1 f2 m" U1 S6 l0 V% E if lan=1 then6 }) Z% ?4 W" n+ _* P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- P6 R+ k/ \4 D3 D6 t6 x
to_str("in der Andockstation: \"",?.~.name,"\""));% s. T- i1 F2 k, G* s' H
else
4 T8 I# G3 L9 e$ p ? K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" v9 r k% k4 C6 y to_str("in docking station: \"",?.~.name,"\"")); : b9 k5 {; ~1 ~3 b: X
end;" h5 z% e% c8 w7 ^0 R
else
; p. Q6 @( F0 c% r @.Destination := assignLObj[1,row];
: y% R% O% O9 s. j0 J1 q/ \ end; 4 F4 Y: h# }3 T2 E7 ]
newDirection(@);' n$ z/ \0 v. s& m! O
@.HasOrder := true;
; _ f2 x& x6 m* `+ X end;
' _* e- E0 r8 f( K end;
# ]; m$ F" J" s( T8 Y# c: {end; -- of the method% ^. f# P2 `8 ?! A
|