CADETProcess.processModel.Process.add_event#
- Process.add_event(name: str, parameter_path: str, state: float, time: float = 0.0, indices: int = None, dependencies: list = None, factors: list = None, transforms: list | None = None) Event#
Add a new event that changes a parameter during the process.
An event is a dynamic alteration that occurs at a specified time and can modify the attributes of specific objects involved in the process.
- Parameters:
- namestr
Name of the event.
- parameter_pathstr
Path of the parameter that is changed in dot notation.
- statefloat
Value of the attribute that is changed at Event execution.
- timefloat
Time at which the event is executed.
- dependencieslist
List of the events on which the event time depends.
- factorsList
List with factors for linear combination of dependencies.
- indicesint
Index slices for events that modify an entry of a parameter array.
- transformslist, optional
List of functions used to transform the parameter value. Length must be equal the length of independent events. If None, no transform is applied.
- Returns:
- Event:
The new Event.
- Raises:
- CADETProcessError
If Event already exists in the event_dict
- CADETProcessError
If EventPerformer is not found in EventHandler
See also
eventsremove_eventadd_event_dependencyEventEvent.add_dependencyadd_duration