/* called by: entrance ctrl of the object 'track'
B( d7 ^. J. G: A4 D*/( @$ u9 s/ ~0 u: B4 \
is& f( q: W* s7 c4 r+ S7 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 T/ Y x& g% R% t, I) P
do2 @7 E! i+ E3 o/ ?1 |1 }# |
Lan := rootfolder.Internal.Tools.AOLlanguage;- ?# O) ^3 W( X+ G
if current = @.Destination -- else return7 |, a, F* G: G1 Q
then
. f' K. W, t5 ^" `1 g @.Destination := void;# V9 I* F0 X% p6 |; [/ v1 S
if @.occupied then
0 r5 F" U0 l W) K* w D( M4 T part := @.cont;
7 M! n! M3 `- k @.transpOrder := void;
- F; N4 u' } h* E/ m$ D( I6 g8 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- v, _& t/ r! V7 Z- E# B
@,root.eventcontroller.simTime);& r/ N- Q7 L- ^: B
@.HasOrder := false;
( L) ]; o" f0 [8 n; m& p0 X9 E% o, X2 { @.DrivingHome := true;) @+ v# R: t* q- h3 U
rgManager.tryToStartTransOrder;: r \, A* W( S# B1 ~
if @.Destination = void
/ d4 ]1 G. l( d8 ] H, J3 P then -- no transport order for vehicle @
( m4 u7 `8 \/ ]. j$ O e5 |3 G6 t @.Destination :=6 S" K: y* Z. U( V9 P0 d# ~5 q6 C
rgManager.nearestFreeStation(@,track.~);! l6 y% Y! T' H: F( F9 T1 g4 Z
newDirection(@); 2 k# s1 R' Z: r' Q) z! k
if @.Destination /= void then
" s+ B; U* r5 w! s) Q @.Destination.NumReservation :=, R( u" s: q( w5 Z i* J, j
@.Destination.NumReservation + 1;
7 ]* M8 l; V" `9 H2 u; L end;; ~" q! r! U% G- W$ ^7 \2 O
@.CurrIcon := "drivingHome";
8 t! T9 O; G1 B9 e& B# [0 t6 l% A4 V, p @.DrivingHome := true;
- `2 H# F G6 [( P& u" `% @- d( N end;
4 Z: o% m- N) P+ W7 R- q else -- the vehicle @ is empty, both vehicle and part are in the same dock station! f+ h9 i3 g v2 d( C
part := @.transpOrder;
( b3 n0 n f! F' A part.move(@);-- load part
4 f7 B v3 b! h) t @.CurrIcon := "load";
5 [0 d* R, f! ^- n+ g' K GlobalDistObj := part.globDestination;$ ?" W0 P7 I8 y5 g- ^* S
assignLObj := rgmanager.rgAssignL;/ P& S; Y; R+ f- o# @, u
row := assignLObj.getRowNo(GlobalDistObj);
$ s5 p5 t0 c3 z0 Z; b2 Z if Row = -1 then -- since 70
, [' a( D6 s; e2 b if lan=1 then
# ~3 l; m* c5 | s6 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' _" ?+ c, a2 t( e7 [* q to_str("in der Andockstation: \"",?.~.name,"\""));( s0 U9 b& ^5 C( L
else
9 c2 t! {% j: H+ c; ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 f2 |: c2 i. _) G V to_str("in docking station: \"",?.~.name,"\"")); / w+ E o1 x2 [% r3 Y3 P8 a
end;! ]7 o* d2 b# b+ q7 k, X
else
; S7 r& E- M+ u; T @.Destination := assignLObj[1,row];
$ B6 F% L" P7 W- x8 d9 ` end;
R& \/ z' l+ O& @( ` newDirection(@);
; y! C- F( h a- Q4 X# Y @.HasOrder := true;
& q, H0 @2 I! ^3 O: g/ \ end;
( t: V' y( o+ }6 ]$ P$ C end;
3 A. M: z1 b! o/ \0 S; f+ P/ s+ qend; -- of the method
* O' W2 R$ y6 T |