Table Of Contents
Table Of Contents

SimulationConfig

from inet.simulation.config

class SimulationConfig(simulation_project, working_directory, ini_file='omnetpp.ini', config='General', num_runs=1, sim_time_limit=None, abstract=False, emulation=False, expected_result='DONE', user_interface='Cmdenv', description=None)[source]

Bases: object

Represents a simulation config from an INI file under a working directory in a specific simulation project.

Initializes a new simulation config.

Parameters
  • simulation_project (SimulationProject) – The simulation project that this simulation config belongs to.

  • working_directory (string) – The working directory relative to the root directory of the simulation project.

  • ini_file (string) – The name of the INI file within the working directory.

  • config (string) – The name of the configuration section within the INI file.

  • num_runs (integer) – The total number of runs specified by the configuration section of the INI file.

  • sim_time_limit (string) – The simulation time limit specified by the configuration section of the INI file.

  • abstract (bool) – Specifies if the simulation config is not final (i.e. it’s meant to be derived from) and thus it cannot be run.

  • emulation (bool) – Specifies if the simulation config is used for emulation, so it cannot be run without setting up the external software and hardware resources.

  • expected_result (string) – The expected result of running the simulation.

  • user_interface (string) – The user interface extracted from the INI file.

  • description (string) – The human readable description extracted from the INI file.

Methods

matches_filter

Determines if this simulation config matches the provided filter parameters or not.

Attributes

matches_filter(filter=None, exclude_filter=None, working_directory_filter=None, exclude_working_directory_filter=None, ini_file_filter=None, exclude_ini_file_filter=None, config_filter=None, exclude_config_filter=None, simulation_config_filter=<function SimulationConfig.<lambda>>, full_match=False, **kwargs)[source]

Determines if this simulation config matches the provided filter parameters or not. If a filter parameter is not specified, then it is ignored.

Parameters
  • filter (string or None) – A regular expression that must match the string representation of the simulation config.

  • exclude_filter (string or None) – A regular expression that must not match the string representation of the simulation config.

  • working_directory_filter (string or None) – A regular expression that must match the working directory of the simulation config.

  • exclude_working_directory_filter (string or None) – A regular expression that must not match the working directory of the simulation config.

  • ini_file_filter (string or None) – A regular expression that must match the INI file of the simulation config.

  • exclude_ini_file_filter (string or None) – A regular expression that must not match the INI file of the simulation config.

  • config_filter (string or None) – A regular expression that must match the config of the simulation config.

  • exclude_config_filter (string or None) – A regular expression that must not match the config of the simulation config.

  • simulation_config_filter (function or None) – A predicate that is additionally called with the simulation config. By default, abstract and emulation simulation configs do not match.

  • full_match (bool) – Specifies if the regular expression parameters must match completely or a substring match is sufficient.

  • kwargs (dict) – Ignored.

Returns (bool):

Flag indicating that the simulation config matches the provided filter criteria.