:py:mod:`fragile.callbacks.time_steps` ====================================== .. py:module:: fragile.callbacks.time_steps Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: fragile.callbacks.time_steps.TimeStepAPI fragile.callbacks.time_steps.ConstantDt fragile.callbacks.time_steps.UniformDt fragile.callbacks.time_steps.GaussianDt .. py:class:: TimeStepAPI(swarm = None, param_dict = None, inputs = None, outputs = None) Bases: :py:obj:`fragile.core.api_classes.Callback` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:attribute:: name :annotation: = time_step .. py:attribute:: default_param_dict .. py:attribute:: default_outputs .. py:method:: select(inplace = True, **kwargs) Calculate SwarmState containing the data needed to interact with the environment. .. py:method:: calculate(**kwargs) :abstractmethod: .. py:method:: reset(inplace = True, **kwargs) Reset the internal state of the :class:`SwarmComponent`. :param inplace: Unused. Defaults to True. :type inplace: bool, optional :param root_walker: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type root_walker: Optional[StateData], optional :param states: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type states: Optional[StateData], optional :param kwargs: Other parameters required to reset the component. .. py:method:: before_policy() .. py:class:: ConstantDt(value, **kwargs) Bases: :py:obj:`TimeStepAPI` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:method:: calculate() .. py:class:: UniformDt(high, low = 1, **kwargs) Bases: :py:obj:`TimeStepAPI` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:method:: calculate() .. py:method:: reset(inplace = True, **kwargs) Reset the internal state of the :class:`SwarmComponent`. :param inplace: Unused. Defaults to True. :type inplace: bool, optional :param root_walker: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type root_walker: Optional[StateData], optional :param states: Set the internal state of the :class:`SwarmComponent` to this value. Defaults to None. :type states: Optional[StateData], optional :param kwargs: Other parameters required to reset the component. .. py:class:: GaussianDt(loc, scale, low = 1, high=numpy.inf, **kwargs) Bases: :py:obj:`UniformDt` The :class:`Walkers` is a data structure that takes care of all the data involved in making a Swarm evolve. .. py:method:: calculate()