Graphviz 13.0.0~dev.20241222.1117
|
#include <solve_VPSC.h>
Public Member Functions | |
void | satisfy () |
void | solve () |
void | moveBlocks () |
void | splitBlocks () |
IncVPSC (const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[]) | |
Public Member Functions inherited from VPSC | |
VPSC (const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[]) | |
virtual | ~VPSC ()=default |
Data Fields | |
unsigned | splitCnt |
Additional Inherited Members | |
Protected Member Functions inherited from VPSC | |
void | printBlocks () |
Protected Attributes inherited from VPSC | |
Blocks | bs |
Constraint ** | cs |
unsigned | m |
Definition at line 47 of file solve_VPSC.h.
IncVPSC::IncVPSC | ( | const unsigned | n, |
Variable * | vs[], | ||
const unsigned | m, | ||
Constraint * | cs[] | ||
) |
Definition at line 40 of file solve_VPSC.cpp.
void IncVPSC::moveBlocks | ( | ) |
Definition at line 215 of file solve_VPSC.cpp.
References VPSC::bs, LOGFILE, and RECTANGLE_OVERLAP_LOGGING.
Referenced by splitBlocks().
|
virtual |
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.
Definition at line 172 of file solve_VPSC.cpp.
References Constraint::active, Variable::block, VPSC::bs, Blocks::cleanup(), VPSC::cs, Constraint::left, LOGFILE, VPSC::m, Block::merge(), VPSC::printBlocks(), RECTANGLE_OVERLAP_LOGGING, Constraint::right, Constraint::slack(), Block::splitBetween(), and splitBlocks().
Referenced by solve().
|
virtual |
Calculate the optimal solution. After using satisfy() to produce a feasible solution, refine() examines each block to see if further refinement is possible by splitting the block. This is done repeatedly until no further improvement is possible.
Reimplemented from VPSC.
Definition at line 142 of file solve_VPSC.cpp.
References VPSC::bs, Blocks::cost(), LOGFILE, RECTANGLE_OVERLAP_LOGGING, satisfy(), and splitBlocks().
void IncVPSC::splitBlocks | ( | ) |
Definition at line 229 of file solve_VPSC.cpp.
References Variable::block, VPSC::bs, Blocks::cleanup(), Block::deleted, Constraint::left, Constraint::lm, LOGFILE, moveBlocks(), Block::posn, RECTANGLE_OVERLAP_LOGGING, Constraint::right, Block::split(), and splitCnt.
Referenced by satisfy(), and solve().
unsigned IncVPSC::splitCnt |
Definition at line 49 of file solve_VPSC.h.
Referenced by splitBlocks().