/* called by: entrance ctrl of the object 'track'
. f8 ^% e7 Q* ? X8 s*/) k& w+ V# G% H
is$ e! M" a* n5 \" i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ f7 r4 v; M. z. R' K9 q; O
do/ i6 O1 H3 l1 k2 b, I, y$ U9 r$ M
Lan := rootfolder.Internal.Tools.AOLlanguage;
' x- d$ r9 t, C if current = @.Destination -- else return
* L3 t/ ~! g3 L then& P2 {9 G! O. M. \" ]; e8 Q
@.Destination := void;4 y1 L4 q. e. g7 W
if @.occupied then: l" u( O# ~% t
part := @.cont;4 Z7 l5 J5 p+ ~7 ^+ ^9 G
@.transpOrder := void;
- S% k s7 h8 I Z0 v( r) Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; J- u# i6 N: j
@,root.eventcontroller.simTime);
$ A2 p- b% O7 s6 v @.HasOrder := false;' u% P( K$ {4 z4 {+ M
@.DrivingHome := true;
: V( K# H/ R# t8 I0 Q7 S1 } rgManager.tryToStartTransOrder;
$ k9 @; p2 ~' x. f if @.Destination = void
3 e3 x8 g7 K/ t6 u' h then -- no transport order for vehicle @
: H' j% x" W6 o6 t' Z9 V( G8 X @.Destination :=
$ h( X4 C: D& H. B f$ a7 m4 `) B rgManager.nearestFreeStation(@,track.~);
' g% B" O( l: M0 D newDirection(@); 5 f+ t9 `6 e4 {7 R* ^' b
if @.Destination /= void then
0 H6 D, _( v8 l) c6 b @.Destination.NumReservation :=6 s2 P8 ~1 a3 J. h, X
@.Destination.NumReservation + 1;' {" b& u" l* g" O6 r: T A) ~
end;7 A# Z6 ^' w' N' Q+ G
@.CurrIcon := "drivingHome";
6 [# L/ Y$ ?( c; f! U @.DrivingHome := true;
3 T4 G; w6 O+ d- J$ c, s end;
. ~9 s5 i0 r: Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station) q3 B' d3 B; R8 d$ v6 }) w
part := @.transpOrder;6 L; q; T( e' _& e# p6 P& D( `9 B
part.move(@);-- load part3 l, ]5 \5 p% X+ l+ A/ T: }
@.CurrIcon := "load";5 P. k' y# g2 m6 e0 c
GlobalDistObj := part.globDestination;+ h# x+ n8 `+ {8 g
assignLObj := rgmanager.rgAssignL;
0 R. s% J7 Y% z5 c( p row := assignLObj.getRowNo(GlobalDistObj);
2 x- F7 L B; ^5 W0 _ if Row = -1 then -- since 70
# l( m4 O% U6 B if lan=1 then
. j7 f, Z& D" h! j, \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. W3 P- Q' ~ y' g) A( P! T# O% Y. M
to_str("in der Andockstation: \"",?.~.name,"\""));9 y6 \* U# ~" R& t3 Z. V
else
( i+ \$ l8 t }% a2 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; `& T- w' d7 ~7 ^! P# u) ]
to_str("in docking station: \"",?.~.name,"\"")); 8 G- ~7 W2 s @; e/ `! O' \
end;
% H& c7 y. r' N+ w! O else
! U7 [) y8 Q9 I; o @.Destination := assignLObj[1,row];
" c2 z: x- p; H) U4 s end;
0 }. J y% [6 g- d7 s newDirection(@);8 u9 n: U: q4 s
@.HasOrder := true;; @. W' [4 F" y; v' P& H2 ^7 `
end;
$ n( j! x0 e7 A5 @) R$ A+ H! k end;1 I. F2 j. o+ z0 O
end; -- of the method: f: ^# Q" P0 M. `6 Z1 S4 Q
|