Follow us on Twitter and LinkedIn to get the latest updates from the dev team!
Represents an AMPL parameter. The values can be float or string (in case of symbolic parameters).
Data can be assigned to the set using the methods set() and set_values() or using set_data() and an object of class DataFrame.
set()
set_values()
set_data()
DataFrame
Returns True if the parameter is declared as symbolic (can store both numerical and string values).
Check if the parameter has a default initial value. In case of the following AMPL code:
param a; param b default a;
the function will return true for parameter b.
b
True if the parameter has a default initial value. Please note that if the parameter has a default expression which refers to another parameter which value is not defined, this will return True.
Get the value of this parameter. Valid only for non-indexed parameters.
Set the value of a single instance of this parameter.
args: value if the parameter is scalar, index and value otherwise.
RuntimeError: If the entity has been deleted in the underlying AMPL.
TypeError: If the parameter is not scalar and the index is not provided.
Assign the values (string or float) to the parameter instances with the specified indices, equivalent to the AMPL code:
let {i in indices} par[i] := values[i];
values: list, dictionary or DataFrame with the indices and the values to be set.
TypeError: If called on a scalar parameter.
previous
Set
next
AMPLException