Minotaur 0.4.1
Docs for developers
|
#include <ProbStructure.h>
Public Member Functions | |
ProbStructure () | |
Default constructor. | |
ProbStructure (ProblemPtr p, EnvPtr env) | |
Constructs from a given problem. | |
~ProbStructure () | |
Destructor. | |
bool | evalConstraint (ConstConstraintPtr cons) |
Checks if a variable is a GUB constraint. More... | |
void | addConstraint (ConstConstraintPtr cons) |
Add a constraint to the lists. | |
void | generateLists () |
Generate the lists for GUBs and GUBs corresponding to variables. | |
UInt | getNumGUB () const |
Get total number of GUBs. | |
UInt | getNumVarGUB (ConstVariablePtr var) const |
Get total number of GUBs for a given variable. | |
UInt | getNumConsChecked () const |
Get total number of constraints checked. | |
ConstProbStructStatsPtr | getStats () const |
Get the statistics about GUB identification. | |
ConstConstraintVectorPtr | getVarGUBs (ConstVariablePtr var) const |
Get a pointer to the vector that contains GUBs for a given variable. | |
ConstConstraintVectorPtr | getGUBs () const |
Get a pointer to the vector that contains GUBs. | |
Serdar Yildiz: This class identifies GUB constraints in the given problem. One list contains all the GUB constraints just as they found in the constraint list. Second list is a vector of pairs that is in the format of pair<variable,GUBS> pointers to all the GUBs for the corresponding variable.
bool ProbStructure::evalConstraint | ( | ConstConstraintPtr | cons | ) |
Checks if a variable is a GUB constraint.
Assumption is that: All the GUB functions in the form of ax <= b where b != 0, b > 0 and a/b = 1; We do not consider a constraint if b < 0. May be we should do the same thing we do for b>0 case here. Furthermore, variables can be binary or integer with bounds [0,1].