Algorimthmic datas associated the \fBTrackSegment\fP\&.
The \fBDataNegociate\fP object contains all the informations the negociation algorithm needs to know about a \fBTrackSegment\fP\&. Those informations mostly describe the slackening and ripup state of that segment\&.
.PP
\fBState related datas:\fP
.IP"\(bu"2
The ripup count in the current state\&. The count is reset to zero at each state transition\&.
.IP"\(bu"2
The slackening state (see \fBDataNegociate::SlackState\fP)\&. The state indicate the \fBnext\fP topological modification to be applied on the segment should the ripup count reach it's maximal value\&.
.IP"\(bu"2
The associated \fBRoutingEvent\fP\&. If no \fBRoutingEvent\fP is present, it means the segment has been either successufully placed or the algorithm has given up trying to\&. If present, it is a \fIpending\fP request for placement\&.
.PP
.PP
\fBTopological related datas:\fP
.IP"\(bu"2
\fCleftMinExtend\fP, the potential minimal position of the segment left extension\&. May not be reachable due to other topological constraints\&.
.IP"\(bu"2
\fCrightMinExtend\fP, the potential minimal position of the segment right extension\&.
.IP"\(bu"2
\fCterminals\fP, the number of terminals attached to this segment\&.
.IP"\(bu"2
\fCattractors\fP, a table of coordinates of the end points of the perpandiculars to this segment\&. Used to compute the wiring delta if we move the axis of the segment\&.
.IP"\(bu"2
\fCperpandiculars\fP, a \fCvector\fP of the perpandicular \fBTrackElement\fP\&. This is a fast-access cache\&. It must be updated each time the topology of the net is modificated\&.
.IP"\(bu"2
\fCperpandicularFree\fP, the free interval defined by the perpandiculars, that is for the sgement axis\&.
All those informations are computed and updated by the \fBDataNegociate::update()\fP method, which relies on:
.IP"\(bu"2
AutoSegment::getTopologicalInfos()
.IP"\(bu"2
AutoSegment::getTerminalCount()
.PP
.PP
They must be reviewed as they do not take advantage of the new AutoSegment structuration\&.
.PP
For every perpandicular set of AutoSegment to the \fBTrackSegment\fP we want to place, get the coordinates of the extremity not connected to the segment and put that coordinate into a table associated with it's \fIspin\fP\&. The \fIspin\fP tells if the extremity is attracting the segment \fIup\fP or \fIdown\fP (for an horizontal segment)\&. The \fIspin\fP is incremented for up and decremented for down\&. After all the extremities have been processeds, we took into account only the coordinates with a non-zero spin, which means they truly attract the segment (whatever the direction)\&.
.PP
Fig 1: Attractors Computation The \fIwiring delta\fP is the total wire length needed to connect from the attractors to the segment, should it be placed on \fCaxis\fP\&.
.PP
Fig 2: Wiring Delta
.SH"Modifications History"
.PP
Main changes in \fBDataNegociate\fP class design:
.IP"\(bu"2
Merge in the separate class \fCCost\fP\&.
.IP"\(bu"2
Suppress the \fCSlackState::Desalignate\fP, due to the simplificated structure of the AutoSegment/AutoContacts (no more collapseds, or forced alignements)\&.
.PP
.SH"Member Enumeration Documentation"
.PP
.SS"enum \fBSlackState\fP"
Describe the various stages of a \fBTrackSegment\fP slackening\&. The numerical values are choosen so we can increment them as a counter\&.
.PP
\fBEnumerator\fP
.in+1c
.TP
\fB\fIRipupPerpandiculars \fP\fP
Force perpandiculars to be riped up as well as the \fBTrackSegment\fP, then schedule the placement of the \fBTrackSegment\fP\fIbefore\fP it's perpandiculars\&.
.TP
\fB\fIMinimize \fP\fP
If the \fBTrackSegment\fP is made of multiple TrackSegments with a forced alignement, suppress the alignement constraint\&.
.PP
This should be deprecated now\&. Try to displace the perpandiculars so the \fBTrackSegment\fP is reduced to it's minimal length\&.
.TP
\fB\fIDogleg \fP\fP
Break the segment into two smaller ones\&.
.TP
\fB\fISlacken \fP\fP
Create additional wiring so threre is no more contraints transmitted by the perpandiculars or the terminal contacts\&.
.TP
\fB\fIConflictSolveByHistory \fP\fP
Try to solve a conflict between a set of global segments by analysing the event/ripup history\&. See \fBSegmentFsm::conflictSolveByHistory()\fP\&.
.TP
\fB\fIConflictSolveByPlaceds \fP\fP
Try to solve a conflict between a set of global segments by analysing the current track context\&. See \fBSegmentFsm::conflictSolveByPlaceds()\fP\&.
.TP
\fB\fILocalVsGlobal \fP\fP
To be reviewed\&.
.TP
\fB\fIMoveUp \fP\fP
The segment is to be moved up (if possible)\&.
.TP
\fB\fIMaximumSlack \fP\fP
The final state, topological modifications are exhausteds, if it cannot place at this point, it never will\&.
.TP
\fB\fIUnimplemented \fP\fP
Used only during the development stage, telling that the state is not available yet\&.
.TP
\fB\fIRepair \fP\fP
The router is in repair mode\&.
.SH"Member Function Documentation"
.PP
.SS"bool hasRoutingEvent () const\fC [inline]\fP"
\fBReturns:\fP\fBtrue\fP if there is a pending \fBRoutingEvent\fP for this \fBTrackSegment\fP\&.
.PP
Referenced by NegociateWindow::addRoutingEvent(), and TrackSegment::reschedule()\&.
\fBReturns:\fP The pending \fBRoutingEvent\fP\&. \fCNULL\fP will be returned if there is no pending event, meaning that the segment has been placed\&.
.PP
Referenced by SegmentAction::doAction(), Manipulator::makeDogleg(), Manipulator::relax(), TrackSegment::reschedule(), RoutingEvent::reschedule(), and TrackSegment::swapTrack()\&.
\fBReturns:\fP The range of legal positions generated only by the perpandiculars\&.
.SS"void setState (unsigned int state, unsigned int flags = \fC0\fP)\fC [inline]\fP"
Set or reset the slacking state (see SlackState)\&. If the \fCstate\fP is the same as the current one, the state count is incremented\&. If the new state changes or \fCflags\fP contain KtReset, the state count is reset to one\&.
.PP
Referenced by SegmentAction::doAction(), Manipulator::relax(), Manipulator::repackPerpandiculars(), RoutingEvent::reschedule(), Manipulator::ripupPerpandiculars(), and RoutingEvent::setState()\&.