Closed Bachibouzouk closed 3 years ago
D2
majorly.I think for the constraints it would make sense not to have constraints, rather than having default values to them.
834 changed
D2
majorly.
I could reapply my changes on top, the gist of it is to make sure the code runs if the constraints are not defined (also good for back compatibility ;))
As you say that this will make sure that MVS stays downward compatible, lets use this PR to evade some issues. I would say that it does not really fix the issue with the parameters, but we have two similar issues anyway (#780 and #827), so one of them can be closed with this.
The error (missing Key in the last test of test_D0
) originate from a part of code which was in dev
, @ciaradunks do you know how it should be fixed?
Hi @Bachibouzouk! I think the issue is that now, with your changes, you do your pre-processing with D0.prepare_constraint_minimal_renewable_share()
first and then evaluate the constraint. Was this intentional?
Basically, before that the test was able to skip the constraints and run the test on tests/test_data/inputs_for_D0/mvs_config.json
. There, energyVector
is missing from the evaluated energyProduction consumption source:
So, you can either add an energyVector
to this, or you move the check for the value of the constraint before D0.prepare_constraint_minimal_renewable_share()
, if that is possible.
This is a reason why I think that D0, D1 would do better if we would not test them with a json file but with input csv files...
I think you should rather move the pre-processing into if-loop. It seems that would not cause any problems.
Are you intentionally not writing with functions you changed in the CHANGELOG? Especially that the validity checks are only performed if a constraint is actually added is also useful information.
Not writing the function names in the CHANGELOG was not intentional, merly laziness I would guess, I will update when I fix
Fix #827
Changes proposed in this pull request:
CONSTRAINTS
indict_values
The following steps were realized, as well (if applies):
black . --exclude docs/
)EXECUTE_TESTS_ON=master pytest
)For more information on how to contribute check the CONTRIBUTING.md.