smarts.env.configs.hiway_env_configs module
- class smarts.env.configs.hiway_env_configs.EnvReturnMode(value)[source]
Configuration to determine the interface type of the step function.
This configures between the environment status return (i.e. reward means the environment reward) and the per-agent status return (i.e. rewards means reward per agent).
- default = 1
The default behavior. Defaults to
per_agent
.
- environment = 2
Generate environment mode step returns in the form
(reward (float), terminated (bool), truncated (bool), info)
.
- per_agent = 1
Generate per-agent mode step returns in the form
(rewards({id: float}), terminateds({id: bool}), truncateds ({id: bool}), info)
.
- class smarts.env.configs.hiway_env_configs.HiWayEnvV1Configuration(scenarios: ~typing.List[str], agent_interfaces: ~typing.Dict[str, ~smarts.core.agent_interface.AgentInterface], sim_name: str | None = None, scenarios_order: ~smarts.env.configs.hiway_env_configs.ScenarioOrder = ScenarioOrder.scrambled, headless: bool = False, visdom: bool = False, fixed_timestep_sec: float = 0.1, sumo_options: ~smarts.env.configs.hiway_env_configs.SumoOptions = <factory>, seed: int = 42, observation_options: ~smarts.env.utils.observation_conversion.ObservationOptions = ObservationOptions.multi_agent, action_options: ~smarts.env.utils.action_conversion.ActionOptions = ActionOptions.multi_agent, environment_return_mode: ~smarts.env.configs.hiway_env_configs.EnvReturnMode = EnvReturnMode.per_agent)[source]
The base configurations that should be used for HiWayEnvV1.
- action_options: ActionOptions = 0
Defines the options for how the formatting matches the action space.
- agent_interfaces: Dict[str, AgentInterface]
Specification of the agents needs that will be used to configure the environment.
- environment_return_mode: EnvReturnMode = 1
This configures between the environment step return information
- fixed_timestep_sec: float = 0.1
The time length of each step.
- headless: bool = False
If this environment should attempt to connect to envision.
- observation_options: ObservationOptions = 0
Defines the options for how the formatting matches the observation space.
- scenarios: List[str]
A list of scenario directories that will be simulated.
- scenarios_order: ScenarioOrder = 1
The order in which scenarios should be executed.
- seed: int = 42
The environment seed.
- sim_name: str | None = None
The name of the simulation.
- sumo_options: SumoOptions
The configuration for the sumo instance.
- visdom: bool = False
Deprecated. Use SMARTS_VISDOM_ENABLED.
- class smarts.env.configs.hiway_env_configs.ScenarioOrder(value)[source]
Determines the order in which scenarios are served over successive resets.
- default = 1
The default behavior. Defaults to
scrambled
.
- scrambled = 1
Scenarios are served in random order.
- sequential = 0
Scenarios are served in order initially provided.
- class smarts.env.configs.hiway_env_configs.SumoOptions(num_external_clients: int = 0, auto_start: bool = True, headless: bool = True, port: str | None = None)[source]
Contains options used to configure sumo.
- auto_start: bool = True
Automatic starting of SUMO. Defaults to True.
- headless: bool = True
If True, disables visualization in SUMO GUI. Defaults to True.
- num_external_clients: int = 0
Number of SUMO clients beyond SMARTS. Defaults to 0.
- port: str | None = None
SUMO port. Defaults to
None
.