EOPS Example
This example demonstrates a simple EOPS model simulation. The system is not a realistic example but rather contains debug data used during the development of EOPS features.
For instance, the exogenous price series consists of values like 0, 10, 20, etc., making it easy to validate that the exogenous price data is correctly written to the expected files.
Since this is a debug setup, no in-depth analysis of input and output data is provided. However, there are still several interesting features worth discussing.
### Setting Up an EOPS Simulation To start an EOPS simulation, two flags in the global settings must be configured:
model_type:“EOPS”simulation_type:“Serial”
Validation¶
Additionally, the input data must adhere to several rules. To ensure correctness, a thorough validation is performed using the validate_model() function.
The following list summarized the validation rules:
The model must contain one and only one area.
Neither DC nor AC lines are allowed.
A main price series must be present, but secondary price series are not allowed.
A valid detailed hydro system is required, meaning at least one reservoir and one plant must be included.
Aggregated hydro and batteries are not allowed.
Spill and curtailment series must be set.
Market steps of type
ts-spotfor both purchase and sale must be set.Other types of market steps are optional but not required.
Loads are optional
Wind and solar series are theoretically possible, but their real-world use is rare. - They are therefore restricted in the first version, but may be included later.
Market calibration areas are not allowed
Runtime enviroment¶
The runtime enviroment is only avtivated if the modeltype is set to be EOPS.
Input File¶
All system details are specified in the eops.json file below.
Expand to see full JSON listing.
{
"$schema": "https://gitlab.sintef.no/energy/ltm/pyltmapi/-/raw/main/model.schema.json",
"model": {
"global_settings": {
"name": "eops_test",
"output_path": "testout_EOPS/",
"delete_output_dir": false,
"generate_output_dir": true,
"model_type": "EOPS",
"simulation_type": "parallel",
"simulation_period": {
"timestamps": [
"2024-W01",
"2026-W01"
]
},
"historical_period": {
"timestamps": [
"1979-01-01T00:00:00Z",
"1989-01-01T00:00:00Z"
],
"scenarios": [
[
1,
0
]
],
"unit": "ON/OFF"
},
"max_iterations": 40,
"precision": 0.001,
"timesteps_per_week": 7,
"default_spill_cost": 0.01,
"default_load_penalty": 445.0,
"currency": "EUR"
},
"loads": [
{
"#comment": "Gruppe 16",
"name": "FLAT",
"capacity": {
"timestamps": [
"2024-01-01T00:00:00Z"
],
"scenarios": [
[
7
]
]
}
},
{
"#comment": "Gruppe 16",
"name": "FLAT2",
"capacity": {
"timestamps": [
"2024-01-01T00:00:00Z"
],
"scenarios": [
[
7
]
]
}
}
],
"market_steps": [
{
"name": "ts_spot_purchase",
"capacity": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
10.0
]
]
}
},
{
"name": "ts_spot_sale",
"capacity": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
-20.0
]
]
}
}
],
"inflow_series": [
{
"name": "small",
"series": {
"timestamps": [
"1900-01-01T00:00:00Z"
],
"scenarios": [
[
0.001
]
]
}
},
{
"name": "constant",
"series": {
"timestamps": [
"1900-01-01T00:00:00Z"
],
"scenarios": [
[
1.0
]
]
}
}
],
"reservoirs": [
{
"name": "LABRO",
"average_regulated_inflow": 6.359381359381359,
"degree_of_regulation": 4,
"initial_volume": 50,
"max_discharge": 30,
"reference_curve": {
"timestamps": [
"2024-04-22T00:00:00Z",
"2024-06-03T00:00:00Z",
"2024-12-30T00:00:00Z"
],
"scenarios": [
[
95.01,
0.0,
95.0
]
]
},
"regulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
},
"gross_head": 40.0,
"tailrace_elevation": 1030,
"volume_curve": {
"x": [
1050,
1100
],
"y": [
0,
100
]
}
},
{
"name": "VITTINGFOSS",
"average_regulated_inflow": 6.359381359381359,
"degree_of_regulation": 4,
"initial_volume": 50,
"max_discharge": 30,
"reference_curve": {
"timestamps": [
"2024-04-22T00:00:00Z",
"2024-06-03T00:00:00Z",
"2024-12-30T00:00:00Z"
],
"scenarios": [
[
95.01,
0.0,
95.0
]
]
},
"regulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
},
"gross_head": 40.0,
"tailrace_elevation": 1030,
"volume_curve": {
"x": [
1050,
1100
],
"y": [
0,
100
]
}
},
{
"name": "STORFALL",
"average_regulated_inflow": 6.359381359381359,
"degree_of_regulation": 4,
"initial_volume": 50,
"max_discharge": 30,
"reference_curve": {
"timestamps": [
"2024-04-22T00:00:00Z",
"2024-06-03T00:00:00Z",
"2024-12-30T00:00:00Z"
],
"scenarios": [
[
95.01,
0.0,
95.0
]
]
},
"regulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
},
"gross_head": 40.0,
"tailrace_elevation": 1030,
"volume_curve": {
"x": [
1050,
1100
],
"y": [
0,
100
]
}
},
{
"name": "BLASJO",
"average_regulated_inflow": 6.359381359381359,
"degree_of_regulation": 4,
"initial_volume": 50,
"max_discharge": 30,
"reference_curve": {
"timestamps": [
"2024-04-22T00:00:00Z",
"2024-06-03T00:00:00Z",
"2024-12-30T00:00:00Z"
],
"scenarios": [
[
95.01,
0.0,
95.0
]
]
},
"regulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
},
"gross_head": 40.0,
"tailrace_elevation": 1030,
"volume_curve": {
"x": [
1050,
1100
],
"y": [
0,
100
]
}
},
{
"name": "mid1",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 1,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 300,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"tailrace_elevation": 50.0,
"gross_head": 100.0
},
{
"name": "mid2",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 2,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 250,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"tailrace_elevation": 50.0,
"gross_head": 100.0
},
{
"name": "mid3",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 3,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 450,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"tailrace_elevation": 50.0,
"gross_head": 100.0
},
{
"name": "coupl_mid1",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 1,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 300,
"tailrace_elevation": 50.0,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"gross_head": 900
},
{
"name": "coupl_mid2",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 2,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 250,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"gross_head": 900
},
{
"name": "coupl_mid3",
"degree_of_regulation": 3,
"regulated_inflow_name": "constant",
"average_regulated_inflow": 3,
"max_discharge": 50,
"reference_curve": {
"timestamps": [
"2024-W15",
"2024-W30",
"2024-W47"
],
"scenarios": [
[
50,
250,
450
]
]
},
"initial_volume": 450,
"volume_curve": {
"x": [
1000,
1050
],
"y": [
0,
500
]
},
"gross_head": 900
}
],
"hydraulic_couplings": [
{
"name": "coupling_200",
"max_flow": 100
},
{
"name": "plant_coupling_100"
}
],
"plants": [
{
"name": "LABRO_plant",
"average_energy_equivalent": 0.12,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
0.12
]
]
},
"pq_curves": {
"2024-01-01T00:00:00Z": {
"y": [
0.0,
9.89
],
"x": [
0.0,
24.6
]
}
},
"average_unregulated_inflow": 0.6359381359,
"unregulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
}
},
{
"name": "VITTINGFOSS_plant",
"average_energy_equivalent": 0.12,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
0.12
]
]
},
"pq_curves": {
"2024-01-01T00:00:00Z": {
"y": [
0.0,
9.89
],
"x": [
0.0,
24.6
]
}
},
"average_unregulated_inflow": 0.635938135938136,
"unregulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
}
},
{
"name": "STORFALL_plant",
"average_energy_equivalent": 0.12,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
0.12
]
]
},
"pq_curves": {
"2024-01-01T00:00:00Z": {
"y": [
0.0,
9.89
],
"x": [
0.0,
24.6
]
}
},
"average_unregulated_inflow": 0.635938135938136,
"unregulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
}
},
{
"name": "BLASJO_plant",
"average_energy_equivalent": 0.12,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
0.12
]
]
},
"pq_curves": {
"2024-01-01T00:00:00Z": {
"y": [
0.0,
9.89
],
"x": [
0.0,
24.6
]
}
},
"average_unregulated_inflow": 0.635938135938136,
"unregulated_inflow": {
"#comment": "Refers to unregulated inflow label",
"timestamps": [
"0001-01-01T00:00:00Z"
],
"scenarios": [
[
37.5954019
]
]
}
},
{
"name": "plant_mid1",
"ownership": 100,
"average_energy_equivalent": 3.0,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
3.03
]
]
},
"pq_curves": {
"2023-01-02T00:00:00Z": {
"x": [
0.0,
70.00
],
"y": [
0.0,
300.0
]
}
},
"unregulated_inflow_name": "small",
"average_unregulated_inflow": 0.0
},
{
"name": "plant_mid2",
"ownership": 100,
"average_energy_equivalent": 3.0,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
3.03
]
]
},
"pq_curves": {
"2023-01-02T00:00:00Z": {
"x": [
0.0,
70.00
],
"y": [
0.0,
300.0
]
}
},
"unregulated_inflow_name": "small",
"average_unregulated_inflow": 0.0
},
{
"name": "plant_mid3",
"ownership": 100,
"average_energy_equivalent": 3.0,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
3.03
]
]
},
"pq_curves": {
"2023-01-02T00:00:00Z": {
"x": [
0.0,
70.00
],
"y": [
0.0,
300.0
]
}
},
"unregulated_inflow_name": "small",
"average_unregulated_inflow": 0.0
},
{
"name": "coupl_plant",
"ownership": 100,
"average_energy_equivalent": 3.0,
"discharge_energy_equivalent": {
"timestamps": [
"2023-01-02T00:00:00Z"
],
"scenarios": [
[
3.03
]
]
},
"pq_curves": {
"2023-01-02T00:00:00Z": {
"x": [
0.0,
70.00
],
"y": [
0.0,
300.0
]
}
},
"unregulated_inflow_name": "small",
"average_unregulated_inflow": 0.0,
"min_bypass_curve": {
"timestamps": [
"2024-W01",
"2024-W10",
"2024-W20",
"2024-W40",
"2024-W41"
],
"scenarios": [
[
0,
1,
10,
50,
0
]
]
}
}
],
"areas": [
{
"name": "numedal"
}
],
"price_series_main": [
{
"name": "HOVEDPRISREKKE.csv",
"probabilities": [
0.3,
0.2,
0.5
],
"series": {
"timestamps": [
"2024-01-01T00:00:00Z",
"2024-01-08T00:00:00Z",
"2024-01-15T00:00:00Z",
"2024-01-22T00:00:00Z",
"2024-01-29T00:00:00Z",
"2024-02-05T00:00:00Z",
"2024-02-12T00:00:00Z",
"2024-02-19T00:00:00Z",
"2024-02-26T00:00:00Z",
"2024-03-04T00:00:00Z"
],
"scenarios": [
[
0.0,
10.0,
20.0,
30.0,
40.0,
50.0,
60.0,
70.0,
80.0,
90.0
],
[
1.0,
11.0,
21.0,
31.0,
41.0,
51.0,
61.0,
71.0,
81.0,
91.0
],
[
2.0,
12.0,
22.0,
32.0,
42.0,
52.0,
62.0,
72.0,
82.0,
92.0
],
[
3.0,
13.0,
23.0,
33.0,
43.0,
53.0,
63.0,
73.0,
83.0,
93.0
],
[
4.0,
14.0,
24.0,
34.0,
44.0,
54.0,
64.0,
74.0,
84.0,
94.0
],
[
5.0,
15.0,
25.0,
35.0,
45.0,
55.0,
65.0,
75.0,
85.0,
95.0
],
[
6.0,
16.0,
26.0,
36.0,
46.0,
56.0,
66.0,
76.0,
86.0,
96.0
],
[
7.0,
17.0,
27.0,
37.0,
47.0,
57.0,
67.0,
77.0,
87.0,
97.0
],
[
8.0,
18.0,
28.0,
38.0,
48.0,
58.0,
68.0,
78.0,
88.0,
98.0
],
[
9.0,
19.0,
29.0,
39.0,
49.0,
59.0,
69.0,
79.0,
89.0,
99.0
],
[
100.0,
1010.0,
1020.0,
1030.0,
1040.0,
1050.0,
1060.0,
1070.0,
1080.0,
1090.0
],
[
101.0,
1011.0,
1021.0,
1031.0,
1041.0,
1051.0,
1061.0,
1071.0,
1081.0,
1091.0
],
[
102.0,
1012.0,
1022.0,
1032.0,
1042.0,
1052.0,
1062.0,
1072.0,
1082.0,
1092.0
],
[
103.0,
1013.0,
1023.0,
1033.0,
1043.0,
1053.0,
1063.0,
1073.0,
1083.0,
1093.0
],
[
104.0,
1014.0,
1024.0,
1034.0,
1044.0,
1054.0,
1064.0,
1074.0,
1084.0,
1094.0
],
[
105.0,
1015.0,
1025.0,
1035.0,
1045.0,
1055.0,
1065.0,
1075.0,
1085.0,
1095.0
],
[
106.0,
1016.0,
1026.0,
1036.0,
1046.0,
1056.0,
1066.0,
1076.0,
1086.0,
1096.0
],
[
107.0,
1017.0,
1027.0,
1037.0,
1047.0,
1057.0,
1067.0,
1077.0,
1087.0,
1097.0
],
[
108.0,
1018.0,
1028.0,
1038.0,
1048.0,
1058.0,
1068.0,
1078.0,
1088.0,
1098.0
],
[
109.0,
1019.0,
1029.0,
1039.0,
1049.0,
1059.0,
1069.0,
1079.0,
1089.0,
1099.0
],
[
200.0,
2010.0,
2020.0,
2030.0,
2040.0,
2050.0,
2060.0,
2070.0,
2080.0,
2090.0
],
[
201.0,
2011.0,
2021.0,
2031.0,
2041.0,
2051.0,
2061.0,
2071.0,
2081.0,
2091.0
],
[
202.0,
2012.0,
2022.0,
2032.0,
2042.0,
2052.0,
2062.0,
2072.0,
2082.0,
2092.0
],
[
203.0,
2013.0,
2023.0,
2033.0,
2043.0,
2053.0,
2063.0,
2073.0,
2083.0,
2093.0
],
[
204.0,
2014.0,
2024.0,
2034.0,
2044.0,
2054.0,
2064.0,
2074.0,
2084.0,
2094.0
],
[
205.0,
2015.0,
2025.0,
2035.0,
2045.0,
2055.0,
2065.0,
2075.0,
2085.0,
2095.0
],
[
206.0,
2016.0,
2026.0,
2036.0,
2046.0,
2056.0,
2066.0,
2076.0,
2086.0,
2096.0
],
[
207.0,
2017.0,
2027.0,
2037.0,
2047.0,
2057.0,
2067.0,
2077.0,
2087.0,
2097.0
],
[
208.0,
2018.0,
2028.0,
2038.0,
2048.0,
2058.0,
2068.0,
2078.0,
2088.0,
2098.0
],
[
209.0,
2019.0,
2029.0,
2039.0,
2049.0,
2059.0,
2069.0,
2079.0,
2089.0,
2099.0
]
]
}
}
],
"connections": [
{
"from": "FLAT",
"to": "numedal"
},
{
"from": "FLAT2",
"to": "numedal"
},
{
"from": "VITTINGFOSS",
"to": "numedal"
},
{
"from": "VITTINGFOSS",
"to": "VITTINGFOSS_plant"
},
{
"from": "LABRO",
"to": "numedal"
},
{
"from": "LABRO",
"to": "LABRO_plant"
},
{
"from": "STORFALL",
"to": "numedal"
},
{
"from": "STORFALL",
"to": "STORFALL_plant"
},
{
"from": "BLASJO",
"to": "numedal"
},
{
"from": "BLASJO",
"to": "BLASJO_plant"
},
{
"from": "ts_spot_purchase",
"to": "numedal"
},
{
"from": "ts_spot_sale",
"to": "numedal"
},
{
"from": "mid1",
"to": "plant_mid1"
},
{
"from": "mid2",
"to": "plant_mid2"
},
{
"from": "mid3",
"to": "plant_mid3"
},
{
"from": "plant_mid1",
"to": "plant_coupling_100"
},
{
"from": "plant_mid2",
"to": "plant_coupling_100"
},
{
"from": "plant_mid3",
"to": "plant_coupling_100"
},
{
"from": "mid1",
"to": "numedal"
},
{
"from": "coupl_mid1",
"to": "numedal"
},
{
"from": "coupl_mid1",
"to": "coupling_200"
},
{
"from": "coupl_mid2",
"to": "coupling_200"
},
{
"from": "coupl_mid3",
"to": "coupling_200"
},
{
"from": "coupl_mid3",
"to": "coupl_plant"
}
]
}
}Results¶
The link below provides access to a static Jupyter notebook where the LTM-API has been executed using the eops.json file as input. The notebook includes the results from the EOPS model presented through a series of figures.
Additionally, you can download the input model file here: