/* called by: entrance ctrl of the object 'track', D/ ]0 @/ P) K) {2 W$ ~! V- S
*/
7 J6 j7 k3 ]5 W0 ais: f6 s2 P; I# J$ S3 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% O5 l1 K6 W6 }3 ^$ y7 y5 S
do& N0 I9 j1 w0 d8 B, X
Lan := rootfolder.Internal.Tools.AOLlanguage;
! g: ~$ L4 s p$ w* ]: f& H if current = @.Destination -- else return. ^1 U6 X2 i; k0 f* `. {
then
. @+ h" R' g0 c% |# H @.Destination := void;
5 u) g/ M0 u! B0 F; O+ I# n if @.occupied then
5 R4 c( p/ T! N$ }( b' B7 d9 G& g part := @.cont;3 }, C/ ^6 W! @3 Y+ U
@.transpOrder := void;
% L0 V2 W4 W5 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Q$ y! U6 L: K- X% @
@,root.eventcontroller.simTime);. m2 S0 P! N6 |, N6 ]
@.HasOrder := false;
' |1 _ T7 |+ t @.DrivingHome := true;% [1 T8 O+ c1 y4 k+ Q5 d' {
rgManager.tryToStartTransOrder;; e7 U. k1 a0 W8 r: w$ K. }
if @.Destination = void
p" n, P6 o* T& J+ Z0 j then -- no transport order for vehicle @
( a a S2 Q' R8 x @.Destination :=/ v( ?' ` W/ W) @
rgManager.nearestFreeStation(@,track.~);& f, f; Q5 w- V! D
newDirection(@);
2 l& x; ?9 p' _/ @# e# |& z. y+ } if @.Destination /= void then" U$ J7 r, i. @ B
@.Destination.NumReservation :=
; e* C# o2 k6 w$ U( Q Q @.Destination.NumReservation + 1;: u* q1 P7 Y* A* \5 g9 a* R
end;
) D' K( _/ G; R* K9 z( y @.CurrIcon := "drivingHome";
' x2 k7 \6 U E+ e! L i @.DrivingHome := true;
& w% q- v' ~4 w7 e4 [& a end;
! Y5 v3 _. C* {9 y else -- the vehicle @ is empty, both vehicle and part are in the same dock station' b0 ?6 ?- O9 X. d. K/ |9 Y" B6 V
part := @.transpOrder;
! j# }/ W1 J/ {* _8 v; l$ x part.move(@);-- load part
# x6 o; g- P, y. C) \ @.CurrIcon := "load";+ S B; U. Q' L7 {; N# T# e
GlobalDistObj := part.globDestination;
) f l, Z$ B5 y; \% X assignLObj := rgmanager.rgAssignL;1 T0 m& z5 m, n1 J
row := assignLObj.getRowNo(GlobalDistObj);
) `9 g7 E+ r7 y P if Row = -1 then -- since 703 X2 B; K: L, b
if lan=1 then
# G( {- [1 ^, `" d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 f& |: f1 ^+ W. b( j
to_str("in der Andockstation: \"",?.~.name,"\""));
+ k& f9 C& G7 J else
/ x$ Z+ j5 ]6 v6 U7 W4 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 X8 Z5 g* O. u' K. a
to_str("in docking station: \"",?.~.name,"\"")); ) f! p5 P# H6 q/ Q
end;
% H$ z( I) {& M else
' T" c5 B& f! Z/ j" w" m5 F- d* V @.Destination := assignLObj[1,row];8 T+ d# q9 n( v: t$ Y- i% H/ B
end;
5 h' D( ~0 }' x! W; i* u newDirection(@);
e7 v2 L F0 B @.HasOrder := true;
5 o: m6 w; B+ Z; E1 U* j end;
$ U/ v+ M3 t# S8 m4 l! l end;3 K" `- m* U/ S1 Z% T
end; -- of the method
$ r N$ `4 h, _, w* w: \! N5 n |