>>> from pyomo.common.config import (
... ConfigDict, ConfigValue, document_kwargs_from_configdict
... )
>>> class MyClass(object):
... CONFIG = ConfigDict()
... CONFIG.declare('iterlim', ConfigValue(
... default=3000,
... domain=int,
... doc="Iteration limit. Specify None for no limit"
... ))
... CONFIG.declare('tee', ConfigValue(
... domain=bool,
... doc="If True, stream the solver output to the console"
... ))
...
... @document_kwargs_from_configdict(CONFIG)
... def solve(self, **kwargs):
... config = self.CONFIG(kwargs)
... # ...
...
>>> help(MyClass.solve)
Help on function solve:
solve(self, **kwargs)
Keyword Arguments
-----------------
iterlim: int, default=3000
Iteration limit. Specify None for no limit
tee: bool, optional
If True, stream the solver output to the console