openmobisim.contrib.gymnasium ============================= .. py:module:: openmobisim.contrib.gymnasium .. autoapi-nested-parse:: A fleet environment as a Gymnasium environment. ``gymnasium`` is needed, and not installed with openmobisim: ``pip install gymnasium``. ``FleetGymEnv(environment, spec)`` wraps a ``fleet_environment`` (``n=1``) for one docked service: the observation is ``environment.observation(view, spec)`` and the action one target level per dock, as Gymnasium's ``MultiDiscrete`` counts from 0: entry ``a`` asks for ``a - 1`` bikes, 0 setting no target. ``reset(seed=k)`` starts the day of seed ``k``; without a seed, the day after the last one. Classes ------- .. autoapisummary:: openmobisim.contrib.gymnasium.FleetGymEnv Module Contents --------------- .. py:class:: FleetGymEnv(environment, spec) One docked service of a fleet day, stepped by Gymnasium's interface. .. py:method:: reset(*, seed = None, options = None) Start the day of ``seed`` (or the next one): ``(observation, info)``. .. py:method:: step(action) Set the docks' target levels (``action - 1``) and run one step. .. py:attribute:: action_space .. py:attribute:: environment .. py:attribute:: metadata :type: dict[str, Any] .. py:attribute:: spec_encoding