// -*- C++ -*- namespace Kite { /*! \class TrackSegmentCost * \brief The cost calculator of a TrackSegment. * * \section secMiscAttributes Miscellaneous attributes * * Net instead of \TrackSegment : what we will access the most is the * \TrackSegment owner, so it's it we keep as an attribute. The consequence * beeing that the update member function should be given the \TrackSegment * as argument. * * * \section secBoundInterval Bound interval cost component * * This is the minimal interval to which the \TrackSegment can be * shrunk without breaking the net's connexity. The interval is * computed by AutoSegment::getTopologicalInfos(). And the computation * is as follow : *
    *
  1. Each AutoContact has a constraint box which defines * the legal area where the AutoContact could be positionned. *
  2. The left bound is the minimum of all constraints * boxes max. *
  3. Conversely, the right bound is the maximum of all * constraints boxes min. *
* \image html TrackSegmentCost-1.png "Left bound & right bound" * \image latex TrackSegmentCost-1.pdf "Left bound & right bound" width=0.6\textwidth * * \image html TrackSegmentCost-2.png "Maximal shrink example" * \image latex TrackSegmentCost-2.pdf "Maximal shrink example" width=0.6\textwidth * * * \section secCostAttractors Attractors and differential wirelength cost component * * The goal of attractors is to compute the wirelength variation whenever * the \TrackSegment changes of supporting \Track. * * The \TrackSegment is connected to perpandicular \TrackSegment, attractors * are the extremity position of those perpandicular which are not * connected to the reference \TrackSegment. The true rule is more complex * an is computed by AutoSegment::isTopologicalBound(). * * \image html TrackSegmentCost-3.png "Attractors example" * \image latex TrackSegmentCost-3.pdf "Attractors example" width=0.6\textwidth * * In the attractor example, the reference horizontal \TrackSegment (in * black) which is made of (at least) three \c AutoSegments, is connected * to five vertical canonical \TrackSegment (labelled \e A through \e E). * * \e Left attractors are below the horizontal \TrackSegment axis, * \e right ones are above. Punctual attractors are exactly on the axis. * * As both \TrackSegment and \c AutoSegment are orienteds, source is always * the minimum and target always the maximum. * * The attractors are deduced as follow : * * The concept of left/right and punctual flavor for attractors are only * used dured construction. Once built only the coordinate remains. * * The extremity of perpandicular canonical \TrackSegment connected to * the reference segment do not generate attractors because they move * with it. But there are exception to this behavior : one is that * the extremity is in fact anchored to a terminal and will not move. * This is the work of the AutoSegment::isTopologicalBound() function * to check for thoses exceptions, in which case an attractor will be * created. * * * \section secTerminalCount The terminal count cost component * * The number of terminals directly connected to this \TrackSegment. * Computation relies on AutoSegment::getTerminalCount(). */ /*! \function Net* TrackSegmentCost::getNet () const; * \Return The Net owning this TrackSegment. */ /*! \function unsigned int TrackSegmentCost::getTerminals () const; * \Return The number of terminal directly connected to this \TrackSegment. */ /*! \function DbU::Unit TrackSegmentCost::getWiringDelta ( DbU::Unit axis ) const; * \param axis The axis where to put the TrackSegment. * * \return The total wirelengh needed for perpandicular TrackSegment to connect * with this one sets on axis. The sum of distance to all the * attractors. */ /*! \function void TrackSegmentCost::update ( TrackSegment* trackSegment ); * \param trackSegment the associated \TrackSegment, must be the same as used * in the construction. * * Update the cost calculator after a relative position change. */ } // End of Kite namespace.