-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Adds support for inequalities #1799
Conversation
Tests will fail |
if length(cstr) > 0 | ||
@named cons_sys = NonlinearSystem(cstr, dvs, ps) | ||
@named cons_sys = ConstraintsSystem(cstr, dvs, ps) |
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.
Would be nice to have a simplify step here that reduces the system of equalities and inequalities to a minimal form.
test/optimizationsystem.jl
Outdated
loss = (a - x)^2 + b * (y - x^2)^2 | ||
cons = [ | ||
-1 ≲ x^2 + y^2, | ||
x^2 + y^2 ≲ 500, |
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.
A nicer syntax can come later: -1 ≲ x^2 + y^2 ≲ 500
😄
Try to use a different solver in the tests |
d3ed888
to
9a8ef78
Compare
Should be good to go now. |
04e693b
to
d991bea
Compare
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.
The doc failure looks real. Could you merge master back to your PR?
Looks like you need to run the formatter |
Thanks a lot! |
@@ -8,9 +8,10 @@ OptimizationSystem | |||
|
|||
## Composition and Accessor Functions | |||
|
|||
- `get_eqs(sys)` or `equations(sys)`: The equation to be minimized. | |||
- `get_op(sys)` or `objective(sys)`: The objective to be minimized. |
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.
What the heck is this for? It ruins the uniformity and then bloats the namespace downstream. It serves no purpose other than to make things less consistent and break downstream codes. Let's revert this change. Just call the equations equations. In fact, there can be more than one, so it's not even the objective, so it's not even a correct description!
Depends on JuliaSymbolics/Symbolics.jl#717
#1786