/* called by: entrance ctrl of the object 'track'7 ~2 L2 [ I+ r' A0 g) p: v
*/! L9 W# R" u3 ?7 e. V
is# q U/ ~1 Q& q2 [) h* o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 p4 U+ N$ T7 Q% z8 Wdo
- \8 J" n' J( u* |- E Lan := rootfolder.Internal.Tools.AOLlanguage;
0 _3 q$ R! N* J! b) S. p if current = @.Destination -- else return0 N# ^& s- h6 I* c( I; f
then
" B6 N; ^1 @. {& P @.Destination := void;
. `5 }( p0 q3 [7 I4 r, j; h if @.occupied then
/ v2 C# t$ ^+ ~- ` part := @.cont;
& M# U/ h/ o( K! E. Q @.transpOrder := void;
; b: N% R6 p: j# F8 P6 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! U8 X/ \+ w: E$ e
@,root.eventcontroller.simTime);
6 @& e; R P6 [8 o) t$ i9 Y. d @.HasOrder := false;6 ^6 y& B8 `6 F+ C
@.DrivingHome := true;4 J% [9 N' c7 L8 n3 U- m7 g
rgManager.tryToStartTransOrder;
( b \/ Y9 G+ d, `/ P if @.Destination = void
a2 y9 w7 Q# k5 B, b then -- no transport order for vehicle @ w% U1 }/ M7 i8 @1 o! |: Y6 V
@.Destination :=) K# J T) V! u& q; D
rgManager.nearestFreeStation(@,track.~);4 U# V3 C# O, @' _( u. L( k
newDirection(@);
3 w: p4 r" v, c/ a if @.Destination /= void then
* w0 h5 Z5 o- j& M* Q @.Destination.NumReservation :=
8 b% w; w) _) j; z. X @.Destination.NumReservation + 1;- `; W+ Y. s; Q, \
end;
4 f- I. I# O' ~ @.CurrIcon := "drivingHome";
. H( G- G; n& ? X! F0 C @.DrivingHome := true;
! q# c, P- d r end;) }0 }9 X( _/ [& }/ C$ u0 N3 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; U( i3 b, q& D4 Y. o$ C6 b$ I/ M; Q! f
part := @.transpOrder;
0 n- N) W* Y* Y/ j3 P part.move(@);-- load part
! M1 d4 e( Q7 }2 R8 | P @.CurrIcon := "load";0 t( }2 G: b% b
GlobalDistObj := part.globDestination;
2 ~ i5 w7 ^5 a. c- R; t, b7 n assignLObj := rgmanager.rgAssignL;
, E- X$ P( a P: o; O$ T* D9 N# s row := assignLObj.getRowNo(GlobalDistObj);; D' Q% a. l; ~5 D! R
if Row = -1 then -- since 70# V2 {( j" d% U# t7 g' W
if lan=1 then
0 q {* E! ~4 _+ Z( L9 W' p) _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 @$ b9 L( _ j5 S+ q& i8 u to_str("in der Andockstation: \"",?.~.name,"\""));
, y2 q' n9 y) P, u else( U! y) D6 f5 K' F) T6 k" Q6 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* \" ?* i( v/ y6 L [) R
to_str("in docking station: \"",?.~.name,"\"")); ( [! b9 Y. P/ \, V2 U6 N$ s( k
end;" _) V* k% }0 ]4 Z, n
else
) o& A; u) i% ~3 _" f8 N @.Destination := assignLObj[1,row];+ F) C* H4 h5 R3 p& Y, N# z
end;
' Y1 x% t# r1 ? M newDirection(@);
5 I! Q9 d% [2 h @.HasOrder := true;- l" d' r! k( @! R$ [
end;
! [, ?: a6 d+ o/ t6 v" H7 j+ J* ^ end;% n% a4 W. u* H9 f
end; -- of the method
6 T" h) ?! v+ Z) J |