ensemble package

Subpackages

Submodules

ensemble.cli module

ENSEMBLE Command Line Interface

Scenario launcher for ENSEMBLE simulations

ensemble.configurator module

Configurator

A class to store parameters for runtime execution

class ensemble.configurator.Configurator(**kwargs)[source]

Bases: object

Configurator class for containing specific simulator parameter

Args:

verbose (bool):

Indicates if verbosity is required within the exit

info (bool):

Prints project information

platform (str):

Platform to run: Windows, Darwin, Linux

simulation_platform (str):

Traffic simulation platform: vissim, symuvia

scenario_files (list):

List of absolute files containing traffic scenarios

simulation_parameters (dict):

List of simulatio parameters. Check constants module for more information

create_platoon_registry()[source]

Creates a platoon registry for all coordinators (FGC-RGC)

info: bool = True
initialize_operational_layer()[source]

Initialize the Operational layer

library_path: str = ''
load_scenario()[source]
load_socket()[source]

Determines simulation platform to connect

platform: str = 'Linux'
push_data()[source]

Pushes data updated back to the simulator

query_data()[source]

Queries data from the simulator and updates vehicle list

set_simulation_platform(simulation_platform: str = '') None[source]

A simpler setter for the simulation platform based on OS

Parameters

simulation_platform (str) – “symuvia” or “vissim”, defaults to “”

sim_steps: int = 0
simulation_platform: str = ''
property total_steps
update_platoon_registry()[source]

Updates the platoon vehicle registry and the tactical layer

update_traffic_state()[source]

Update the vehicle list and the platoon corresponding vehicle state

update_values(**kwargs) None[source]

Configurator updater, pass a with keyword arguments to update. Just pass the desired parameter as a kewyword argument.

property vehicle_registry
verbose: bool = False

ensemble.ensemble module

ENSEMBLE Command Line Commands

Command definitions

ensemble.ensemble.check_consistency(configurator: ensemble.configurator.Configurator) bool[source]

Checks consistency of the current configurator

Parameters

file (configurator {Configurator} -- Configurator) –

Returns

bool – True in case all is correct

ensemble.ensemble.launch_simulation(configurator: ensemble.configurator.Configurator)[source]

Launches a RuntimeDevice starting from a configurator

Parameters

file (configurator {Configurator} -- Configurator) –

Example

Use the the function from a python package as::
>>> from ensemble import launch_simulation, Configurator
>>> c = Configurator() # default arguments
>>> library = 'path/to/simulator'
>>> scenarios = ('path/to/scenario',)
>>> config.update_values(library_path=library, scenario_files=scenario)
>>> launch_simulation(configurator)
ensemble.ensemble.run_operational_runtime()[source]

Considers a demonstration scenario to run in the operational layer with components from the framework. The purpose is to test components from the tactical layer

Module contents