openmobisim.contrib.gymnasium#
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#
One docked service of a fleet day, stepped by Gymnasium's interface. |
Module Contents#
- class openmobisim.contrib.gymnasium.FleetGymEnv(environment, spec)#
One docked service of a fleet day, stepped by Gymnasium’s interface.
- Parameters:
environment (Any)
spec (collections.abc.Mapping[str, Any])
- reset(*, seed=None, options=None)#
Start the day of
seed(or the next one):(observation, info).- Parameters:
seed (int | None)
options (dict[str, Any] | None)
- Return type:
tuple[Any, dict[str, Any]]
- step(action)#
Set the docks’ target levels (
action - 1) and run one step.- Parameters:
action (Any)
- Return type:
tuple[Any, float, bool, bool, dict[str, Any]]
- action_space#
- environment#
- metadata: dict[str, Any]#
- spec_encoding#