/* called by: entrance ctrl of the object 'track'
$ Z t* ]( }4 {8 Z. h*/
* W3 Q$ F- U9 [0 |0 Bis
- A# j% L( W4 Y: W+ G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( f* S3 \1 s! n; X* L, y, kdo4 I8 B% L- W; S: |; ~
Lan := rootfolder.Internal.Tools.AOLlanguage;+ A! U* ?% O. F
if current = @.Destination -- else return
* J% Z I2 s [* N& [" \& f' M* m then4 j& l v0 i& h1 R# a( y. s
@.Destination := void;5 V- ]8 x' k5 \4 F
if @.occupied then
0 I6 m. `) G _6 f: ^0 N: v% |9 W part := @.cont;2 f% f" z& A9 Y8 i/ k7 k( g1 z
@.transpOrder := void;) W0 `, W, v3 @, ?' C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: `. ?( z& x7 E) ?! u @,root.eventcontroller.simTime);
8 I0 r# f7 T: k& ^) j2 b @.HasOrder := false;8 b* M4 C I8 x
@.DrivingHome := true;
, B% l. O8 s; _3 B1 y& ^ rgManager.tryToStartTransOrder;- u+ C. c2 n: }/ t$ k# Y1 g
if @.Destination = void
$ ^: R1 a# z- V- ^8 D then -- no transport order for vehicle @+ F" I& q: J9 T1 w
@.Destination :=
$ T: V. W2 E# v; x% G6 e rgManager.nearestFreeStation(@,track.~);( {3 y7 y# I; l
newDirection(@);
2 _) m5 Z- `0 _0 C. w if @.Destination /= void then
, L; l2 j8 E8 [* {" e3 p @.Destination.NumReservation :=
" F2 k5 B) T3 I2 K7 L @.Destination.NumReservation + 1;
% p) u4 B0 C, i! O4 w end;: k4 A' N- M* @1 B
@.CurrIcon := "drivingHome";7 q1 P" o- X: s/ b
@.DrivingHome := true;: W) k0 D) v" J. G8 \- w
end;
4 m: P" \, J9 ?0 U* I, a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. x( N+ ?* R8 ] part := @.transpOrder;
, }; G0 O7 w2 H, m/ i( K9 O5 m6 X1 } part.move(@);-- load part
, ?4 I. o# j7 ^# E @.CurrIcon := "load";
0 X' O' B- T- e% u9 g+ q3 k GlobalDistObj := part.globDestination;
2 \1 p7 K, W8 J: t assignLObj := rgmanager.rgAssignL;* R( u( Y ?5 ?' s9 B
row := assignLObj.getRowNo(GlobalDistObj);
2 Q9 k8 P$ n& q7 g# e: L if Row = -1 then -- since 70
0 D3 V6 I9 O8 K x3 {9 F H5 Z3 o if lan=1 then
4 o+ t& V/ E) z% s1 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" x- Q2 T) p) |" d to_str("in der Andockstation: \"",?.~.name,"\""));
; H9 O `; k: n8 [# O( j0 X: I else
7 I0 |4 t" a3 P. y7 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q U& C6 y7 F, E. M* A( m% D# i to_str("in docking station: \"",?.~.name,"\""));
3 q1 Z8 M y: Q8 s5 v end;9 j1 O6 ~7 Q9 m
else
* n0 i/ Q% c, { @.Destination := assignLObj[1,row];
% W# t# K0 Q3 ]5 s- T( _' v9 s end;
! U- ?* v# X6 v3 Q% g# m- m newDirection(@);
/ _! J% [0 E7 P7 V. j2 t( ` @.HasOrder := true;7 o0 S1 y O8 s, _' g
end;- c3 @3 I* H4 f; F4 i6 J( A
end;
8 e; y$ Q0 |. v- b) v8 j" o# Hend; -- of the method- X7 b+ b8 K# ^% m
|