AMPL_VARIABLE#
- group AMPL_VARIABLE
Functions for variables:
Functions
-
AMPL_ERRORINFO *AMPL_VariableGetValue(AMPL *ampl, const char *entityname, double *value)#
Get the current value of this variable.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
value – Pointer to the current value.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableFix(AMPL *ampl, const char *entityname)#
Fix all instances of this variable to their current value.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableFixWithValue(AMPL *ampl, const char *entityname, double value)#
Fix all instances of this variable to the specified value.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
value – Value to fix all instances of the variable to.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableUnfix(AMPL *ampl, const char *entityname)#
Unfix all instances of this variable.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableSetValue(AMPL *ampl, const char *entityname, double value)#
Set all instances of this variable to the specified value.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
value – Value to set all instances of the variable to.
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableGetIntegrality(AMPL *ampl, const char *entityname, int *integrality)#
Get the integrality type for this variable.
- Parameters:
ampl – Pointer to the AMPL struct.
entityname – Name of variable as string.
integrality – Type of integrality (integer = 0, binary = 1, continuous = 2).
- Returns:
Pointer to the AMPL_ERRORINFO struct.
-
AMPL_ERRORINFO *AMPL_VariableGetValue(AMPL *ampl, const char *entityname, double *value)#