set_options

(function from pyomo.core.base.set)

pyomo.core.base.set.set_options(**kwds)[source]

DEPRECATED.

This is a decorator for set initializer functions. This decorator allows an arbitrary dictionary of values to passed through to the set constructor.

Examples

@set_options(dimen=3)
def B_index(model):
    return [(i,i+1,i*i) for i in model.A]

@set_options(domain=Integers)
def B_index(model):
    return range(10)

Deprecated since version 5.7: The set_options decorator is deprecated; create Sets from functions explicitly by passing the function to the Set constructor using the “initialize=” keyword argument.