/* called by: entrance ctrl of the object 'track'; q! O) T2 S9 L; Q; T+ m
*/
' U* N: y! C! s6 B! w9 P* R' @5 V5 S6 Fis$ m* ~5 T* M- S, s2 h6 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 X7 ], `5 Q9 i1 f2 v" F
do
' k* C2 ^* K. K$ s/ N Lan := rootfolder.Internal.Tools.AOLlanguage;
# R- t0 I( v, ]4 a! z/ ]1 X, W if current = @.Destination -- else return
& S* J, F5 j; B; U) M- f then
* [/ _2 A/ H8 ]% b8 \( [" a4 t8 N2 h @.Destination := void;- t/ w' e/ y, q+ r: R5 j! H
if @.occupied then+ u8 c% h9 B& g1 m' ?: Y! d
part := @.cont;. F5 n$ q5 E! ^% n. ], Y
@.transpOrder := void;
& \7 n! r9 q7 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 q3 ]% J" `) |; Q# W/ z8 ]; G% I @,root.eventcontroller.simTime);* C3 c/ U- C6 {' r1 L( d$ m. A
@.HasOrder := false;- d! d# @7 S% g7 U% n* N5 d
@.DrivingHome := true;7 T Y% Z& ~" R* N8 ?6 `, b
rgManager.tryToStartTransOrder;9 U* v; K% T$ f+ C7 M8 f
if @.Destination = void
3 z+ b- U. a: y8 E' y% F then -- no transport order for vehicle @) `# r4 s0 B6 G g! J8 e6 |( T
@.Destination :=! q1 B, v1 j8 l& @) g
rgManager.nearestFreeStation(@,track.~);
, m& D% N7 k, V( R newDirection(@); # m/ d7 C- Z) h7 H6 p9 d
if @.Destination /= void then
) ~4 p, |2 F8 L4 p) Z- T3 I w) z: z @.Destination.NumReservation :=
' i, j+ x0 M2 V! Y+ R/ E @.Destination.NumReservation + 1;7 D7 v' M. R. b, k# v0 o
end;
, d0 W; L0 s; J4 L$ j @.CurrIcon := "drivingHome";+ w$ O% t8 @8 p8 Y+ @% E: ]0 W
@.DrivingHome := true;
; a; [- a4 ~+ F$ x9 T4 E0 o end;
|) ]& r; }; M; n/ y- c else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ I- w. [' y# _( \9 W9 b- D
part := @.transpOrder;9 P- ?( Z+ X; g
part.move(@);-- load part
$ D; h2 v# k. D; x( D" e$ a @.CurrIcon := "load";% J0 u7 K* `$ X- r) x
GlobalDistObj := part.globDestination;6 u8 Q& ^3 R9 i7 T
assignLObj := rgmanager.rgAssignL;
5 k& r: ]+ W6 B9 m( ? row := assignLObj.getRowNo(GlobalDistObj);' x3 F" ^( Q: \9 G5 m3 }7 m+ L& f3 n
if Row = -1 then -- since 70
1 j# A3 {0 k; ^, v1 a if lan=1 then
6 F( _; d7 u( ?0 J" n- i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 }( N4 b& l" b4 x
to_str("in der Andockstation: \"",?.~.name,"\""));
( n J) T+ a9 L) A) R2 j. V8 w f else# `: i2 ~: J( F1 E& Q+ g- L+ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) P$ U& Z+ a0 _5 C- O& K' A
to_str("in docking station: \"",?.~.name,"\""));
5 g. g) r: ?& \, Q0 O* g8 x end;
, \) j7 J7 i# x8 P9 N4 }% a* F else8 l) [# {" Z$ c
@.Destination := assignLObj[1,row];
( M/ [0 r5 Q- s# T- c end;
: S2 q' z! Y( R/ B6 F% f1 \# } newDirection(@);: d+ v6 e5 G. r* b
@.HasOrder := true;) u# z e7 {3 s8 w5 W2 O" _ i. N7 j% T
end;; t# M/ y4 Z Z8 T
end;
2 j' L. H8 d) Y' U+ X3 Yend; -- of the method+ t' E( p8 R3 m% ]% P
|