candidate exclusion constraint structure
More...
#include <AdditionalConstraints.h>
|
| AdditionalConstraints (std::shared_ptr< ProblemGenerationLog::ProblemGenerationLogger > logger) |
| default constructor for struct AdditionalConstraints
|
|
| AdditionalConstraints (std::string constraints_file_path, std::shared_ptr< ProblemGenerationLog::ProblemGenerationLogger > logger) |
| AdditionalConstraints constructor from an ini file path.
|
|
void | SetConstraintsFile (std::string const &constraints_file_path) |
|
void | ReadConstraintsFile () |
|
void | addVariableToBinarise (const std::string &oldVarName_p, const std::string &binVarName_p) |
| adds a binary variable to be created and links it to the corresponding variable
|
|
void | addVariablesToBinarise (std::map< std::string, std::string > const &variables_section) |
| adds a binary variable to be created and links it to the corresponding variable
|
|
std::map< std::string, std::string > const & | getVariablesToBinarise () const |
| getter for AdditionalConstraints::_variablesToBinarise
|
|
void | constructAdditionalConstraints (const std::string §ionName_l, const std::map< std::string, std::string > &constarintsSection_l) |
| the method is responsible for creating and filling constraints
|
|
std::string | checkAndReturnConstraintName (const std::string §ionName_l, const std::map< std::string, std::string > &constarintsSection_l) const |
| the method is responsible for checking that section has defined a unique constraint name
|
|
std::string | checkAndReturnSectionSign (const std::string §ionName_l, const std::map< std::string, std::string > &constarintsSection_l) const |
| the method is responsible for checking that section has defined a sign
|
|
double | checkAndReturnSectionRhs (const std::string §ionName_l, const std::map< std::string, std::string > &constarintsSection_l) const |
| the method is responsible for checking that section has defined a rhs
|
|
candidate exclusion constraint structure
inherites from a map where keys are unique constraint names and values are the additional constraints
◆ AdditionalConstraints()
AdditionalConstraints constructor from an ini file path.
- Parameters
-
constraints_file_path | String corresponding to the additional constraints file path |
◆ addVariablesToBinarise()
void AdditionalConstraints::addVariablesToBinarise |
( |
std::map< std::string, std::string > const & | variables_section | ) |
|
adds a binary variable to be created and links it to the corresponding variable
- Parameters
-
variables_section | std::map<std::string, std::string> whose value is the name of the binary variables to create and whose key is the corresponding existing variable to link toe |
adds entries to the AdditionalConstraints::_variablesToBinarise
◆ addVariableToBinarise()
void AdditionalConstraints::addVariableToBinarise |
( |
const std::string & | oldVarName_p, |
|
|
const std::string & | binVarName_p ) |
adds a binary variable to be created and links it to the corresponding variable
- Parameters
-
oldVarName_p | String name of the old variable |
binVarName_p | String name of the new binary variable to link to the old existing one |
adds an entry to the AdditionalConstraints::_variablesToBinarise
◆ checkAndReturnConstraintName()
std::string AdditionalConstraints::checkAndReturnConstraintName |
( |
const std::string & | sectionName_l, |
|
|
const std::map< std::string, std::string > & | constarintsSection_l ) const |
|
nodiscard |
the method is responsible for checking that section has defined a unique constraint name
- Parameters
-
std::string | sectionName_l the section name |
constarintsSection_l | is a std::map<std::string, std::string> where keys are the constraints entries ("name", "sign", "rhs") |
- Returns
- std::string the constraint name
◆ checkAndReturnSectionRhs()
double AdditionalConstraints::checkAndReturnSectionRhs |
( |
const std::string & | sectionName_l, |
|
|
const std::map< std::string, std::string > & | constarintsSection_l ) const |
|
nodiscard |
the method is responsible for checking that section has defined a rhs
- Parameters
-
std::string | sectionName_l the section name |
constarintsSection_l | is a std::map<std::string, std::string> where keys are the constraints entries ("name", "sign", "rhs") |
- Returns
- std::string the rhs
◆ checkAndReturnSectionSign()
std::string AdditionalConstraints::checkAndReturnSectionSign |
( |
const std::string & | sectionName_l, |
|
|
const std::map< std::string, std::string > & | constarintsSection_l ) const |
|
nodiscard |
the method is responsible for checking that section has defined a sign
- Parameters
-
std::string | sectionName_l the section name |
constarintsSection_l | is a std::map<std::string, std::string> where keys are the constraints entries ("name", "sign", "rhs") |
- Returns
- std::string the constraint sign
◆ constructAdditionalConstraints()
void AdditionalConstraints::constructAdditionalConstraints |
( |
const std::string & | sectionName_l, |
|
|
const std::map< std::string, std::string > & | constarintsSection_l ) |
the method is responsible for creating and filling constraints
- Parameters
-
std::string | sectionName_l the section name |
constarintsSection_l | is a std::map<std::string, std::string> where keys are the constraints entries ("name", "sign", "rhs") |
◆ getVariablesToBinarise()
std::map< std::string, std::string > const & AdditionalConstraints::getVariablesToBinarise |
( |
| ) |
const |
|
nodiscard |
getter for AdditionalConstraints::_variablesToBinarise
- Returns
- std::map<std::string, std::string> whose value is the name of the binary variables to create and whose key is the corresponding existing variable to link to
The documentation for this struct was generated from the following files:
- src/cpp/lpnamer/problem_modifier/include/antares-xpansion/lpnamer/problem_modifier/AdditionalConstraints.h
- src/cpp/lpnamer/problem_modifier/AdditionalConstraints.cpp