Open Peter230655 opened 1 month ago
No, that is currently not supported, but opty could support anything that fits an NLP problem that IPOPT can solve. See the definition here: https://coin-or.github.io/Ipopt/
Someone would have to implement inequality algebraic constraints in opty. It only constructs equality constraints at the moment.
Clear thanks! Should I close the issue, my question was answered!, or leave it open for possible future activity by someone?
I changed the title and we can leave it as an open issue.
I think this should be relatively easy to implement. We just need a flag to Problem
that lets you change:
$$ 0 < g(x) < 0 $$
to
$$ lower < g(x) < upper $$
Maybe something like:
Problem(..., inequalities=((3, -1.2, 5.0), (8, 0.0, np.inf)))
Where the first number in each tuple corresponds to the index in the equations of motion that holds $g(x)$ and the next two numbers are lower and upper bounds for that equation.
I guess, you meant $0 \leq g(x) \leq 0$ The situation I wanted to model would certainly be covered by this! Unfortunately, I would have no idea how to implement it. :-(
Unfortunately, I would have no idea how to implement it. :-(
I don't believe that. :)
Easier than GitHub / PRs ? :-)
As I was told, opty can handle algebraic constraint equations. Can it also handle alegebraic inequalities? What I mean is this: Say, $a, b \in R, a < b$. Let $f (q_i)$ be a scalar function of the generalized coordinates. Would $a < f(q_i) < b \longleftrightarrow$ $f(q_i) - b < 0$ $a - f(q_i) < 0$ be possible?
Thanks for any help!