Skip to content

Commit

Permalink
refactor: Constraint validation for cases A and B (#702)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Flix6x and victorgarcia98 committed May 26, 2023
1 parent fb36f49 commit 9aed98f
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 268 deletions.
Loading

0 comments on commit 9aed98f

Please sign in to comment.