/* called by: entrance ctrl of the object 'track'0 t- I, [3 j$ K# `' B
*/
4 Y$ M0 y4 Q0 Bis
5 A6 ]# o; p7 ^7 M* P# ^% H4 E( P part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ^9 v( X& s9 ]2 x* z w
do
8 C" Z7 ^( N2 F: k$ G* M# M. n Lan := rootfolder.Internal.Tools.AOLlanguage;0 a4 ]- G K8 z
if current = @.Destination -- else return/ W/ q) r: W+ l* |& u1 s0 |
then' g; J% \( A3 z. r2 g
@.Destination := void;. k- n2 o; o* D
if @.occupied then/ t2 V5 y4 H. L
part := @.cont;
3 l- j( w8 o6 J. Y @.transpOrder := void;' P6 E2 Q1 N* M1 s9 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" }3 U1 ^4 p" l% Z3 T @,root.eventcontroller.simTime);% O1 \8 N9 @: Z7 L2 B! U9 b
@.HasOrder := false;+ U# E+ S' E- L8 r
@.DrivingHome := true;
3 O/ Z, |: k* A rgManager.tryToStartTransOrder;* ^, _1 g) M8 ^: a+ Z
if @.Destination = void0 `) r/ V m2 U; [' K+ H" m
then -- no transport order for vehicle @+ x5 \$ N% h C; u
@.Destination :=4 f$ B3 c; q8 F5 E; x# M4 R9 Z0 @
rgManager.nearestFreeStation(@,track.~);
1 a* N2 ^0 c8 D. k, T$ Z8 m newDirection(@); * ^7 `% z0 P( @- n" H
if @.Destination /= void then
( T! B/ E: b% w4 L0 E @.Destination.NumReservation :=# p; ?* X# t% t4 c) I6 r0 @
@.Destination.NumReservation + 1;
' u3 k& \9 a. a- N( E7 m; T+ _ end;
( _; i' V5 u; }0 W- m @.CurrIcon := "drivingHome";% T2 a1 S$ ?+ _2 X5 M8 Y% i
@.DrivingHome := true;6 Q, G. h8 Y* a
end;# l, n5 _- n6 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' @. f4 I! |+ ]3 n part := @.transpOrder;2 J- j; F0 o* b* z
part.move(@);-- load part; `- u1 K' {% O5 j. h# e R" e
@.CurrIcon := "load";4 Y/ L6 H/ X l) n6 v
GlobalDistObj := part.globDestination;
2 ]' q6 V7 _" e7 D9 e# j2 b- N assignLObj := rgmanager.rgAssignL;
. Y& D7 R' P5 Z4 r* _ row := assignLObj.getRowNo(GlobalDistObj);1 d9 \0 j7 Q% Y% q# @* c3 N- S4 A
if Row = -1 then -- since 70- s5 E j7 G0 ]
if lan=1 then$ K" Y) x( @1 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- V# h- B0 P- |7 h: k7 W/ o
to_str("in der Andockstation: \"",?.~.name,"\""));8 e- q. G: Q; U9 T. h+ W
else" |& D. Z; r$ D) f, y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ?0 D- S1 T( I8 S( S! _; K to_str("in docking station: \"",?.~.name,"\"")); ; _% C9 ?' x7 A/ p& H1 @+ p6 Z
end;
5 j) f! z) p6 Z# F* U7 ]6 s0 k else H& ^1 A/ G. f- f/ o* Z
@.Destination := assignLObj[1,row];
- K/ q1 v3 p2 |4 G9 I9 j7 N end; ( U ~2 L5 _, K6 M+ B
newDirection(@);5 b2 N; @% y* e5 U- @) {) y1 I
@.HasOrder := true;
$ g- u7 M: ~1 F end;
" q, D7 T. x% H% m% o9 D7 B7 h end;
$ i9 a; d% ?: r+ x+ B1 b4 g! Oend; -- of the method
( c' Q- ]; L$ M5 f |