rl-institut / multi-vector-simulator

Multi-vector Simulation Tool assessing and optimizing Local Energy Systems (LES) for the E-LAND project
GNU General Public License v2.0
21 stars 10 forks source link

Feature/energy system max demand fulfillment fix #844

Closed smartie2076 closed 3 years ago

smartie2076 commented 3 years ago

Hi @ciaradunks I found the issues why the check did not work. I commited in very small batches, so that you can check where what went wrong. I also added a pseudo-benchmark test that assessed whether the check was running in general.

There are two failing tests now.

This one is interesting, as timeseries_peak seems to be missing. All non-dispatchable PV assets have this parameter, so what could this be? It is the exception that we define a fuel source in energyProduction.csv. There must be an exeption for this case.

FAILED tests/test_benchmark_KPI.py::Test_Economic_KPI::test_benchmark_Economic_KPI_C2_E2 - KeyError: 'timeseries_peak'

And

FAILED tests/test_input_folder_parameters.py::test_input_folder_csv_files_have_required_parameters[D:\\PycharmProjects\\mvs_eland\\tests\\benchmark_test_outputs\\validity_chec
k_insufficient_capacities\\inputs]

Which I think is unimportant.

smartie2076 commented 3 years ago

My last commit now fixed the failing benchmark test. This means, however, that you need to adapt your pytests to also cover fuel sources and their exceptions.

Edit: Ie. you need a seperate test for ENERGY_PRODUCTION: {},, where you run the function for one dispatchable fuel source and one non-dispatchable renewbale source. (Btw, I did the if-loop based on TIMESERIES_PEAK which is not as beautiful as on DISPATCHABILITY, but it does the job).