FAQ & Glossary
Glossary
- Model
Representation of real processes (assuming simplifications), using the general procedure of “Input - internal calculation - output”.
- Orchestrator
Coordination of the whole simulation procedure and coupling of the models (mosaik).
- Simulator
API/interface for communication between the orchestrator mosaik 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: Verbraucherzaehlpfeilsystem), therefore loads are positive while generation is negative. So, for the household baseload, the power values should always be positive, as this always means power consumption. On the other hand, the power values should always be negative for a PV system. The same is applied to the thermal power side: For a heatpump, the thermal power is always negative, as the heatpump can only generate power. Meanwhile, the electrical power of the heatpump has to stay positive as power is consumed. This orientation is also applied to the power limits, e.g.
p_maxorp_min.p_maxis always the maximum power in consumption direction. For a charging station, an example would bep_max=11kWandp_min=0kW. For a generation device like the PV system, this could bep_max=0kWandp_min=-5kW. And for a thermal generation device like the heatpump, a possible scenario would bep_th_max=0kW,p_th_min=-10kW,p_th_mod_start=-5kWwithp_max=4kW,p_min=0kW, andp_mod_start=2kW.- 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.
- time-based
Used for time-discrete simulation of models, e.g. if just some data is collected to be transmitted to other models.
- event-based/hybrid
Used for triggered simulation of models, e.g. if model calculation can be triggered by inputs like the receiving of a power set value.
- weak and strong connections for mosaik simulations
As you may be tasked with adding a new model or directly adding new connections between existing models, you may come across connections between models in multiple directions - either directly or within a circle of multiple models. When that happens, you have to add the order of the connections (into
model_connections/connect_directions_config.json) for mosaik to know the order in which the models have to be called. Weak connections are first replaced by None-values such that their recieving model is first called and afterwards the strong connection is taken.
Devices Glossary
- EMS
Energy Management System - unit for the automated collection, controlling and (optimised) coordination of energy flows in a closed system, considering a specified goal (technical, economical, etc.) for the operational coordination within a system
- HEMS
Home Energy Management System, specified for a residential household.
- DEMS
Energy Management System, specified for a residential disctrict.
- GridEMS
Grid Energy Management System, specified for controlling a power grid operation.
- BSS
Battery Storage System: Device to store energy in electro-chemical way
- PV
Photovoltaic (system): Device to convert solar radiation into electrical power, combination of solar module and AC-DC inverter
- EV
Electric Vehicle: Mobility device, alternative to conventional combustion-fueled vehicles
- CS
Charging Station: Device to charge the EV Battery when connected
- HP
Heat Pump: Device to convert electrical into thermal power using ambient energy.
Parameters used in test scenarios
SIM_CONFIGinformation about used models/simulators, their paths and what data to store for each model
STARTsimulation starting time (e.g. 2023-01-01 00:00:00)
ENDsimulation ending time (e.g. 2023-01-02 00:00:00 for a full day calculation)
N_STEPSnumber of steps that should be simulated, calculated from start and end time (e.g. 96 steps for a day with 15 min timesteps)
STEP_SIZE_IN_SECONDSlength of one (pre-defined) timestep in seconds (e.g. 15 min steps: 15*60 sec = 900 sec)
USE_FORECASTTrue-False value whether to consider forecasts in the simulation or not
FAQ
What is the process of building Model-Factories at the start of a simulation? examplesim = world.start("ExampleSim", eidprefix="Model")
The resulting
examplesimis an entity of the classmosaik.scenario.ModelFactory. It can create and store the entities of an example model.
What can one do in case of an ImportError when running the example scenarios? Like Could not import module: No module named 'XXX' --> No module named 'XXX' (maybe after merging main into your branch)?
Maybe some new package was added to the requirements, try to install them again by
pip install -e .and see wether any packages were newly installed.
What about an error like mosaik.exceptions.ScenarioError: At least one attribute does not exist: Entity('XXXSim-0', 'Entity XY', 'XXXSim', model).zzz when running a scenarios?
It seems like mosaik is trying to connect models in the setup of your scenario and one model attribute cannot be found. Look at the
METAof the specific simulator and check whether the attribute is listed there - which it should be (also see next question).
What attributes does a model have?
For that you should have a look at the
METAof the simulator or optionally within the model class itself.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...
- What inputs does a model have?
Have a look at the
VALID_PARAMETERSstored in each 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 "cs_strategy": { 23 "types": [str], 24 "values": ["max_p", "balanced", "night_charging", "solar_charging"], 25 }, 26...
Exemplarily the
model_dataof the test scenarios set (at least some of) these parameters and their initial values for the models:e.g. model_data_building.json (01/24)1{ 2 "ems": [ 3 { 4 "cs_strategy": "balanced" 5 } 6 ],
- What connections does a model have?
For that the eELib provides the
model_connections/model_connect_config.jsonfile, where all of theFROM-TO-CONNECTIONSare given for each model type implemented in the eELib:e.g. model_connect_config.json (01/24)10"HEMS_default": { 11 "PVLib": [["p_set_pv", "p_set"]], 12 "BSS": [ 13 [ 14 "p_set_storage", 15 "p_set" 16 ] 17 ], 18 "ChargingStation": [ 19 [ 20 "p_set_charging_station", 21 "p_set" 22 ] 23 ], 24...
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},
Extracted from these two examples above can be the sending of values for attributes
p,p_minandp_maxfromBSStoHEMSand the return of a value forp_set.
What can I do in case of simulations that raise an error because the maximum amount of iterations for a simulation step was exceeded?
See the explanation in the section about mosaik’s event-based simulation behaviour.
Units
Make use of the SI-units!!
Power: W
Time (e.g. simulation time): s
Energy: Wh
Temperature: Degree celsius
…