/* called by: entrance ctrl of the object 'track'
! r6 V6 z! E3 f$ {*// e3 L9 f% B2 j: F
is2 Q* b }+ j! } d5 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% G5 G& a; A8 O# sdo
! k# _( N% A" H9 |3 d Lan := rootfolder.Internal.Tools.AOLlanguage;
w \7 J9 }( s if current = @.Destination -- else return' T( ]; J! v8 t1 x
then
2 \/ P6 H8 c. Y- K c4 A# U) W @.Destination := void;$ G9 y( r/ m7 Q6 h8 s
if @.occupied then$ A$ H1 ?: [& F9 T
part := @.cont;+ }* o0 r; k( t# P: J; b
@.transpOrder := void;5 g! K" X4 l- ?- v* V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ a' J7 \6 l/ F r' Y, f. J @,root.eventcontroller.simTime);* C9 Y- l( |+ b# s3 X
@.HasOrder := false;
* c. U; e% o3 M6 l8 Z. c @.DrivingHome := true;
' d6 J& D' y4 F, R: c: Z( R4 [ rgManager.tryToStartTransOrder;! h4 G8 z. k) P$ v8 y2 ~& o
if @.Destination = void+ R' L o' y6 x7 j
then -- no transport order for vehicle @2 z2 U: m5 w. l3 n! p
@.Destination :=
- K5 v: |! D/ Q2 d) V rgManager.nearestFreeStation(@,track.~);
* z: a; _; Q1 v8 A newDirection(@); + _2 q7 y6 V: l
if @.Destination /= void then
0 c9 S* S( N" a; a @.Destination.NumReservation :=/ ~2 i1 Z s7 H2 T+ r
@.Destination.NumReservation + 1;. A; S( ?5 ~% W8 ?1 I' q/ |
end;
0 \/ J# ^; k% G) C$ \ @.CurrIcon := "drivingHome";
. \1 p7 A: S0 i @.DrivingHome := true;
4 M1 k, B# R8 f5 }+ \) y2 n/ {7 r end;
" H8 J2 p% I* O( A/ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( I: e! \4 c! L% \9 V( h part := @.transpOrder;
. ~+ S' h- I6 ]6 s% y part.move(@);-- load part
2 c3 B9 m( w# d& J0 a8 U8 u( X @.CurrIcon := "load";! L2 }. `1 b) V3 ~! M( ]
GlobalDistObj := part.globDestination; F. i) J2 h* U/ }: z. N4 @
assignLObj := rgmanager.rgAssignL;
; {' s, p7 h* {5 V8 W row := assignLObj.getRowNo(GlobalDistObj);
) N I7 S! @$ Y# N0 v if Row = -1 then -- since 70
5 m" l Z. m' i3 F8 R if lan=1 then
! V( i. g' g8 O5 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 Y2 r9 `8 T+ @ to_str("in der Andockstation: \"",?.~.name,"\""));5 Q5 R: _3 F, l& G
else
/ _# z9 f3 |+ \* ^" k: { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 U8 V; s" a/ k' l" y& ^2 |
to_str("in docking station: \"",?.~.name,"\""));
/ D% V6 V' T) E' X a+ B end;
7 Y1 L4 D; l' H else4 W0 w% j- N( \, M3 J! c
@.Destination := assignLObj[1,row];
6 B+ h. M2 `8 E; ] P end; 6 C8 U+ f# [& p/ r8 {4 w M% \' @4 p
newDirection(@);
1 o; C! d1 p# g: m% ]: T @.HasOrder := true;
0 D1 a$ H' d9 p end;6 U* T3 P7 G% O; d$ ^ d
end;3 A/ T3 O2 w1 y2 |. x f! i K; ]
end; -- of the method( n/ {" K& t5 u2 W1 o4 n& X
|