Hi,
I think it would be beneficial to also include the decorator approach for defining Expressions, similar to how it has been shown for Objective and Constraints. Currently, decorators are introduced in the Objective section, so some restructuring might be needed to integrate this addition.
I suggest something like the following:
@model.Expression()
def revenue(m):
return 270 * m.y_U + 210 * m.y_V
@model.Expression()
def cost(m):
return 10 * m.x_M + 50 * m.x_A + 40 * m.x_B
model.revenue.pprint()
model.cost.pprint()
Looking forward to your thoughts. Thanks!