/* called by: entrance ctrl of the object 'track'
3 Z5 N& T' W9 g) G/ i*/
2 N! Y! V& C( l. {is
W$ C/ a9 ~4 S+ t0 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 S3 U2 P Z6 w0 g2 Ado' O/ _1 X- p/ N" c" Q: D; M8 |
Lan := rootfolder.Internal.Tools.AOLlanguage;1 `- ^2 A8 | m* l) D6 p* X
if current = @.Destination -- else return
8 I3 @8 C: ^! K then7 \3 Z# \/ E T
@.Destination := void;
* q9 `: ~2 s+ i# R5 ~3 K( i0 o, Q if @.occupied then
6 f0 K, a& P8 N3 }8 d0 W9 a2 y part := @.cont;
6 P, w) X# u1 A% q @.transpOrder := void;
9 {- j: i, d1 m& W5 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: T$ u, ^5 \. U$ P# J$ B @,root.eventcontroller.simTime);- V6 K" c' f5 T( p5 z
@.HasOrder := false;( T7 Q- ~9 ~+ ~ q O6 R/ g7 y
@.DrivingHome := true;7 {, Q# R n3 H( j: R
rgManager.tryToStartTransOrder;
/ u w! S" W4 R+ g if @.Destination = void
+ ~. \2 K6 y+ U; H then -- no transport order for vehicle @
; R0 z. L6 a5 r( t% Q2 Q& \4 u! F @.Destination :=5 f. U+ h6 ~7 l4 K
rgManager.nearestFreeStation(@,track.~);3 G6 {% s, I* N7 f2 k$ e' d
newDirection(@); : ?1 x3 s& n$ ]2 t5 X' x
if @.Destination /= void then0 o+ t5 L1 ]* L# k& @0 x% u& D5 t
@.Destination.NumReservation :=" ?5 q/ g0 j4 I {3 | r
@.Destination.NumReservation + 1;0 H) k" H* Y: Q/ E' P
end;
, @+ [8 _$ V2 R7 f4 I @.CurrIcon := "drivingHome";
3 |* x9 R: r2 a9 q# l8 j1 E8 C @.DrivingHome := true;& @2 q/ T# p% m7 a' C" W
end;" i7 v0 J! D6 \( {3 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ j/ G, q+ T' x8 w part := @.transpOrder;0 g& [. p" ~, m: t% N
part.move(@);-- load part+ r% y- }1 [' M. ^ M5 f( {: ]# S* v
@.CurrIcon := "load";
c. n& G3 k( Y$ p GlobalDistObj := part.globDestination;" h8 {5 E( x! o9 |4 T6 y" U+ N
assignLObj := rgmanager.rgAssignL;
1 V' M9 @# a2 M% V2 a% j4 } row := assignLObj.getRowNo(GlobalDistObj);
7 F; M& [$ e4 Y/ n! e7 g if Row = -1 then -- since 70. L' C' ^. N& C/ Z( ], I
if lan=1 then
/ N6 y3 d, m5 O2 d5 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- d' k7 a( B: b
to_str("in der Andockstation: \"",?.~.name,"\""));7 T8 E! w" @+ ^5 g& M+ R, y5 X
else! V4 ~4 T; h' m( u! r9 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* p/ s' R& B/ g# J to_str("in docking station: \"",?.~.name,"\""));
# l. Z- u2 |/ n% l2 Z end;
2 y d3 X6 R- }2 g; [+ `) A else+ Y7 v, W% M8 K! l) X
@.Destination := assignLObj[1,row];
3 b- C! ^3 l: }- i end; 9 J; z1 @+ a" [& x
newDirection(@);
: e! q3 O' g( G% n" _2 v0 S @.HasOrder := true;
$ T, E- X0 B% @+ I end;, C1 T& F2 @5 |0 t" ^$ J( P
end;! a3 H6 E# `; c4 k7 M- q: {
end; -- of the method' U4 E! {0 j R! e3 H3 U
|