simple_objectivelist_rule
(function from pyomo.core.base.objective
)
- pyomo.core.base.objective.simple_objectivelist_rule(rule)[source]
This is a decorator that translates None into ObjectiveList.End. This supports a simpler syntax in objective rules, though these can be more difficult to debug when errors occur.
Example use:
@simple_objectivelist_rule def O_rule(model, i, j): # ... model.o = ObjectiveList(expr=simple_objectivelist_rule(...))