/* called by: entrance ctrl of the object 'track') R. [% c! o8 ` i* [, O
*/& p# U5 ~( V z- }0 S4 c& m+ X
is- Z2 Z# j. V! j; h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# C2 D$ ^1 D( G5 ~8 udo+ a/ p) ]3 _- O, N& [, q
Lan := rootfolder.Internal.Tools.AOLlanguage;
, h! Y( m; U" r, n$ o if current = @.Destination -- else return
4 L; W7 \/ t4 j( u( V then8 P. m% A$ d6 J% [8 ]+ k
@.Destination := void;) [8 }4 p5 u3 b: C
if @.occupied then
' h* _7 \- @# z1 m) C3 U0 g part := @.cont;- P( S2 B+ e( @6 J; e& ]" V X c0 ^
@.transpOrder := void;
3 k( W: D7 S% \! s; H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 }$ d$ y1 V$ p: \6 E @,root.eventcontroller.simTime);
9 A3 ^$ P2 F6 u. y/ [8 Y& C @.HasOrder := false;
' ?* t3 w/ k* Q: @ @.DrivingHome := true;
& w- ]1 C$ c5 G rgManager.tryToStartTransOrder;
( w8 f# m8 K* h- s' V& s if @.Destination = void
: ?" G2 H! f* L4 n4 z$ H5 g8 y then -- no transport order for vehicle @
" c, T4 H/ u( `1 a" M @.Destination :=2 w: s6 Y% k# y% N, q* o! S
rgManager.nearestFreeStation(@,track.~);4 O6 @4 N* u$ u* L1 p) b
newDirection(@);
+ q+ ]- m& |9 ^8 ^ if @.Destination /= void then
8 C8 m6 l8 s8 u" o7 { @.Destination.NumReservation :=' ]" n8 F" v& R% b; v" \
@.Destination.NumReservation + 1;% m- | U' [7 |) A6 M/ B
end;
- H, a: _, c5 O$ a+ F @.CurrIcon := "drivingHome";5 Z) K6 p6 x6 d: i% q" i" d
@.DrivingHome := true;) r& L/ L% O9 `% M2 x- f9 q
end;
( D4 x; | L- {* y. C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 J6 \2 T3 U2 O/ M+ ~, z part := @.transpOrder;
2 d0 ~( X1 v1 C% Q, H+ ` part.move(@);-- load part& b* G" O7 K! J9 z
@.CurrIcon := "load";
- ^ D: \* p2 }% a GlobalDistObj := part.globDestination;. x+ L* a: ^1 @- W4 [
assignLObj := rgmanager.rgAssignL;0 d/ b% Q3 _, f' }) \5 L
row := assignLObj.getRowNo(GlobalDistObj);
, R1 g% w! h. z- A/ u+ w if Row = -1 then -- since 70& G! m9 ^# I( | q( ~6 o+ ?
if lan=1 then* r3 B1 R- B0 j Z( ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: E' }+ N0 M7 V
to_str("in der Andockstation: \"",?.~.name,"\""));
/ I; K J2 T& n/ [" [+ _# K* R! _ else
/ U' ~' c0 T- @* ~. y/ c' R' N! C g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 l7 r( V* t/ p$ Y- u: h' M0 E# t+ |
to_str("in docking station: \"",?.~.name,"\"")); / F- S; F3 d$ q* [
end;+ @4 B% c; g! T s8 F' j" `5 i
else
$ z) b2 z* S% D9 r9 U @.Destination := assignLObj[1,row];
8 K, z7 I( f W7 V S. a/ L* c end;
/ B# V% i4 T4 h" \ g/ E- A newDirection(@);8 K: C* i- M& ?7 c
@.HasOrder := true;
: l5 w2 D- U( Y end;
_ d! D7 k- u7 n% { end;
; T! S& p% L9 ^; i3 g- y( aend; -- of the method1 s5 {: Y4 z" ~
|