Skip to content

Latest commit

 

History

History
236 lines (142 loc) · 5.27 KB

ScenarioLoader.md

File metadata and controls

236 lines (142 loc) · 5.27 KB

Contents

ScenarioCollection

class ScenarioCollection()

__init__

def __init__(path)

Scenario Collection Constructor.

Arguments:

  • path: Path to the scenario collection

list_scenarios

def list_scenarios()

List the scenarios present in the collection.

get_scenario

def get_scenario(scenario_name)

Retrieve a scenario from the collection.

Arguments:

  • scenario_name: The name of the scenario

Returns:

A Scenario object, or None if the Scenario does not exist within the collection

list_configs

def list_configs(scenario_name)

List configs for the given scenario.

Arguments:

  • scenario_name: The name of the scenario

Returns:

A dictionary of config types, containing lists of the available configs

get_leak_data

def get_leak_data(scenario_name, leak_config_name)

Retrieve the information about the leaks in a specific leak config in the given Scenario.

Arguments:

  • scenario_name: The name of the scenario
  • leak_config: The name of the leak config

Returns:

A list of dictionaries containing the leak information, None if no information was found

get_sensorfault_data

def get_sensorfault_data(scenario_name, sensorfault_config_name)

Retrieve the information about the sensorfaults in a specific sensorfault config in the given Scenario.

Arguments:

  • scenario_name: The name of the scenario
  • sensorfault_config_name: The name of the sensorfault config

Returns:

A list of dictionaries containing the sensorfault information, None if no information was found

get

def get(scenario_name, leak_config, sensor_config, sensorfault_config)

Retrieve specific measurements from the collection

Arguments:

  • scenario_name: The name of the scenario
  • leak_config: The name of the leak config
  • sensor_config: The name of the sensor config
  • sensorfault_config: The name of the sensorfault config

Returns:

A dictionary of measurement data frames, or None if the measurements do not exist within the collection

Scenario

class Scenario()

__init__

def __init__(path)

Scenario constructor.

Arguments:

  • path: The path to the scenario

list_configs

def list_configs()

List configs of this scenario.

Returns:

A dictionary of config types, containing lists of the available configs

get_leak_data

def get_leak_data(leak_config_name)

Retrieve the information about the leaks in a specific leak config.

Arguments:

  • leak_config: The name of the leak config

Returns:

A list of dictionaries containing the leak information, None if no information was found

get_sensorfault_data

def get_sensorfault_data(sensorfault_config_name)

Retrieve the information about the sensorfaults in a specific sensorfault config.

Arguments:

  • sensorfault_config_name: The name of the sensorfault config

Returns:

A list of dictionaries containing the sensorfault information, None if no information was found

get

def get(leak_config, sensor_config_name, sensorfault_config_name)

Retrieve specific measurements from this scenario.

Arguments:

  • leak_config: The name of the leak config
  • sensor_config: The name of the sensor config
  • sensorfault_config: The name of the sensorfault config

Returns:

A dictionary of measurement data frames, or None if the measurements do not exist within the collection