/* called by: entrance ctrl of the object 'track'1 Y# P# f5 J! Y1 F! {- V' U
*/
" r* O; o* l$ R$ f' L& i. \is: ~+ f( v6 ]3 w, f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, F6 t& ?5 N. w9 R+ h/ l$ t
do4 e' H- K$ N, C- j* f' M; ? I
Lan := rootfolder.Internal.Tools.AOLlanguage;) F W1 A9 v$ @# x4 o0 s8 Z; r, S5 l
if current = @.Destination -- else return' E! o5 V' j4 r0 Q! R9 U
then Y! M* d. Y* y8 F9 W5 A
@.Destination := void; Y, \) j0 p% }. O2 J. f: o
if @.occupied then: I/ k3 b; i& N4 f* i0 \8 z
part := @.cont;
/ p% n8 p, s. e @.transpOrder := void;
7 ` |1 D9 C8 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, ?' z% p* g1 }0 R
@,root.eventcontroller.simTime);3 X `2 v, U* t( N. Q, a" E
@.HasOrder := false;
- e* ?/ d& A1 Y- B2 _0 | @.DrivingHome := true;0 T+ D2 O" X/ V9 V9 A7 C6 P
rgManager.tryToStartTransOrder;
/ @/ y+ Z8 T% R1 q( B' j if @.Destination = void
, S* c" [& l$ F7 t then -- no transport order for vehicle @1 ]5 x# m* @: ~
@.Destination :=
/ [; ]4 S0 l' [1 r rgManager.nearestFreeStation(@,track.~);
4 ]% P) X5 B: {1 P4 v L+ b newDirection(@);
* t* P* }" Z# o8 {; n if @.Destination /= void then- u; l# g) l& \8 J) m
@.Destination.NumReservation :=
* n a) b+ J | @.Destination.NumReservation + 1;
8 {* m5 ~9 b f* f6 ]. B8 U8 q end;
# E- F; @* Q6 R# ?/ S @.CurrIcon := "drivingHome";
* @: K+ O& H( j# N. @8 T7 t @.DrivingHome := true;
; J) e3 G4 z0 Q( F- Y) { Y6 w+ i end; `2 C l9 V) `4 ~2 \1 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' g6 u0 [- I- Z: @4 \
part := @.transpOrder;5 D3 F ] o; D0 w) u
part.move(@);-- load part; S0 B. d9 t" W- I2 X1 ?! E- y
@.CurrIcon := "load";
4 v& l* Q0 k- O+ K6 l5 D& I+ a GlobalDistObj := part.globDestination;2 V0 G. K( k3 R7 i8 o/ I
assignLObj := rgmanager.rgAssignL;
. g& o8 w0 d5 ]( g' c row := assignLObj.getRowNo(GlobalDistObj);, Y: q7 H" Y- ~
if Row = -1 then -- since 70
, k0 n, E- Y. e4 z+ u: _! r( j, l6 X if lan=1 then- O ^8 W0 b. R) D2 g( l9 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- j2 N; c" j- F$ {9 t to_str("in der Andockstation: \"",?.~.name,"\""));
9 V% ?2 }- R {8 ]( r+ _/ Q! N( B else
& ^9 P7 O4 v6 }9 b" s3 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ?! m- b( u( E2 }2 q to_str("in docking station: \"",?.~.name,"\""));
3 u( N* @; Z3 b! u4 L3 \. D+ c' D end;0 L: Q& S7 Y$ d$ d* W$ j, I; D3 w
else
, h T( ^& O3 ^( ^ @.Destination := assignLObj[1,row];
4 e# l3 I% x+ O, _/ g7 N; f1 e end; 0 j4 g+ `) t( k. E1 ~3 W
newDirection(@);& D& O9 [) d4 a' J
@.HasOrder := true;
" ~9 a) h* P% ~! H' Z& B end;8 ?! X; w* ^# Y3 Q
end;
5 U- E9 h6 v5 P$ a. x3 vend; -- of the method
$ B, B d* s1 ]" T# \7 ~: } |