/* called by: entrance ctrl of the object 'track'& H# ^/ ^' V# v3 N4 E
*/! q) ]7 C2 E& ]/ F8 d8 i
is) v, p8 |* ?' D' v9 N7 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ _; m8 f1 O& E. A$ @, h5 Z
do: _% q' B: G9 q! p5 Z: I4 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 Y/ l3 H0 y X+ q1 m if current = @.Destination -- else return
* _3 q8 D6 ]" W5 { then9 M3 V; |# }9 x: L$ V
@.Destination := void;+ J M( ?" c A2 c$ q; [, a2 {. z4 G
if @.occupied then% a. y8 g/ v+ }- @# m K! D- \
part := @.cont;1 [8 f. }5 p+ ]" K4 K$ S9 i
@.transpOrder := void; p7 Z# M4 q8 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 N; a' y: y V6 i
@,root.eventcontroller.simTime);/ I- ~. h" u8 t9 y& u
@.HasOrder := false;
1 l' r- u8 M( H1 k: b2 ]4 ? @.DrivingHome := true;
5 v8 ^1 [/ W* \- F) a7 ? rgManager.tryToStartTransOrder;4 ?7 h6 l" b7 n
if @.Destination = void- i9 n: V* Y% c& U7 A' m( r; ` o( {
then -- no transport order for vehicle @4 l/ M; j- }# _+ X# a: E
@.Destination :=+ e3 E5 z( v+ h+ D' r. i
rgManager.nearestFreeStation(@,track.~);
" A+ W0 C+ W% f) U/ ]) p0 n3 \9 R newDirection(@); 6 I! y A% O* M& {/ I8 T
if @.Destination /= void then) ~& F3 ^" a9 I3 F. G5 @ [3 [
@.Destination.NumReservation :=
0 e% ^8 ^( G0 ?8 u5 @0 C4 d. i @.Destination.NumReservation + 1;
$ G$ N% x% o0 r: G: m end;
( o. C' @; z% t$ @ @.CurrIcon := "drivingHome";
5 v% J9 x, R) ^7 p( Y3 u9 n* o @.DrivingHome := true;
, t% |! _& R* s( B% D6 @& P end;0 A5 y4 c: T9 X6 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 T" z' |* G3 H' D& E* }( s part := @.transpOrder;
( k) \ r& J4 }* Z/ x- W part.move(@);-- load part. a4 d3 w# | Y9 z+ G/ L
@.CurrIcon := "load";8 ?* [% a$ {9 j1 \: B
GlobalDistObj := part.globDestination;
8 k3 h7 `) E8 d" J2 G6 v assignLObj := rgmanager.rgAssignL; A u; h: Z2 m, B5 \5 `& B
row := assignLObj.getRowNo(GlobalDistObj);
9 B( l* R9 a5 r( l7 K if Row = -1 then -- since 70' n; F1 V/ K9 I- |& {! _
if lan=1 then
% Z- D$ S( \% z# F* q/ U9 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) X4 |0 f7 K8 t( z
to_str("in der Andockstation: \"",?.~.name,"\""));2 `- Y2 E2 j V x4 W' x
else
- o3 l+ R( [2 t3 T6 _( x' N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; r4 m2 x, @- V& g9 C to_str("in docking station: \"",?.~.name,"\"")); ; N; G. n; ^8 s4 ?% @# X9 y
end;6 ?% c% ?% O3 v4 ]+ H ?* O+ [
else
5 y' s4 ]: j- v7 N' V0 z i% R @.Destination := assignLObj[1,row];
' t* d# g/ v' Y4 ]# { end;
# h6 g2 m5 r: [" n7 r: Q: F# h9 _ newDirection(@);
. W3 i+ y* v d8 w) p9 P0 Z @.HasOrder := true;: ~( }( e5 z, c
end;
' y3 J: E$ J( e1 q& O8 Z K3 `$ ?! I end;/ {$ m0 J. t0 }+ @; i3 ?& m" [: X( p
end; -- of the method- \5 V/ v+ n9 y6 {/ X
|