MAiNGO
maingo::Constraint Struct Reference

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
 
Constraintoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Constraint() [1/4]

maingo::Constraint::Constraint ( )
inline

Default conststructor.

◆ Constraint() [2/4]

maingo::Constraint::Constraint ( const CONSTRAINT_TYPE  typeIn,
const unsigned  indexOriginalIn,
const unsigned  indexTypeIn,
const unsigned  indexNonconstantIn,
const unsigned  indexTypeNonconstantIn,
const std::string &  nameIn = "" 
)
inline

Conststructor for non-constant constraints with a possible name.

◆ Constraint() [3/4]

maingo::Constraint::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 = "" 
)
inline

Conststructor for constant constraints with a possible name.

◆ Constraint() [4/4]

maingo::Constraint::Constraint ( const Constraint )
default

Use default copy constructor

Member Function Documentation

◆ operator=()

Constraint& maingo::Constraint::operator= ( const Constraint constraintIn)
default

Use default copy constructor

Member Data Documentation

◆ constantValue

double maingo::Constraint::constantValue

Value of the constraint (only used if the constraint is constant)

◆ convexity

CONSTRAINT_CONVEXITY maingo::Constraint::convexity

Convexity of the constraint

◆ dependency

CONSTRAINT_DEPENDENCY maingo::Constraint::dependency

Dependency of the constraint

◆ indexConstant

unsigned int maingo::Constraint::indexConstant

Index of the constraint among constant constraints

◆ indexLinear

unsigned int maingo::Constraint::indexLinear

Index of the constraint among linear constraints

◆ indexNonconstant

unsigned int maingo::Constraint::indexNonconstant

Index of the constraint among non-constant constraints (objective is always non-constant!)

◆ indexNonconstantUBP

unsigned int maingo::Constraint::indexNonconstantUBP

Index of the constraint among non-constant constraints (objective is always non-constant!) for the UBS

◆ indexNonlinear

unsigned int maingo::Constraint::indexNonlinear

Index of the constraint among nonlinear constraints

◆ indexOriginal

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

◆ indexType

unsigned int maingo::Constraint::indexType

Index of the constraint among constraints of the same type

◆ indexTypeConstant

unsigned int maingo::Constraint::indexTypeConstant

Index of the constraint among constant constraints of the same type

◆ indexTypeNonconstant

unsigned int maingo::Constraint::indexTypeNonconstant

Index of the constraint among nonconstant constraints of the same type

◆ isConstant

bool maingo::Constraint::isConstant

Constness of constraint

◆ isFeasible

bool maingo::Constraint::isFeasible

Flag whether the constraint is feasible (only used if the constraint is constant)

◆ monotonicity

CONSTRAINT_MONOTONICITY maingo::Constraint::monotonicity

Monotonicity of the constraint

◆ name

std::string maingo::Constraint::name

Name of the constraint

◆ nparticipatingVariables

unsigned maingo::Constraint::nparticipatingVariables

Number of different participating variables in the constraint

◆ participatingVariables

std::vector<unsigned> maingo::Constraint::participatingVariables

Vector holding the indices of variables participating in the constraint

◆ type

CONSTRAINT_TYPE maingo::Constraint::type

Type of the constraint


The documentation for this struct was generated from the following file: