sasoptpy.abstract.Parameter

class Parameter(**kwargs)[source]

Bases: sasoptpy.core.expression.Expression

Represents a problem input parameter

Parameters
namestring

Name of the parameter

ptypestring, optional

Type of the parameter. Possible values are sasoptpy.STR and sasoptpy.NUM

valuefloat, optional

Value of the parameter

initfloat, optional

Initial value of the parameter

Examples

>>> with so.Workspace('w') as w:
...     p = so.Parameter(name='p', init=3)
...     p.set_value(5)
...
<sasoptpy.abstract.statement.assignment.Assignment object at 0x7f7952e9bb38>
>>> print(so.to_optmodel(w))
proc optmodel;
   num p init 3;
   p = 5;
quit;