From 5a02d1ad3be069b39e8c0901a29da6ff9adb7ff2 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 27 Mar 2018 18:04:43 +0200 Subject: [PATCH] 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*). --- katana/src/Track.cpp | 7 +++++-- katana/src/TrackCost.cpp | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/katana/src/Track.cpp b/katana/src/Track.cpp index 191d83bd..75c683f0 100644 --- a/katana/src/Track.cpp +++ b/katana/src/Track.cpp @@ -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 ); diff --git a/katana/src/TrackCost.cpp b/katana/src/TrackCost.cpp index 7c47d91c..ee78a0bc 100644 --- a/katana/src/TrackCost.cpp +++ b/katana/src/TrackCost.cpp @@ -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;