/* called by: entrance ctrl of the object 'track'
" I7 Q+ F6 _" ?. [*/, I2 y3 s" a9 _ H, q# l
is
9 i& n9 b0 s1 w6 X5 S. q! } part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ i6 B5 {5 z0 b; G) ]5 f3 x U) ]+ b
do( \1 v/ _* _5 A1 u4 K; b! m
Lan := rootfolder.Internal.Tools.AOLlanguage;2 v% A9 Q- J1 }* Y# j# i4 k+ _
if current = @.Destination -- else return
; X# p" Q' ~" L7 t5 p8 _ then
9 u# w5 ^) ]0 k @.Destination := void;
$ b& J& q$ {- x* Q$ t# y2 t5 h: a if @.occupied then" V2 i- X8 h+ L' y6 T
part := @.cont;+ o% m9 F- T. M; J. j2 u
@.transpOrder := void;
8 }9 @2 z' B. o ~" B; A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 i" q# c0 X3 s( G' } @,root.eventcontroller.simTime);7 Z: W; y8 ~. Y; Z* m
@.HasOrder := false;
( W. n6 C) v( p, G, w; b$ y+ \/ X @.DrivingHome := true;8 H' _, c. Z& t X4 e: v0 a% l8 y
rgManager.tryToStartTransOrder; I' f8 A1 `, _6 ~6 r5 H0 d
if @.Destination = void
( P$ b+ z3 n6 q: `& T" R8 A then -- no transport order for vehicle @
4 t& z( [! ?0 l6 [ @.Destination :=
* i, _, N, v0 U( h0 T) S rgManager.nearestFreeStation(@,track.~);3 n. e- {' h& z" J" p0 h, C
newDirection(@);
# |4 a# }( f1 ^ if @.Destination /= void then4 R' w$ w) D+ H8 b
@.Destination.NumReservation :=( Y4 t) X0 w" X+ o" i* Y
@.Destination.NumReservation + 1; ^/ Y& q) M1 W! Q2 G
end;4 u& o8 h9 r8 Y" z9 |
@.CurrIcon := "drivingHome";
0 |" l# c7 d* Y, M/ t( o. X1 e @.DrivingHome := true;) N4 i; x3 ?- ?
end;
3 y, H& c% L) ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ |$ q8 }) }2 G+ S2 ] part := @.transpOrder;
& s# o0 i: R/ O6 }/ m part.move(@);-- load part
* y6 ?' M' R5 t2 z @.CurrIcon := "load";
( I" r c7 b6 H, f( R$ X GlobalDistObj := part.globDestination; d) U2 b+ P% {) p; j8 D
assignLObj := rgmanager.rgAssignL;7 `) n N1 G% Q# M. ?2 D
row := assignLObj.getRowNo(GlobalDistObj);
# H; C! }- G' u A if Row = -1 then -- since 708 }0 O3 m, {* B1 T+ a
if lan=1 then, p; Z6 z5 G1 Y) d$ ]1 J' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 t( D4 i2 ~) m) s" u' x% C. D3 Y. Y- D to_str("in der Andockstation: \"",?.~.name,"\""));* F. ^2 q3 ^" `# j! d; J& R' D9 T
else
' H5 R3 c& Q8 o: E } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 N/ I& ]! Y/ \" b
to_str("in docking station: \"",?.~.name,"\""));
) h& Z/ K+ o! p4 {5 k end;
( T. H2 H$ X- [3 T. |; c else+ X, ]- Y9 A9 Q$ Q9 _8 P# ]
@.Destination := assignLObj[1,row];; ?0 k* U+ T# D; o5 y
end; 8 t: o" g9 v. ~3 V7 X1 _
newDirection(@);
( I0 e3 X) o0 e5 \: y2 w! | Y @.HasOrder := true;
8 z( R$ B1 \7 `: S end;: o* v' ?& ~ F1 V
end;
; J0 ]/ _2 d* fend; -- of the method
3 w% B1 c0 R" X$ T% I( a/ a |