sasoptpy.VariableGroup.set_init

VariableGroup.set_init(self, init)[source]

Specifies or updates the initial values

Parameters
initfloat, list, dict, pandas.Series

Initial value of the variables

Examples

>>> m = so.Model(name='m')
>>> y = m.add_variables(3, name='y')
>>> print(y._defn())
var y {{0,1,2}};
>>> y.set_init(5)
>>> print(y._defn())
var y {{0,1,2}} init 5;