New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Constraint validation for cases A and B #702
refactor: Constraint validation for cases A and B #702
Conversation
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…nt=infeasible%2Cunfeasible&year_start=1800&year_end=2019&corpus=en-2019&smoothing=0&case_insensitive=true ) Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…iew-refactoring-max_min_soc_timeseries # Conflicts: # flexmeasures/data/models/planning/storage.py
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…in}_extended` series Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…straints Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…ssions Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the function validate_constraint
to support arbitrary conditions with multiple elements.
Please, let me know any comment in the other PR 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already had some comments lined up in this PR, actually. So rather than moving them over, I'm posting them here.
FYI it's easier for me to review larger changes separately from the rest of PR #680, because I don't have to triage between code that is new and code that I've already reviewed.
…orageScheduler` (#680) * fix: deprecated decorator wasn't returning the value of the moved callable. Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: update test to check that the decorator is returning Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: add SOCValueSchema Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: pass soc_maxima and soc_minima to device_scheduler style: rename build_device_soc_targets to build_device_soc_values Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: add test test_soc_bounds_timeseries Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * test: check for inequality rather than equality constraints Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: correcting sunset version Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * refactor: use new function Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * refactor: finishing refactor (I forgot two calls). Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * docs: update the endpoint trigger_schedule with an example on how to use soc_minima Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: add constraint validation Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * docs: add chagelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * Review fixes max min soc timeseries (#700) * style: sphinx docstrings Signed-off-by: F.N. Claessen <felix@seita.nl> * style: more detailed type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * style: consistency Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: incomplete type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: validation A.1) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation B.2) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.1) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.3) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.4) Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: move statements to where they matter Signed-off-by: F.N. Claessen <felix@seita.nl> * style: consistency (also: https://books.google.com/ngrams/graph?content=infeasible%2Cunfeasible&year_start=1800&year_end=2019&corpus=en-2019&smoothing=0&case_insensitive=true ) Signed-off-by: F.N. Claessen <felix@seita.nl> * style: Validation B.2) Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: Constraint validation for cases A and B (#702) * style: sphinx docstrings Signed-off-by: F.N. Claessen <felix@seita.nl> * style: more detailed type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * style: consistency Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: incomplete type annotation Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: validation A.1) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation B.2) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.1) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.3) Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: Validation C.4) Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: move statements to where they matter Signed-off-by: F.N. Claessen <felix@seita.nl> * style: consistency (also: https://books.google.com/ngrams/graph?content=infeasible%2Cunfeasible&year_start=1800&year_end=2019&corpus=en-2019&smoothing=0&case_insensitive=true ) Signed-off-by: F.N. Claessen <felix@seita.nl> * style: Validation B.2) Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: Constraint validation for cases A and B Signed-off-by: F.N. Claessen <felix@seita.nl> * style: fixing typos Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: add comments clarifying why we need to sort the `{equals, max, min}_extended` series Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * refactor: create storage_device_constraints inside of add_storage_constraints Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * reactor: max_soc -> soc_max Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * reactor: min_soc -> soc_min Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * feat: update validate_constraint to accept arbitrary constraint expressions Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * style: fixing some refactor that affected the comments Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Co-authored-by: Victor Garcia Reolid <victor@seita.nl> * style: remove left-over print Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: escape backslash in regex Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Victor <victor@seita.nl> Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
@victorgarcia98 If you feel this is a good direction to head in for refactoring, please take over the branch and keep the refactoring work in this separate PR.