How to customize oemof-B3¶
To use oemof-B3, you may want to modify some files, depending on what you want to model.
While you define scenarios in the directory scenarios, you can specify the structure of
your model in the directory model.
In the directory config you can furthermore choose or modify labels, hard coded constant
parameters or colors within plots.
Scenarios¶
For each scenario you define, you create a YAML-file within scenarios.
You have to provide a name and a label of your scenario.
Inside the fields at datetimeindex you specify which time period is examined in your scenario.
With start you define the start date and time. It must be given in the ISO 8601 format.
With freq you set the frequency in e.g. “H” (hours) and with periods the number of time steps.
In model_structure you pass the structure of your energy system (see section Model).
With paths_scalars and paths_timeseries you provide all paths to your scalar and time
series data.
A filter selection is specified for scalar data in filter_scalars and for time series in
filter_timeseries. Time series additionally can be filtered by a start time index.
For both, keys of scenarios are passed with scenario_key. These are used to filter the raw
data according to the corresponding keys. This way you can assign different values to attributes
or assign a different time series depending on the scenario.
If you want to calculate only one scenario, you can use a single scenario_key.
Model¶
The model directory is structured as follow:
model
├── model_structure
│ ├── model_structure_el_only.yml
│ ├── model_structure_full.yml
├── bus_attrs_update.yml
├── component_attrs_update.yml
├── foreign_keys_update.yml
├── __init__.py
Within directory model_structure you’ll find the structure of the whole energy system used
in oemof-B3 and the one with electricity sector only.
You can also set up your own energy system in a new YAML file.
In the parent directory model buses are stored in bus_attrs_update.yml which
differ from the default in oemoflex (compare
busses.yml in oemoflex).
The same applies to the files component_attr_update.yml and foreign_keys.yml.
These are extended for the energy system in oemof-B3 (or depending on the composition of your
energy system) with information deviating from the default in oemoflex (cf.
component_attrs
and
foreign_keys.yml)
Configuration¶
The config directory is structured as follow:
config
├── labels
│ ├── de.yml
│ ├── en.yml
├── __init__.py
├── colors.csv
├── colors.yml
├── config.py
├── settings.yml
Within directory labels there are YAML-files which contain labels.
They are used in some of the visualization scripts (cf. Visualization).
The labels are assigned to the keys of the components stored in
component_attrs_update.yml.
In the parent directory config colors are stored in the files colors.yml
and colors.csv. While colors.yml uses keys from
component_attrs_update.yml, colors.csv expects the labels of these keys.
In settings.yml, besides assumptions and values taken as constant, paths and settings in
oemof-B3 are stored.