/* called by: entrance ctrl of the object 'track'
5 b* D6 p" \7 z4 H1 X*/
( R( p* Q, V& C( b# dis' y$ Q! t7 y8 A' Q' C* }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( I6 Z2 v5 Z( ?" Z/ r4 |: b
do
* R" p# B" ?3 ]) @1 ]4 [% n Lan := rootfolder.Internal.Tools.AOLlanguage;
! V/ t1 B- e! `1 _- L8 H if current = @.Destination -- else return3 G3 N$ n" m9 d0 @
then
2 k g. R. A0 f( R9 D @.Destination := void;
2 k0 I4 i1 l5 @' y% I W# ?8 g if @.occupied then
; ?3 c& K/ m4 P: n3 m part := @.cont;. ]# W! P- v+ r+ z
@.transpOrder := void;5 }1 f+ ~1 _! |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# u! V8 _# ^+ x5 Y @,root.eventcontroller.simTime);' O3 }4 g: [% V) \: n% d0 e6 }# \
@.HasOrder := false;
" E# N4 g3 \, z) [" R+ Z @.DrivingHome := true;& m. t& i3 l' u8 B- m
rgManager.tryToStartTransOrder;+ `! F& S. w" s s' Z O
if @.Destination = void5 Q; N( s6 P/ l/ Q& S6 H
then -- no transport order for vehicle @ \, q) ~3 V+ C4 c" y
@.Destination :=
) p4 @) w- q1 J2 v rgManager.nearestFreeStation(@,track.~);- G& v6 I% u$ o a6 Q
newDirection(@);
! B# u% i; s( y4 q/ C w if @.Destination /= void then
& }0 v" Z0 Y$ \2 P @.Destination.NumReservation :=/ p0 f X( }" | @# n9 @( v5 V) N
@.Destination.NumReservation + 1;
; }3 G8 j u T( ] end;4 _$ |% V1 J5 u- _* |
@.CurrIcon := "drivingHome";- E) A$ x% t9 n3 S; g% v. P
@.DrivingHome := true;
; y" r* J1 \( q* l; \; m. C end;
+ P; t% n# b# Y/ v: k4 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- y6 a! ~, \) M7 E part := @.transpOrder;
- k* B$ Q9 \0 g; K! V part.move(@);-- load part. W. s! K8 {' w% [ }# w
@.CurrIcon := "load";
* j) M5 H' O' i6 g- q5 `1 M GlobalDistObj := part.globDestination;5 j6 W1 I0 Q1 f7 M: x' J& T: J/ U
assignLObj := rgmanager.rgAssignL;! k# T; L2 O: H9 i- P% {1 G
row := assignLObj.getRowNo(GlobalDistObj);
* w- E+ x% J9 H3 q9 R if Row = -1 then -- since 70
' w* H$ d) e# {6 q2 } if lan=1 then( q$ K0 N6 I. f2 ~: w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 D2 ~( p5 x3 v1 H, h/ s1 K/ d7 Z
to_str("in der Andockstation: \"",?.~.name,"\""));/ b# D& Y! _+ C" V3 W* d! Q
else0 U, o( }3 V m; K# q* q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 J3 O5 v" K- L# ?. U/ E to_str("in docking station: \"",?.~.name,"\"")); 3 f1 e( B M& A$ K! J6 Y; Q8 l
end;
. z- O7 |' z) j+ m- h: m, s/ Q else
! r/ {1 D+ l/ T" x' ` @.Destination := assignLObj[1,row];/ |0 U! B; d: Z
end;
3 a1 ]2 H! |& U3 x; d newDirection(@);& ` E7 F/ t, X( Y9 @6 V$ M0 F, Z
@.HasOrder := true;
5 S( z4 g6 S b! F2 D end;
; K1 |2 V% S7 D end; q- W6 O7 V1 V: \; a' I$ U
end; -- of the method: p Z u" p5 B, v# Q2 a
|