sasoptpy.Expression.get_value

Expression.get_value(self)[source]

Calculates and returns the value of the linear expression

Returns
vfloat

Value of the expression

Examples

>>> sales = so.Variable(name='sales', init=10)
>>> material = so.Variable(name='material', init=3)
>>> profit = so.Expression(5 * sales - 3 * material)
>>> print(profit.get_value())
41