Simulation Configuration File
Simulation scenarios for the Illuminator are define using configuration files written in YAML. The structure of a configuration must be as in the example below.
A simulation file has four main sections:
scenario
: defines metadata and global variable for the simulation.models
: defines which models are included in the simulation.connections
: defines how the models in themodels
section must be connected for a particular simulation.monitor
: defines which inputs, outputs, and states of a particular model must be monitored and logged during simulation.
Example
The following is an example to explain the basic format of a configuration file. See the table below a description of each keyword and their default values. Optinal keywords can be ommitted, in those case the defaults will be used.
# An example of a configuration file for a simuation. Won't run successfully.
scenario:
name: "ScenarioTest" # name for the similation
start_time: '2012-01-01 00:00:00' # ISO 8601 start time
end_time: '2012-01-01 01:00:00'
time_resolution: 900 # time step in seconds (optional).
models: # list of models for the energy system
- name: CSVB # name for the model (must be unique)
type: CSV # name the model type in the Illuminator
parameters: # vary per model type
start: '2012-01-01 00:00:00'
datafile: './tests/data/solar-sample.csv'
- name: PV
type: PvAdapter
inputs: # vary per model type (optional)
G_Gh: null
G_Dh: null
outputs:
G_Gh: null
states:
state1: null
state2: null
triggers:
- D_Dh
- state2
connect: # necessary for running a simulation in a Raspberry Pi cluster
ip: 168.192.0.3 # IP of client machine
port: 5000
connections:
- from: CSVB.G_Gh # origin model, format: model_name.output_name
to: PV.G_Gh # destinatioin model, format: model_name.input_name
- from: CSVB.G_Dh
to: PV.G_Dh
- from: CSVB.G_Bn
to: PV.G_Bn
- from: CSVB.Ta
to: PV.Ta
- from: CSVB.hs
to: PV.hs
- from: CSVB.FF
to: PV.FF
- from: CSVB.Az
to: PV.Az
monitor:
file: './out.csv' # file where items are saved during simualation (optional)
items:
- PV.pv_gen # List of inputs, outputs or states to monitor
Keyword |
Description |
Optional |
Default |
---|---|---|---|
scenario: |
a set of global values |
||
|
A name for the simulation, internally |
||
|
start time for the simulation. |
||
|
end time for the simulation. |
||
|
number of seconds between |
☑ |
900 (15 min) |
models: |
a list of models for |
||
|
a name for the model. Must |
||
|
type of model. This must correspond |
||
|
a set of input-names and initial |
If the value is set to |
|
|
a set of output-names and initial |
If the value is set to |
|
|
a set of name-value pairs for |
☑ |
If ommited, the default values |
|
a set of name-value pairs considered |
☑ |
If ommited, the default |
|
names of inputs, output or states |
☑ |
|
|
to declare in which client a model runs |
☑ |
|
|
Ip of the client manchine that will run |
||
|
TCP port to use to connect to the |
☑ |
|
connections: |
how models connect to each other. |
||
|
origin of the connection declared as |
||
|
destination of the connection declared as |
||
monitor: |
|||
|
path to a CSV file to store results of |
☑ |
a |
|
a list of which inputs, outputs or states |