FAQ & Glossary

FAQ

Where are the instanciated models stored? How is the process with the building of Model-Factories?

examplesim = world.start("ExampleSim", eidprefix="Model")

is an entity of the class mosaik.scenario.ModelFactory and stores the entities of the example scenario within _sim._inst

What can one do in case of an ImportError when running the example scenarios?

pip install -e .

What attributes does a model have?

META of the simulator:

e.g. EMS_simulator.py (01/24)
13# SIMULATION META DATA
14META = {
15    "type": "hybrid",
16    "models": {
17        "HEMS": {
18            "public": True,
19            "params": ["init_vals"],
20            "attrs": [
21                "q",
22                "p",
23                "p_max",
24                "p_min",
25                "p_th_room",
26                "p_th_water",
27                "p_th",
28...

Optionally, within the model class itself

What inputs does a model have?

VALID_PARAMETERS of the model class:

e.g. EMS_model.py (01/24)
20# Valid values and types for each parameter that apply for all subclasses
21_VALID_PARAMETERS = {
22    "strategy": {"types": [str], "values": ["HEMS_default"]},
23    "cs_strategy": {
24        "types": [str],
25        "values": ["max_p", "balanced", "night_charging", "solar_charging"],
26    },
27    "bss_strategy": {
28        "types": [None, str],
29        "values": [None, "reduce_curtailment"],
30    },
31}

model_data of the test scenarios exemplary set these parameters and init values:

e.g. model_data_building.json (01/24)
1{
2    "ems": [
3        {
4            "strategy": "HEMS_default",
5            "cs_strategy": "balanced"
6        }
7    ],
What connections does a model have?

See the model_connections/model_connect_config.json file, where the FROM-TO-CONNECTIONS are given for each model type of the eELib:

e.g. model_connect_config.json (01/24)
10"HEMS_default": {
11    "HouseholdCSV": [],
12    "PvCSV": [],
13    "PVLib": [["p_set_pv", "p_set"]],
14    "PVLibExact": [["p_set_pv", "p_set"]],
15    "BSS": [
16        [
17            "p_set_storage",
18            "p_set"
19        ]
20    ],
21    "ChargingStation": [
22        [
23            "p_set_charging_station",
24            "p_set"
25        ]
26    ],
27    "ChargingStationCSV": [],
28    "EV": [],
29    "HouseholdThermalCSV": [],
30    "HeatpumpCSV": [],
31    "Heatpump": [
32        [
33            "p_th_set_heatpump",
34            "p_th_set"
35        ]
36    ],
37    "grid_load": [["p_balance", "p_w"], ["q_balance", "q_var"]]
38},
e.g. model_connect_config.json (01/24)
111"BSS": {
112    "HEMS_default": [
113        [
114            "p_discharge_max",
115            "p_min"
116        ],
117        [
118            "p_charge_max",
119            "p_max"
120        ],
121        [
122            "p",
123            "p"
124        ]
125    ],
126    "HouseholdCSV": [],
127    "PvCSV": [],
128    "PVLib": [],
129    "PVLibExact": [],
130    "ChargingStation": [],
131    "ChargingStationCSV": [],
132    "EV": [],
133    "HouseholdThermalCSV": [],
134    "HeatpumpCSV": [],
135    "Heatpump": []
136},

BSS sends p, p_min and p_max to HEMS and recieves p_set.

Glossary

A flow chart of the parties within a simulation to introduce the glossary.

This illustrates the different units participating in a simulation.

Orchestrator

Mosaik: Coordination of the whole simulation and model coupling.

Simulator

API for communication between orchestrator and the entities of the specific model.

Entity

Created instance of a model type. In “ename”, “etype”, “eid” etc. the “e” stands for entity.

PSC

We use the passive sign convention (german: Verbraucherzählpfeilsystem), therefore loads are positive while generation is negative.

Forecast

Prediction of a behaviour for a defined time horizon in the future, e.g. power values for the upcoming 24h steps for a household base load from a csv reader.

Schedule

Calculated set values for a defined time horizon in the future, e.g. target power values for the upcoming 24h steps for a battery storage system.

Parameters used in test scenarios

start_time

simulation starting time (e.g. 2023-01-01 00:00:00)

n_steps

number of steps that should be simulated (for time-based calculations only) (e.g. 96 steps for a day with 15 min time steps)

step_size

length of one (pre-defined) time step (e.g. 15 min = 15*60 sec = 900 sec)

end_time

simulation ending time (e.g. 2023-12-31 23:59:59)

Units

Make use of the SI-units!!

  • Power: W

  • Time (e.g. simulation time): s

  • Energy: Wh