Skip to content

Commit

Permalink
adapt test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-mannhardt committed Feb 23, 2024
1 parent 35b245f commit f008c69
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 739 deletions.
56 changes: 28 additions & 28 deletions tests/testcases/docu_test_cases.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
| **model** | **category** | **CT** | **ST** | **TT** | **carriers** | **nodes** | **intra-year** | **inter-year** | **responsible** | **comment** |
|-----------|--------------------------|-------------|--------------|----------|-------------------|-----------|----------------|---------------------|-----------------|---------------------------------------------------------|
| 1a | Base | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | |
| 1b | Base | boiler | gas storage | - | gas, heat | 2 | 1 TS | 1 year | LK | |
| 1c | Base | boiler | - | pipeline | gas, heat | 2 | 1 TS | 1 year | LK | |
| 1d | Base |boiler | - | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | exponential loss for transport technologies |
| 2a | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | PWA capex |
| 2b | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | min load |
| 2c | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | min capacity |
| 3a | multi-carrier | boiler | gas storage | pipeline | gas, heat, carbon | 2 | 1 TS | 1 year | AG | 2 output carriers |
| 3b | multi-carrier | boiler | gas storage | pipeline | gas, oxygen, heat | 2 | 1 TS | 1 year | AG | 2 input carriers |
| 4a | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS | 1 year | JM | |
| 4b | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg. | 1 year | JM | No values tested. TSA yields different values each run. |
| 4c | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | JM | |
| 4d | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, 1 year MF | JM | |
| 4e | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, 2 year MF | JM | |
| 4f | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg | 3 years, PF | JM | No values tested. TSA yields different values each run. |
| 4g | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg | 3 years, 2 year MF | JM | No values tested. TSA yields different values each run. |
| 5a | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test general scenario behavior |
| 5b | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test scenario set expansion |
| 5c | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test scenarios for system and analysis |
| 5d | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test list expansion |
| 6a | brownfield | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | |
| 6b | technology diffusion | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | JM | |
| 6c | construction times | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 2 years, PF | AG | |
| 7a | input data interpolation | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | LK | interpolation of yearly input data |
| 7b | input data interpolation | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | LK | skip interpolation of yearly input data |
| 8a | retrofitting technology | boiler, CCS | - | - | gas, heat | 2 | 1 TS | 1 year | AG | |
| **model** | **category** | **CT** | **ST** | **TT** | **carriers** | **nodes** | **intra-year** | **inter-year** | **responsible** | **comment** |
|-----------|--------------------------|-------------|--------------|----------|-----------------|-----------|----------------|---------------------|-----------------|-------------------------------------------------------------|
| 1a | Base | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | |
| 1b | Base | boiler | gas storage | - | gas, heat | 2 | 1 TS | 1 year | LK | No values tested because it will never be built with one ts |
| 1c | Base | boiler | - | pipeline | gas, heat | 2 | 1 TS | 1 year | LK | |
| 1d | Base | boiler | - | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | exponential loss for transport technologies |
| 2a | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | PWA capex |
| 2b | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | min load |
| 2c | MILP | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | min capacity |
| 3a | multi-carrier | boiler | gas storage | pipeline | gas, heat, carbon | 2 | 1 TS | 1 year | AG | 2 output carriers |
| 3b | multi-carrier | boiler | gas storage | pipeline | gas, oxygen, heat | 2 | 1 TS | 1 year | AG | 2 input carriers |
| 4a | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS | 1 year | JM | |
| 4b | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg. | 1 year | JM | No values tested. TSA yields different values each run. |
| 4c | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | JM | |
| 4d | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, 1 year MF | JM | |
| 4e | time | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, 2 year MF | JM | |
| 4f | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg | 3 years, PF | JM | No values tested. TSA yields different values each run. |
| 4g | time | boiler | gas storage | pipeline | gas, heat | 2 | full TS, agg | 3 years, 2 year MF | JM | No values tested. TSA yields different values each run. |
| 5a | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test general scenario behavior |
| 5b | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test scenario set expansion |
| 5c | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test scenarios for system and analysis |
| 5d | scenarios | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | AG | test list expansion |
| 6a | brownfield | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 1 year | JM | |
| 6b | technology diffusion | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | JM | |
| 6c | construction times | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 2 years, PF | AG | |
| 7a | input data interpolation | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | LK | interpolation of yearly input data |
| 7b | input data interpolation | boiler | gas storage | pipeline | gas, heat | 2 | 1 TS | 3 years, PF | LK | skip interpolation of yearly input data |
| 8a | retrofitting technology | boiler, CCS | - | - | gas, heat | 2 | 1 TS | 1 year | AG | |
17 changes: 2 additions & 15 deletions tests/testcases/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def compare_variables_results(test_model: str, results: Results, folder_path: st
def check_get_total_get_full_ts(
results: Results,
specific_scenario=False,
year=None,
element_name=None,
year=None,
discount_to_first_step=True,
get_doc=False,
):
Expand Down Expand Up @@ -258,18 +258,6 @@ def test_1d(config, folder_path):
res = Results(os.path.join("outputs", data_set_name))
compare_variables_results(data_set_name, res, folder_path)

def test_1e(config, folder_path):
# run the test
data_set_name = "test_1e"
optimization_setup = main(config=config, dataset_path=os.path.join(folder_path, data_set_name))

# compare the variables of the optimization setup
compare_variables(data_set_name, optimization_setup, folder_path)
# read the results and check again
res = Results(os.path.join("outputs", data_set_name))
compare_variables_results(data_set_name, res, folder_path)


def test_2a(config, folder_path):
# run the test
data_set_name = "test_2a"
Expand All @@ -283,7 +271,6 @@ def test_2a(config, folder_path):
res = Results(os.path.join("outputs", data_set_name))
compare_variables_results(data_set_name, res, folder_path)


def test_2b(config, folder_path):
# run the test
data_set_name = "test_2b"
Expand Down Expand Up @@ -585,4 +572,4 @@ def test_8a(config, folder_path):

config.solver["keep_files"] = False
folder_path = os.path.dirname(__file__)
test_1a(config, folder_path)
test_1d(config, folder_path)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"unit": "kiloEuro/GWh"
},
"availability_import": {
"default_value": "inf",
"default_value": 100,
"unit": "GW"
},
"availability_export": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"unit": "kiloEuro/GWh"
},
"availability_import": {
"default_value": "inf",
"default_value": 100,
"unit": "GW"
},
"availability_export": {
Expand Down

This file was deleted.

Empty file.
38 changes: 0 additions & 38 deletions tests/testcases/test_1e/energy_system/attributes.json

This file was deleted.

6 changes: 0 additions & 6 deletions tests/testcases/test_1e/energy_system/base_units.csv

This file was deleted.

139 changes: 0 additions & 139 deletions tests/testcases/test_1e/energy_system/set_edges.csv

This file was deleted.

34 changes: 0 additions & 34 deletions tests/testcases/test_1e/energy_system/set_nodes.csv

This file was deleted.

1 change: 0 additions & 1 deletion tests/testcases/test_1e/energy_system/unit_definitions.txt

This file was deleted.

Empty file.
38 changes: 0 additions & 38 deletions tests/testcases/test_1e/set_carriers/heat/attributes.json

This file was deleted.

2 changes: 0 additions & 2 deletions tests/testcases/test_1e/set_carriers/heat/demand.csv

This file was deleted.

Loading

0 comments on commit f008c69

Please sign in to comment.