MAiNGO
maingo::OutputVariable Struct Reference

Struct for storing additional output variables. More...

#include <outputVariable.h>

Public Member Functions

 OutputVariable (const std::string descIn, const mc::FFVar valueIn)
 Constructor for use in the evaluate function. More...
 
 OutputVariable (const mc::FFVar valueIn, const std::string descIn)
 Constructor for use in the evaluate function. More...
 
 OutputVariable (const std::tuple< mc::FFVar, std::string > inTuple)
 Constructor for use in the evaluate function. More...
 
 OutputVariable (const std::tuple< std::string, mc::FFVar > inTuple)
 Constructor for use in the evaluate function. More...
 
 ~OutputVariable ()=default
 Destructor. More...
 
 OutputVariable (const OutputVariable &variableIn)=default
 Copy constructor. More...
 
 OutputVariable (OutputVariable &&variableIn)=default
 Move constructor. More...
 
OutputVariableoperator= (const OutputVariable &variableIn)=default
 Copy assignment operator. More...
 
OutputVariableoperator= (OutputVariable &&variableIn)=default
 Move assignment operator. More...
 
bool operator== (const OutputVariable &other) const
 Equality comparison operator. More...
 

Public Attributes

mc::FFVar value = {}
 
std::string description = {}
 

Detailed Description

Struct for storing additional output variables.

Since the model evaluation can contain several intermediate variables that appear neither as optimization variables nor as constraints directly, but the value of which might be interesting at the optimal solution point, a vector of these structs can be used in the EvaluationContainer to give such additional output after the problem is solved.

Constructor & Destructor Documentation

◆ OutputVariable() [1/6]

maingo::OutputVariable::OutputVariable ( const std::string  descIn,
const mc::FFVar  valueIn 
)
inline

Constructor for use in the evaluate function.

Parameters
[in]descInis a string describing the variable
[in]valueInis the value of the variable at the current point

◆ OutputVariable() [2/6]

maingo::OutputVariable::OutputVariable ( const mc::FFVar  valueIn,
const std::string  descIn 
)
inline

Constructor for use in the evaluate function.

Parameters
[in]valueInis the value of the variable at the current point
[in]descInis a string describing the variable

◆ OutputVariable() [3/6]

maingo::OutputVariable::OutputVariable ( const std::tuple< mc::FFVar, std::string >  inTuple)
inline

Constructor for use in the evaluate function.

Parameters
[in]inTupleis a tuple containing the value of the variable at the current point and a descriptive string

◆ OutputVariable() [4/6]

maingo::OutputVariable::OutputVariable ( const std::tuple< std::string, mc::FFVar >  inTuple)
inline

Constructor for use in the evaluate function.

Parameters
[in]inTupleis a tuple containing the value of the variable at the current point and a descriptive string

◆ ~OutputVariable()

maingo::OutputVariable::~OutputVariable ( )
default

Destructor.

◆ OutputVariable() [5/6]

maingo::OutputVariable::OutputVariable ( const OutputVariable variableIn)
default

Copy constructor.

Parameters
[in]variableInis the output variable to be copied

◆ OutputVariable() [6/6]

maingo::OutputVariable::OutputVariable ( OutputVariable &&  variableIn)
default

Move constructor.

Parameters
[in]variableInis the output variable to be moved

Member Function Documentation

◆ operator=() [1/2]

OutputVariable& maingo::OutputVariable::operator= ( const OutputVariable variableIn)
default

Copy assignment operator.

Parameters
[in]variableInis the output variable to be copied

◆ operator=() [2/2]

OutputVariable& maingo::OutputVariable::operator= ( OutputVariable &&  variableIn)
default

Move assignment operator.

Parameters
[in]variableInis the output variable to be moved

◆ operator==()

bool maingo::OutputVariable::operator== ( const OutputVariable other) const
inline

Equality comparison operator.

Member Data Documentation

◆ description

std::string maingo::OutputVariable::description = {}

Description, e.g. name of variable

◆ value

mc::FFVar maingo::OutputVariable::value = {}

Variable object


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