/* called by: entrance ctrl of the object 'track'
6 q8 v, S; E" I# J# m) e5 a+ a*/3 [5 A3 s& ~8 u0 C# N" A
is$ R6 A) l7 P0 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
R* Z+ s7 q: a- k4 `do
& B% Y3 g' Y" t# S3 o Lan := rootfolder.Internal.Tools.AOLlanguage;+ I! J X9 O! s7 ]1 k
if current = @.Destination -- else return
, P! Z9 y2 q$ e* \+ |5 z then
4 B& Q, E/ z: U8 ?& Y9 s @.Destination := void; j/ G! Z+ D& ^
if @.occupied then
, z8 q) q( G" u" @. @( V' | part := @.cont;4 s2 S8 d' y7 t. B; y
@.transpOrder := void;% i( e( n6 s: M8 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g, Z$ D% z6 f3 ?* V( r& j @,root.eventcontroller.simTime);( v3 M3 Y% m- C( C: i
@.HasOrder := false;/ Y. t2 _) ~) J! q+ r
@.DrivingHome := true;3 @% |6 S1 w q
rgManager.tryToStartTransOrder;
7 W! \2 c# m8 B' F/ E' t* C, T% D if @.Destination = void
/ f' P0 i3 ]% X: c' ^3 @ then -- no transport order for vehicle @
: S+ X( p/ c: w4 s9 X# f @.Destination :=
( t h- I* ]2 V rgManager.nearestFreeStation(@,track.~);. {1 p, T8 \2 \% ?. `8 _
newDirection(@); $ \- h. X. M+ N0 u7 F
if @.Destination /= void then- [' n+ c, P+ d N) @# Y' n
@.Destination.NumReservation :=
7 ~, g( Z+ J: R0 F! v @.Destination.NumReservation + 1;5 ^: P5 y$ [4 M3 Q' ]( v) E
end;* ]6 ]& [8 j& v9 Y# m) ]7 K
@.CurrIcon := "drivingHome";; d' s, i( N+ L- o% b% ]. @
@.DrivingHome := true;4 }, }+ p% m. e5 H1 G# x% @
end; ^6 Y: }* o+ c* f: m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 S( q4 x1 K. c( L' R2 y
part := @.transpOrder;; d! ^5 ^& A" }" ^
part.move(@);-- load part
+ n: E) v4 c+ B @.CurrIcon := "load";+ _6 F6 R" r5 s+ ?- g4 P( ^* E Y8 O( S
GlobalDistObj := part.globDestination;
( H+ h2 z7 }4 F8 t3 q! L assignLObj := rgmanager.rgAssignL;
0 e* _4 V7 A7 O9 c1 V# Z row := assignLObj.getRowNo(GlobalDistObj);
( N0 ~4 k4 P4 ~ P if Row = -1 then -- since 70
/ \# W, N2 p( _, H( x) V' p' B. S if lan=1 then* b) |4 j2 Q0 N2 L' B( \, ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
E( N. S$ Y) d" z. V5 A+ T to_str("in der Andockstation: \"",?.~.name,"\""));' g1 t- r# `3 A5 e% H7 D0 g
else" @5 D' S# _2 w4 L1 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 p4 \! X4 l% s to_str("in docking station: \"",?.~.name,"\""));
- a$ d9 k( G& B# z1 q end;- M9 O& H% q1 O9 Y
else
1 r* l0 m3 i3 g4 K( ?3 q1 P @.Destination := assignLObj[1,row];
! G) f. i1 z/ w# Y! \5 d+ d. T) H end; + e; R. p3 C5 `& t9 Z( `; L& b
newDirection(@);& m2 Y6 B* Q+ t D- q9 Y) v: p8 ]/ }
@.HasOrder := true;" J9 W7 u1 o4 d% s" f' A2 Q4 Z
end;
7 D2 C* {8 F$ `5 l( F* n+ ` end;* l" f' H$ ?4 M
end; -- of the method
) A8 K" h6 I* q; e' z( E |