![]() |
MAiNGO
|
Struct for storing information about constraints. More...
#include <constraint.h>
Public Member Functions | |
Constraint () | |
Default conststructor. More... | |
Constraint (const CONSTRAINT_TYPE typeIn, const unsigned indexOriginalIn, const unsigned indexTypeIn, const unsigned indexNonconstantIn, const unsigned indexTypeNonconstantIn, const std::string &nameIn="") | |
Conststructor for non-constant constraints with a possible name. More... | |
Constraint (const CONSTRAINT_TYPE typeIn, const unsigned indexOriginalIn, const unsigned indexTypeIn, const unsigned indexConstantIn, const unsigned indexTypeConstantIn, const bool isConstantIn, const bool isFeasibleIn, const double valueIn, const std::string &nameIn="") | |
Conststructor for constant constraints with a possible name. More... | |
Constraint (const Constraint &)=default | |
Constraint & | operator= (const Constraint &constraintIn)=default |
Public Attributes | |
std::string | name |
double | constantValue |
unsigned | nparticipatingVariables |
std::vector< unsigned > | participatingVariables |
Constraint properties | |
CONSTRAINT_TYPE | type |
CONSTRAINT_CONVEXITY | convexity |
CONSTRAINT_MONOTONICITY | monotonicity |
CONSTRAINT_DEPENDENCY | dependency |
bool | isConstant |
bool | isFeasible |
Constraint indices | |
unsigned int | indexOriginal |
unsigned int | indexNonconstant |
unsigned int | indexNonconstantUBP |
unsigned int | indexConstant |
unsigned int | indexLinear |
unsigned int | indexNonlinear |
unsigned int | indexType |
unsigned int | indexTypeNonconstant |
unsigned int | indexTypeConstant |
Struct for storing information about constraints.
This struct stores constraint properties such as constraint type, convexity ,monotonicity. It also stores several indices for easier access to the correct constraint such as the index in the originalFunctions which was read in from the model, index in the constantFunctions vector, index in the nonConstantFunctions vector, index among linear functions, and index among nonlinear function. Moreover, it holds the type of a constraint, e.g., linear, quadratic, bilinear etc., the number of participating variables in the constraint, and the number of (non)linearly participating variables in the given constraint This struct does not hold the FFVar value of the constraint.
|
inline |
Default conststructor.
|
inline |
Conststructor for non-constant constraints with a possible name.
|
inline |
Conststructor for constant constraints with a possible name.
|
default |
Use default copy constructor
|
default |
Use default copy constructor
double maingo::Constraint::constantValue |
Value of the constraint (only used if the constraint is constant)
CONSTRAINT_CONVEXITY maingo::Constraint::convexity |
Convexity of the constraint
CONSTRAINT_DEPENDENCY maingo::Constraint::dependency |
Dependency of the constraint
unsigned int maingo::Constraint::indexConstant |
Index of the constraint among constant constraints
unsigned int maingo::Constraint::indexLinear |
Index of the constraint among linear constraints
unsigned int maingo::Constraint::indexNonconstant |
Index of the constraint among non-constant constraints (objective is always non-constant!)
unsigned int maingo::Constraint::indexNonconstantUBP |
Index of the constraint among non-constant constraints (objective is always non-constant!) for the UBS
unsigned int maingo::Constraint::indexNonlinear |
Index of the constraint among nonlinear constraints
unsigned int maingo::Constraint::indexOriginal |
Index of the constraint when read in by evaluate, 0 = obj, 1 - x ineq, x+1 - y eq etc. For outputs this is the original ordering of outputs when read in the first time
unsigned int maingo::Constraint::indexType |
Index of the constraint among constraints of the same type
unsigned int maingo::Constraint::indexTypeConstant |
Index of the constraint among constant constraints of the same type
unsigned int maingo::Constraint::indexTypeNonconstant |
Index of the constraint among nonconstant constraints of the same type
bool maingo::Constraint::isConstant |
Constness of constraint
bool maingo::Constraint::isFeasible |
Flag whether the constraint is feasible (only used if the constraint is constant)
CONSTRAINT_MONOTONICITY maingo::Constraint::monotonicity |
Monotonicity of the constraint
std::string maingo::Constraint::name |
Name of the constraint
unsigned maingo::Constraint::nparticipatingVariables |
Number of different participating variables in the constraint
std::vector<unsigned> maingo::Constraint::participatingVariables |
Vector holding the indices of variables participating in the constraint
CONSTRAINT_TYPE maingo::Constraint::type |
Type of the constraint