AMPL_PARAMETERINSTANCE#
- group AMPL_PARAMETERINSTANCE
Functions for parameter instances:
Functions
-
AMPL_ERRORINFO *AMPL_ParameterInstanceGetValue(AMPL *ampl, const char *entityname, AMPL_TUPLE *index, AMPL_VARIANT **variant)#
Get the value of a single instance of this parameter.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of parameter instance as string.
index – Tuple of indices of the instance.
variant – Pointer to the value to set the parameter instance to.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_ParameterInstanceSetValue(AMPL *ampl, const char *entityname, AMPL_TUPLE *index, AMPL_VARIANT *v)#
Set the value of a single instance of this parameter.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of parameter instance as string.
index – Tuple of indices of the instance.
v – Pointer to the value to set the parameter instance to.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_ParameterInstanceSetNumericValue(AMPL *ampl, const char *entityname, AMPL_TUPLE *index, double value)#
Set the double value of a single instance of this parameter.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of parameter instance as string.
index – Tuple of indices of the instance.
value – Double value to set the parameter instance to.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_ParameterInstanceSetStringValue(AMPL *ampl, const char *entityname, AMPL_TUPLE *index, const char *value)#
Set the string value of a single instance of this parameter.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of parameter instance as string.
index – Tuple of indices of the instance.
value – Stringvalue to set the parameter instance to.
- Throws runtime_error:
if the entity has been deleted in the underlying AMPL
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_ParameterInstanceGetValue(AMPL *ampl, const char *entityname, AMPL_TUPLE *index, AMPL_VARIANT **variant)#