fragile.callbacks.time_steps
Contents
fragile.callbacks.time_steps
#
Module Contents#
Classes#
The |
|
The |
|
The |
|
The |
- class fragile.callbacks.time_steps.TimeStepAPI(swarm=None, param_dict=None, inputs=None, outputs=None)[source]#
Bases:
fragile.core.api_classes.Callback
The
Walkers
is a data structure that takes care of all the data involved in making a Swarm evolve.- Parameters
- name = time_step#
- default_param_dict#
- default_outputs#
- select(inplace=True, **kwargs)[source]#
Calculate SwarmState containing the data needed to interact with the environment.
- Parameters
inplace (bool) –
- Return type
Union[None, fragile.core.typing.StateData]
- reset(inplace=True, **kwargs)[source]#
Reset the internal state of the
SwarmComponent
.- Parameters
inplace (bool, optional) – Unused. Defaults to True.
root_walker (Optional[StateData], optional) – Set the internal state of the
SwarmComponent
to this value. Defaults to None.states (Optional[StateData], optional) – Set the internal state of the
SwarmComponent
to this value. Defaults to None.kwargs – Other parameters required to reset the component.
- Return type
Union[None, fragile.core.typing.StateData]
- class fragile.callbacks.time_steps.ConstantDt(value, **kwargs)[source]#
Bases:
TimeStepAPI
The
Walkers
is a data structure that takes care of all the data involved in making a Swarm evolve.- Parameters
value (int) –
- class fragile.callbacks.time_steps.UniformDt(high, low=1, **kwargs)[source]#
Bases:
TimeStepAPI
The
Walkers
is a data structure that takes care of all the data involved in making a Swarm evolve.- reset(inplace=True, **kwargs)[source]#
Reset the internal state of the
SwarmComponent
.- Parameters
inplace (bool, optional) – Unused. Defaults to True.
root_walker (Optional[StateData], optional) – Set the internal state of the
SwarmComponent
to this value. Defaults to None.states (Optional[StateData], optional) – Set the internal state of the
SwarmComponent
to this value. Defaults to None.kwargs – Other parameters required to reset the component.
- Return type
Union[None, fragile.core.typing.StateData]