/* called by: entrance ctrl of the object 'track'
" z$ k: h# E1 O) ^. J: B*/+ `/ j8 l0 ^7 d4 a0 z" X6 ^9 H
is
% G0 [$ s, }- j1 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;* G, m1 `6 }; c) h! e0 ]: V5 ?. T
do$ H0 f; I4 a9 X3 B: H. B2 w% o
Lan := rootfolder.Internal.Tools.AOLlanguage;9 F- x0 z( ?6 Q; v3 ^
if current = @.Destination -- else return( p0 O9 i2 a" x+ F5 Q$ e; u# k
then2 _( n: G4 O; V
@.Destination := void;
7 K. n# ? } t/ t1 s( U3 x" y if @.occupied then
7 m, D" o; W0 x( j. m part := @.cont;
+ }$ ?9 h7 ^8 h% ~ @.transpOrder := void;
$ s- m9 e8 I3 A" s9 x6 I+ }8 r5 m0 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& a* `9 _1 \+ }# J: p( P( |7 C @,root.eventcontroller.simTime);
$ |* `" `8 p7 V @.HasOrder := false;1 k1 T1 o r! ?$ B' \6 \' F( x' C
@.DrivingHome := true;, I# h6 c a" P8 y4 |% B
rgManager.tryToStartTransOrder;
' D7 }3 B- L x% }7 \ if @.Destination = void
/ W4 O: r" g& g then -- no transport order for vehicle @
: @' v/ o% W2 h8 |7 d @.Destination :=6 r# v; s3 U& o7 n* ?. a1 z. T! @
rgManager.nearestFreeStation(@,track.~);( `8 a. K- O* E, [3 R2 ~9 M
newDirection(@);
$ a" Y* V6 B g" R. o if @.Destination /= void then
) e+ U; o* v/ U! U4 E. R# C @.Destination.NumReservation :=4 e0 V3 k9 G {$ ^1 O& q
@.Destination.NumReservation + 1;$ s' I C9 l2 D6 e
end;
) |: H. X( d( t& s" N$ Y' Z# |* ~ @.CurrIcon := "drivingHome";" b4 g- y! l5 i$ K5 X1 O( q3 |
@.DrivingHome := true;- O* @5 m; E C: v& g! S
end;) G8 ?6 K3 j8 ^) w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 Z, L; A, g0 { part := @.transpOrder;" V8 ?& E, o& P+ F9 w( A: [! F4 S
part.move(@);-- load part
g8 W h# v/ J5 H, Y* k5 e7 e @.CurrIcon := "load";
4 n" G$ ?3 W$ B4 { GlobalDistObj := part.globDestination;
+ ]9 p2 g0 _6 H/ E6 _8 a assignLObj := rgmanager.rgAssignL;1 K& V% b$ Z% p* `& n7 [
row := assignLObj.getRowNo(GlobalDistObj);$ o8 m/ R4 |: P) g7 v# i
if Row = -1 then -- since 70
. v. {& O# k- B if lan=1 then- n; Q' g$ o7 A: g+ z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Q/ v6 W1 n7 z6 A to_str("in der Andockstation: \"",?.~.name,"\""));
) {( Y7 ~ V1 X5 B* E$ k else* G6 J& [7 Z2 b1 g. k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ~& W a" B" w5 q
to_str("in docking station: \"",?.~.name,"\"")); 2 h) M1 _5 G3 _0 X f5 k
end;( `; n3 b/ n% a/ ^; J
else6 f# K$ n5 y% C' v/ y c
@.Destination := assignLObj[1,row];. d" I/ s( O' x7 y
end; 1 a! p5 K6 u! X. i
newDirection(@);
8 m8 g5 g Z' K' D+ _2 E- j @.HasOrder := true;* ]+ S# o4 ?+ u9 _5 {0 r. C
end;
: t9 u6 a* b. L# F7 D. W. `9 Q0 b end;0 f6 }& H9 V% o/ O( y g" S; n
end; -- of the method
* t9 o4 i- l' Y. X2 |& h0 ?5 U4 R |