/* called by: entrance ctrl of the object 'track'/ j- C9 _7 V" ]5 ^7 }
*/
7 g3 `3 b! p7 ?+ wis
4 m: Z8 @7 w& E1 J7 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;) i) r( G0 Z+ J: ]+ h
do
- O( {- e; w" c, b Lan := rootfolder.Internal.Tools.AOLlanguage;
" {9 Z0 q- w+ w4 M if current = @.Destination -- else return9 X! i( h4 }& j" [9 m0 ]3 S) t8 g
then
! i' B! M/ I' O4 T @.Destination := void;
9 f3 i3 ^& `; O7 H! O$ V8 c( I2 q if @.occupied then
. X+ @9 B0 D" }, ^) M- F, C$ j part := @.cont;# ] Z3 c6 Z( _! N& g
@.transpOrder := void;
8 m" J4 ]: z- A# ?, K3 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 p0 U' }- Q2 r% L p/ n2 [0 i& @ @,root.eventcontroller.simTime);3 H7 I8 Y6 Q% Z
@.HasOrder := false;) O4 e# O% y& c5 R, ~
@.DrivingHome := true;
' j$ a+ _& N. e1 x5 K rgManager.tryToStartTransOrder;
/ C+ e) x% S" N( L0 N& T: t if @.Destination = void
0 S; `' Q P1 Y) o then -- no transport order for vehicle @
y9 i' Z3 u% `, e @.Destination :=9 K+ e' P: n3 \2 }2 D
rgManager.nearestFreeStation(@,track.~);' B- M: t- y! S* o/ I0 o `
newDirection(@);
) f+ v5 v6 t( ~4 b if @.Destination /= void then
, r6 g( S A( v' C @.Destination.NumReservation :=
: e% F/ q7 D+ v @.Destination.NumReservation + 1;
9 E! b! T9 x* F5 N* C end;4 a# o- g6 P: R' f7 c4 H* ?. }
@.CurrIcon := "drivingHome";
" ?+ M1 U1 T% a: ]# C @.DrivingHome := true;( M3 H! a5 d3 H3 C
end;8 ~, u% r& F5 U& u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station z8 i' O. \0 {. E
part := @.transpOrder;& }" ?2 M2 H5 e% B0 \7 X
part.move(@);-- load part
+ [' `! Y& h) h. I5 u5 v @.CurrIcon := "load";" t; l, W# |; C" T; [
GlobalDistObj := part.globDestination;. V' p. H; F, G1 i1 W
assignLObj := rgmanager.rgAssignL;+ x# I X: \3 b) }
row := assignLObj.getRowNo(GlobalDistObj);
C* C2 q1 l, b3 G6 y( n% E if Row = -1 then -- since 70( R) {7 t9 O; q. D+ h, @
if lan=1 then3 Z r6 W# n' ~+ M& b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 N6 X! M3 p0 O
to_str("in der Andockstation: \"",?.~.name,"\""));3 [/ s& y6 D2 C0 J+ K
else
' N/ G+ W, P$ ~( u( B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: T3 V1 m0 d. Z T- J) D3 M
to_str("in docking station: \"",?.~.name,"\"")); 4 O" v, M( b( ?# {7 v, x' L$ K
end;7 K+ B9 S, a9 _: t
else8 @: `" p8 X3 o: L- k
@.Destination := assignLObj[1,row];
' v# X* C6 Q! d" }3 I& |; J end; - t* \% W5 T$ Y' h8 L
newDirection(@);
2 w9 h" s U5 e1 ]5 ]4 U4 q/ v# ? @.HasOrder := true;1 D4 v) t9 l9 t z
end;3 L, a9 C9 _4 |4 `
end;0 e5 K$ z8 C( ?! I3 S" |/ e
end; -- of the method! R" n+ |9 ]2 e' ]/ T; q
|