Do not take into account segment when the overlap is zero...

* Bug: In Katana::Track::addOverlapCost(), check that the overlap is
    not *exactly* zero (exact interval fitting), and do not consider
    them as obstacle (they where raising the infinite flag when they
    where *fixed*).
This commit is contained in:
Jean-Paul Chaput 2018-03-27 18:04:43 +02:00
parent 45f941719d
commit 5a02d1ad3b
2 changed files with 6 additions and 2 deletions

View File

@ -304,7 +304,7 @@ namespace Katana {
for ( ; (mbegin < _markers.size())
and (_markers[mbegin]->getSourceU() <= interval.getVMax()) ; mbegin++ ) {
cdebug_log(155,0) << "| @" << DbU::getValueString(_axis) << _markers[mbegin] << endl;
cdebug_log(155,0) << "| @" << DbU::getValueString(_axis) << " " << _markers[mbegin] << endl;
if (_markers[mbegin]->getNet() != cost.getNet()) {
cdebug_log(155,0) << "* Mark: @" << DbU::getValueString(_axis) << " " << _markers[mbegin] << endl;
cost.incTerminals( _markers[mbegin]->getWeight(this) );
@ -324,8 +324,11 @@ namespace Katana {
for ( ; begin < end ; begin++ ) {
Interval overlap = interval.getIntersection( _segments[begin]->getCanonicalInterval() );
cdebug_log(155,0) << "overlap:" << overlap << " size:" << overlap.getSize() << endl;
if (overlap.getSize() == 0) continue;
if (_segments[begin]->getNet() == cost.getNet()) {
cdebug_log(155,0) << "overlap:" << overlap << " size:" << overlap.getSize() << endl;
cdebug_log(155,0) << "Same net overlap, increase delta shared." << endl;
cost.incDeltaShared ( overlap.getSize() );
}
_segments[begin]->incOverlapCost( cost );

View File

@ -170,6 +170,7 @@ namespace Katana {
return std::get<1>( _tracks[i + ((flags & Symmetric) ? _span : 0)] );
}
size_t TrackCost::getEnd ( size_t i, uint32_t flags ) const
{
if (i >= _span) return Track::npos;