#include <gamsmodifier.h>
Public Member Functions | |
GAMSModifier () | |
Default constructor. | |
GAMSModifier (const GAMSParameter &gamsPar, GAMSEnum::SymbolUpdateType updType=GAMSEnum::SymbolUpdateType::Inherit) | |
GAMSModifier (const GAMSVariable &gamsVar, GAMSEnum::SymbolUpdateAction updAction, const GAMSParameter &dataSym, GAMSEnum::SymbolUpdateType updType=GAMSEnum::SymbolUpdateType::Inherit) | |
GAMSModifier (const GAMSEquation &gamsEqu, GAMSEnum::SymbolUpdateAction updAction, const GAMSParameter &dataSym, GAMSEnum::SymbolUpdateType updType=GAMSEnum::SymbolUpdateType::Inherit) | |
GAMSModifier & | operator= (const GAMSModifier &other) |
bool | operator!= (const GAMSModifier &other) const |
bool | operator== (const GAMSModifier &other) const |
bool | isValid () const |
GAMSSymbol | gamsSymbol () |
GAMSEnum::SymbolUpdateAction | updAction () |
GAMSParameter | dataSymbol () |
GAMSEnum::SymbolUpdateType | updType () |
bool | isParameter () |
bool | isVariable () |
bool | isEquation () |
Detailed Description
Instances of this class are input to GAMSModelInstance.instatiate(). A GAMSModifier consists either of a GAMSParameter or a triple: A GAMSVariable or GAMSEquation to be modified, the modification action (e.g. . Upper, Lower or Fixed for updating bounds of a variable, or Primal/Dual for updating the level/marginal of a variable or equation mainly used for starting non-linear models from different starting points), and a GAMSParameter that holds the data for modification. In addition the UpdateType can be defined (if ommitted the type defined in the Solve call is used).
Definition at line 47 of file gamsmodifier.h.
Constructor & Destructor Documentation
◆ GAMSModifier() [1/4]
|
inline |
Default constructor.
Definition at line 51 of file gamsmodifier.h.
◆ GAMSModifier() [2/4]
gams::GAMSModifier::GAMSModifier | ( | const GAMSParameter & | gamsPar, |
GAMSEnum::SymbolUpdateType | updType = GAMSEnum::SymbolUpdateType::Inherit |
||
) |
Constructor.
- Parameters
-
gamsPar GAMSParameter in the GAMS model to be modified with data for modification. updType Symbol Update Type.
◆ GAMSModifier() [3/4]
gams::GAMSModifier::GAMSModifier | ( | const GAMSVariable & | gamsVar, |
GAMSEnum::SymbolUpdateAction | updAction, | ||
const GAMSParameter & | dataSym, | ||
GAMSEnum::SymbolUpdateType | updType = GAMSEnum::SymbolUpdateType::Inherit |
||
) |
Constructor.
- Parameters
-
gamsVar GAMSVariable in the GAMS model to be modified. updAction Modification action. dataSym Parameter containing the data for the modification. updType Symbol Update Type.
◆ GAMSModifier() [4/4]
gams::GAMSModifier::GAMSModifier | ( | const GAMSEquation & | gamsEqu, |
GAMSEnum::SymbolUpdateAction | updAction, | ||
const GAMSParameter & | dataSym, | ||
GAMSEnum::SymbolUpdateType | updType = GAMSEnum::SymbolUpdateType::Inherit |
||
) |
Constructor.
- Parameters
-
gamsEqu GAMSEquation in the GAMS model to be modified. updAction Modification action. dataSym GAMSParameter containing the data for the modification. updType Symbol Update Type.
Member Function Documentation
◆ dataSymbol()
GAMSParameter gams::GAMSModifier::dataSymbol | ( | ) |
Get paramter containing the data for the modification.
- Returns
- Returns the GAMSParamter.
◆ gamsSymbol()
GAMSSymbol gams::GAMSModifier::gamsSymbol | ( | ) |
Get symbol of the GAMS model to be modified.
- Returns
- Returns the GAMSSymbol.
◆ isEquation()
bool gams::GAMSModifier::isEquation | ( | ) |
Checks if a modifier is related to a GAMSDEquation.
- Returns
true
if it is realted to an GAMSParameter; otherwisefalse
.
◆ isParameter()
bool gams::GAMSModifier::isParameter | ( | ) |
Checks if a modifier is related to a GAMSParameter.
- Returns
true
if it is realted to an GAMSParameter; otherwisefalse
.
◆ isValid()
bool gams::GAMSModifier::isValid | ( | ) | const |
The GAMSModifier is invalid, if it has no assignment to a GAMSSymbol.
- Returns
true
if the GAMModifier has been initialized; otherwisefalse
.
◆ isVariable()
bool gams::GAMSModifier::isVariable | ( | ) |
Checks if a modifier is related to a GAMSVariable.
- Returns
true
if it is realted to an GAMSParameter; otherwisefalse
.
◆ operator!=()
bool gams::GAMSModifier::operator!= | ( | const GAMSModifier & | other | ) | const |
Compares two GAMSModifier objects.
- Parameters
-
other Another GAMSModifier to compare to.
- Returns
- Returns
true
if the two GAMSModifier are different; otherwisefalse
.
◆ operator=()
GAMSModifier & gams::GAMSModifier::operator= | ( | const GAMSModifier & | other | ) |
Assigns a GAMSModifier.
- Parameters
-
other Another GAMSModifier used as data source.
- Returns
- Returns the assigned GAMSModifier (*this).
◆ operator==()
bool gams::GAMSModifier::operator== | ( | const GAMSModifier & | other | ) | const |
Compares two GAMSModifier objects.
- Parameters
-
other Another GAMSModifier to compare to.
- Returns
- Returns
true
if the two GAMSModifier are equal; otherwisefalse
.
◆ updAction()
GAMSEnum::SymbolUpdateAction gams::GAMSModifier::updAction | ( | ) |
Get the type of modification.
- Returns
- Returns the symbol update action.
◆ updType()
GAMSEnum::SymbolUpdateType gams::GAMSModifier::updType | ( | ) |
Get the symbol update type.
- Returns
- Returns the symbol update type.