Adaptagrams
|
Incremental solver for Variable Placement with Separation Constraints problem instance. More...
#include <solve_VPSC.h>
Public Member Functions | |
bool | satisfy () |
Results in an approximate solution subject to the constraints. More... | |
bool | solve () |
Results in an optimum solution subject to the constraints. More... | |
void | addConstraint (Constraint *constraint) |
Adds a constraint to the existing VPSC solver. More... | |
Public Member Functions inherited from vpsc::Solver | |
Variables const & | getVariables () |
Returns the Variables in this problem instance. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from vpsc::Solver | |
void | copyResult () |
Incremental solver for Variable Placement with Separation Constraints problem instance.
This class attempts to solve a least-squares problem subject to a set of sepation constraints. The solve() and satisfy() methods return true if any constraints are active, in both cases false means an unconstrained optimum has been found. This is an incremental version of that allows refinement after blocks are moved. This version is preferred if you are using VPSC in an interactive context.
void vpsc::IncSolver::addConstraint | ( | Constraint * | constraint | ) |
Adds a constraint to the existing VPSC solver.
constraint | The new additional constraint to add. |
References vpsc::Constraint::left, and vpsc::Constraint::right.
Referenced by cola::ConstrainedFDLayout::makeFeasible().
|
virtual |
Results in an approximate solution subject to the constraints.
incremental version of satisfy that allows refinement after blocks are moved.
Note: there is a special case to handle when the most violated constraint is between two variables in the same block. Then, we must split the block over an active constraint between the two variables. We choose the constraint with the most negative lagrangian multiplier.
Reimplemented from vpsc::Solver.
References vpsc::Constraint::equality, vpsc::Constraint::left, vpsc::Constraint::right, and vpsc::Constraint::unsatisfiable.
Referenced by cola::ConstrainedFDLayout::makeFeasible().
|
virtual |
Results in an optimum solution subject to the constraints.
Reimplemented from vpsc::Solver.