process(maybe_cls=None, autodoc=True, apply_attrs=True) → Type[Process]¶
A class decorator that adds everything needed to use the class as a process.
A process represents a logical unit in a computational model.
A process class usually implements:
An interface as a set of variables defined as class attributes (see, e.g.,
group(), etc.). When the class is used within a
Modelobject, this decorator automatically adds properties to get/set values for these variables.
One or more methods among
finalize(), which are called at different stages of a simulation and perform some computation based on the variables defined in the process interface.
Decorated methods to compute, validate or set a default value for one or more variables.
maybe_cls (class, optional) – Allows to apply this decorator to a class either as
autodoc (bool, optional) – If True (default), automatically adds an attributes section to the docstring of the class to which the decorator is applied, using the metadata of each variable declared in the class.