midas.scenario.modules package

Submodules

midas.scenario.modules.base module

MIDAS scenario base module.

In this module the base configuration for each scenario is done.

midas.scenario.modules.base.configure(scenario, params)

Create the base configuration for midas scenarios.

Parameters
  • scenario (dict) – The scenario dict where reference to everything created in this module will be stored. Since this is the first module to call, the dict can be empty (or should at least contain the key scenario_name with the name of the scenario).

  • params (dict) – A dict containing the content of the config files.

midas.scenario.modules.database module

MIDAS scenario upgrade module.

This module adds a mosaikhdf database to the scenario.

class midas.scenario.modules.database.DatabaseModule

Bases: midas.scenario.upgrade_module.UpgradeModule

check_module_params()

Check module params for this upgrade.

check_sim_params(module_params, **kwargs)

Is called from within the upgrade method.

connect()
connect_to_db()
start_models()

midas.scenario.modules.powergrid module

This module contains the MIDAS powergrid upgrade.

class midas.scenario.modules.powergrid.PowergridModule

Bases: midas.scenario.upgrade_module.UpgradeModule

The MIDAS powergrid update module.

check_module_params()

Check the module params for this upgrade.

check_sim_params(module_params, **kwargs)

Check simulator params for a certain simulator.

connect(*args)
connect_to_db()

Add connections to the database.

get_actuators()
get_sensors()
start_models()

Start all models for this simulator.

Since we want the grids to be able to be interconnected with each other, each grid model should have its own simulator.

Parameters

sim_name (str) – The sim name, not to be confused with sim_name for mosaik’s sim_config. This sim_name is the simulator key in the configuration yaml file.

midas.scenario.modules.sbdata module

MIDAS upgrade module for simbench data simulator.

class midas.scenario.modules.sbdata.SimbenchDataModule(name='sbdata', log=None)

Bases: midas.scenario.upgrade_module.UpgradeModule

Upgrade module for simbench data.

Other, similar data modules can derive from this class.

_instantiate_models(model, mtype)

Start all models as specified in the mappings.

check_module_params()

Check the module params and provide default values.

check_sim_params(module_params, **kwargs)

Check the params for a certain simulator instance.

connect()

Create connections to other entities.

connect_to_db()

Connect the models to db.

connect_to_grid(model, mapping, attrs, mtype)

Connect to the grid model.

create_default_mapping(model)

Create a default mapping.

Tries to read the default mapping from hdf5 db that stores the data.

gen_mod_key(mod_name, bus, eidx=None)
get_grid_entity(grid_key, mtype, bus)
start_models()

Start models of a certain simulator.

midas.scenario.modules.sndata module

MIDAS upgrade module for Smart Nord data simulator.

class midas.scenario.modules.sndata.SmartNordDataModule

Bases: midas.scenario.modules.sbdata.SimbenchDataModule

check_sim_params(module_params, **kwargs)

Check the params for a certain simulator instance.

connect()

Create connections to other entities.

create_default_mapping(model)

Create a default mapping.

Tries to read the default mapping from hdf5 db that stores the data.

start_models()

Start models of a certain simulator.

Module contents