Adaptagrams
Public Member Functions | List of all members
vpsc::IncSolver Class Reference

Incremental solver for Variable Placement with Separation Constraints problem instance. More...

#include <solve_VPSC.h>

Inheritance diagram for vpsc::IncSolver:
Inheritance graph
Collaboration diagram for vpsc::IncSolver:
Collaboration graph

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 ()
 

Detailed Description

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.

See also
Solver

Member Function Documentation

◆ addConstraint()

void vpsc::IncSolver::addConstraint ( Constraint constraint)

Adds a constraint to the existing VPSC solver.

Parameters
constraintThe new additional constraint to add.

References vpsc::Constraint::left, and vpsc::Constraint::right.

Referenced by cola::ConstrainedFDLayout::makeFeasible().

Here is the caller graph for this function:

◆ satisfy()

bool vpsc::IncSolver::satisfy ( )
virtual

Results in an approximate solution subject to the constraints.

Returns
true if any constraints are active, or false if an unconstrained

incremental version of satisfy that allows refinement after blocks are moved.

  • move blocks to new positions
  • repeatedly merge across most violated constraint until no more violated constraints exist

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().

Here is the caller graph for this function:

◆ solve()

bool vpsc::IncSolver::solve ( )
virtual

Results in an optimum solution subject to the constraints.

Returns
true if any constraints are active, or false if an unconstrained optimum has been found.

Reimplemented from vpsc::Solver.


The documentation for this class was generated from the following files: