Feature/energy system max demand fulfillment #824
Conversation
smartie2076
left a comment
There was a problem hiding this comment.
This will be really handy to have!
Some comments below
smartie2076
left a comment
There was a problem hiding this comment.
Closer to completion!
Notes:
- I think there is an indentiation error in the check itself (you can try that out by defining two busses and defining the different options that the test can fail)
- You can decrease the lines you have to write in the tests when you define the
dictbefore the invidivual test functions, and then usedeepcopywithin
|
ToDo:
This PR is almost complete. All tests are passing except test_check_energy_system_can_fulfill_max_demand_with_storage(). For some reason, it is still returning skip_check and opt_cap_storage as False even though dict_values[ENERGY_STORAGE][item][OPTIMIZE_CAP][VALUE] is True. |
smartie2076
left a comment
There was a problem hiding this comment.
You said this is almost ready for review - please remember to also update the changelog.md ;)
Can you also add your test in this section: https://multi-vector-simulator.readthedocs.io/en/latest/Model_Assumptions.html#input-verification
smartie2076
left a comment
There was a problem hiding this comment.
I have an error message when I run ``:
File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\C1_verification.py", line 810, in check_energy_system_can_fulfill_max_demand
dict_values[ENERGY_CONSUMPTION][item][DISPATCHABILITY][VALUE] is False:
KeyError: 'dispatchable'
This also results in my pytests not being started:
=========================================================================== short test summary info ============================================================================
ERROR tests/test_benchmark_scenarios.py - KeyError: 'dispatchable'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================== 2 warnings, 1 error in 18.98s =========================================================================
|
@smartie2076 this is because dict_values[ENERGY_CONSUMPTION][item][DISPATCHABILITY] does not exist, even for the excess sinks. Does a demand always require a csv timeseries input? If so that could be the check instead e.g.: Let me know what you think or if I am mistaken. |
c7b075d to
89fb30f
Compare
89fb30f to
12ded73
Compare
smartie2076
left a comment
There was a problem hiding this comment.
There are two minor things, but also a bigger proposal I still need to add - I am sorry! The explaination is in the comments.
I ran the master tests locally, and all but the known FileExistsError tests ran though sucessfully.
Have you been able to produce the warning with specific input data? I just now have not been able to do that (I only get the simulation to terminate), but I am not sure why. My input file (tests/inputs) is pretty large however, so maybe I am overseeing something...
89f756d to
2224f52
Compare
c6770e7 to
5692f1e
Compare
|
@smartie2076 now it is failing again, to do with the 'dispatchable' key... I havent got the chance to look in so much detail, but I can look on Thursday. Maybe keeping the check whether the 'dispatchable' key exists is still necessary. Asides from this, the next thing (and maybe final) to do is the benchmark test which I will look into as well on Thursday. |
5fd2ee8 to
7c3156e
Compare
7c3156e to
85e6c82
Compare
|
@smartie2076 I have merged the branch containing the fixes into this branch, and have created additional tests for dispatchable/non-dispatchable production assets. All tests have passed locally except I still get the windows errors in D0 |
|
Merged #844 previously into this branch. |
smartie2076
left a comment
There was a problem hiding this comment.
Almost ready to merge - small addition to the changelog needed and a list of all tests of the created function in its docstrings.
I am not sure if you did a merge error in C0 lines 1788 to 1794.
c178405 to
e797008
Compare
…Model_Assumptions.rst
… in test_C1_verification.py
e797008 to
c7192a4
Compare
smartie2076
left a comment
There was a problem hiding this comment.
One entry has to be added to the changelog, then ready to merge!
f56380d to
abac09f
Compare
Fix #782
Changes proposed in this pull request:
C1_verification.check_energy_system_can_fulfill_max_demand()C1_verification.check_energy_system_can_fulfill_max_demand()The following steps were realized, as well (if applies):
black . --exclude docs/)EXECUTE_TESTS_ON=master pytest)