/* called by: entrance ctrl of the object 'track'% e: q8 u+ r: I& l, E! l: v1 P
*/
* n" ~! X7 C1 z& V; e5 |; sis
2 [8 q e) A* H$ @1 l" V part, GlobalDistObj, assignLObj:object;row,Lan:integer;* K/ S. \! p2 R' U
do& f; y: q" V$ V4 ^( N: v/ J
Lan := rootfolder.Internal.Tools.AOLlanguage;
# ~, o6 J5 R; K/ W" F2 ^: n if current = @.Destination -- else return
9 `- P2 A. a) J; c1 z then
; Z9 H/ g. s/ v8 G, T( a( c j; @ @.Destination := void;
. [- L' y' U' E# ~0 O if @.occupied then
) c# _3 f! H3 v: v" T part := @.cont;
5 x$ u- h/ l5 J# s. S @.transpOrder := void;
# ?; ^; A- W: X3 m0 h# `. k' M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ]( k( q- R% L* W! u
@,root.eventcontroller.simTime);2 a W/ q, {8 u
@.HasOrder := false;
& A c9 q P9 z4 r& e4 S* S @.DrivingHome := true;
4 B A; T0 }' }! h. l6 t2 c. U rgManager.tryToStartTransOrder;
X/ x- s7 U' g if @.Destination = void
9 ~3 q& g. r9 C" v+ e! t4 N then -- no transport order for vehicle @
" o) J3 f9 P7 F4 l# W8 ^1 } @.Destination :=1 b% O4 u7 ]5 {0 ]+ l, ~! R/ _
rgManager.nearestFreeStation(@,track.~);& t' r/ {7 T. u/ L( s0 b
newDirection(@);
# h' T6 N" P! v9 c7 i& f if @.Destination /= void then
. j9 y3 w( K( g6 [ @.Destination.NumReservation :=- [, q, F) m, ]
@.Destination.NumReservation + 1;
+ D$ f, o' ^# C: [$ Y8 y. B+ t end;( D* c3 X0 h6 }7 M. k
@.CurrIcon := "drivingHome";
5 j2 _! T8 F, N& Q+ N @.DrivingHome := true;
0 N i5 W; y4 }! k4 ^: U- a. Y/ ^3 S end;" E, C3 z4 U, O, k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 x$ T! n+ ]) B. @% N4 o& l8 ^
part := @.transpOrder;) _4 R1 o2 x3 p0 t9 L5 ^
part.move(@);-- load part4 V* X( ]+ V5 n8 c
@.CurrIcon := "load";" D/ b6 @+ Y* w6 R
GlobalDistObj := part.globDestination;0 @! k- K c# l5 Y: Z
assignLObj := rgmanager.rgAssignL;
% {3 N! e1 g+ e& s row := assignLObj.getRowNo(GlobalDistObj);
: X4 C2 r$ R1 [0 t( X if Row = -1 then -- since 70
3 p6 G7 \' y& C$ V. | if lan=1 then7 I/ E( s1 H( d% q5 U4 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& b: a* x" E, {
to_str("in der Andockstation: \"",?.~.name,"\""));
4 H1 D# W. @+ J2 T( j {, |: H! x else) @2 \7 P4 E) N9 k, w' w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& s' H1 _$ ?" e/ b' J to_str("in docking station: \"",?.~.name,"\""));
# ~: t% D( F& F# T% h* p: `: j end;$ n' B0 w, A8 T, B( K: z( p: T
else
! z* K" I$ K9 Z- c, h* A- M; z @.Destination := assignLObj[1,row];7 R4 [) z! w" J* b' L2 J
end; 6 ~9 v! f9 ?' u- _5 M% H" m3 K! i
newDirection(@);) T2 ]1 w6 Z. R$ }% w3 {6 ^5 s
@.HasOrder := true;$ a- u( w6 q( t3 s! n" ?2 k5 P/ q
end;" z+ G6 y- z! @" h
end;
/ c( N5 ^: b, c" d! I! L! ?end; -- of the method
6 w7 R3 a$ M- L( C9 o8 o# s/ Q, L, C: b |