Table Of Contents
Table Of Contents

inet.simulation.project

This module provides abstractions for simulation projects.

The main functions are:

In general, it’s a good idea to use the default project, because it makes calling the various functions easier and in most cases there’s only one simulation project is worked on. The default simulation project is automatically set to the one above the current working directory when the omnetpp.repl package is loaded, but it can be overridden by the user later.

Classes

SimulationProject

Represents a simulation project that usually comes with its own modules and their C++ implementation, and also with

Functions

define_simulation_project(name[, version])

Defines a simulation project for the provided name, version and additional parameters.

get_default_simulation_project()

Returns the currently selected default simulation project from the set of defined simulation projects. The default

get_simulation_project(name[, version])

Returns a defined simulation project for the provided name and version.

set_default_simulation_project(project)

Changes the currently selected default simulation project from the set of defined simulation projects.

Module Contents

inet.simulation.project.define_simulation_project(name, version=None, **kwargs)

Defines a simulation project for the provided name, version and additional parameters.

Parameters:
  • name (string) – The name of the simulation project.

  • version (string or None) – The version of the simulation project. If unspecified, then no version is assumed.

  • kwargs (dict) – Additional parameters are inherited from the constructor of SimulationProject.

Returns (SimulationProject):

the new simulation project.

inet.simulation.project.get_default_simulation_project()

Returns the currently selected default simulation project from the set of defined simulation projects. The default simulation project is usually the one that is above the current working directory.

Returns (SimulationProject):

a simulation project.

inet.simulation.project.get_simulation_project(name, version=None)

Returns a defined simulation project for the provided name and version.

Parameters:
  • name (string) – The name of the simulation project.

  • version (string or None) – The version of the simulation project. If unspecified, then the latest version is returned.

Returns (py:class:SimulationProject or None):

a simulation project.

inet.simulation.project.set_default_simulation_project(project)

Changes the currently selected default simulation project from the set of defined simulation projects.

Parameters:

project (SimulationProject) – The simulation project that is set as the default.

Returns (None):

nothing.