Minotaur 0.4.1
Docs for developers
|
#include <PerspList.h>
Public Member Functions | |
PerspList () | |
Default constructor. | |
PerspList (RelaxationPtr rel, EnvPtr env) | |
Constructs from a given relaxation. | |
~PerspList () | |
Destructor. | |
bool | evalConstraint (ConstConstraintPtr cons, VarUbLbPtr boundcons, VariablePtr &binvar) |
Checks if a constraint is a Perspective constraint. | |
bool | separable (ConstConstraintPtr cons, ConstVariablePtr binvar) |
bool | checkVarTypes (const FunctionPtr f, ConstVariablePtr &binvar) |
bool | checkVarsBounds (const FunctionPtr f, ConstVariablePtr binvar, VarUbLbPtr boundcons) |
Checks if the variables are bounded by only one binary variable. | |
bool | checkVarBounds (ConstVariablePtr var, ConstVariablePtr binvar, VarUbLbPtr varbounds) |
Checks if a given variable is bounded by binary variable. | |
void | addConstraint (ConstConstraintPtr cons, VarUbLbPtr boundcons, VariablePtr binvar) |
Add a constraint to the lists. | |
void | generateList () |
Generate list of perspective constraints. | |
bool | initialBinary (ConstVariablePtr var, VarSetPtr binaries) |
UInt | getNumPersp () const |
Get total number of perspective constraints. | |
UInt | getNumConsChecked () const |
Get total number of constraints checked. | |
ConstPerspListStatsPtr | getStats () const |
Get the statistics aboud perspective identification. | |
ConstPerspConsPtr | getPerspCons () const |
Get a pointer to the vector that constains perspective constraints. | |
void | printPersp (ConstConstraintPtr cons, VarUbLbPtr boundcons, ConstVariablePtr binvar) |
Print out the perspective structure. | |
This class identifies the constraints that can be used for perspective cut generation.
bool PerspList::checkVarTypes | ( | const FunctionPtr | f, |
ConstVariablePtr & | binvar | ||
) |
Checks if all the variables are continuous or at most one binary. Otherwise, we cannot generate perspective cuts.
bool PerspList::initialBinary | ( | ConstVariablePtr | var, |
VarSetPtr | binaries | ||
) |
Generate map of variables that are in the initial variable's constraint set.
bool PerspList::separable | ( | ConstConstraintPtr | cons, |
ConstVariablePtr | binvar | ||
) |
Checks if the constraint does not have any multi-variable terms that includes u and x together, i.e. constraint is separable such that f(x) + cu <= 0.