-
Notifications
You must be signed in to change notification settings - Fork 3
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
Suppress Index in constraints #155
Comments
Can you elaborate please :D ? |
Hi @ocots @jbcaillau
|
constraint!(ocp, :initial; lb=[1,0,1], ub=[1,0,1], label=:initial_constraint) |
Ok, so basically everything after the constraint type is now a named argument. |
Another question @ocots :D
while the functional version fails (restoration error at first iteration)
I tried splitting in 3 separate constraints, same problem. Did I miss something ? To clarify: I don't need this specific formulation, I'm just trying to update my test cases with the different constraints types. |
@PierreMartinon there is a difference (that should not suffice to alter solving, though) as
Note that while the first syntax is allowed, it is more readable to write constraint!(ocp, :state; rg=1:end, lb=[r0,v0,mf], ub=[r0+0.2,vmax,m0]) Currently fixing a few things in the |
Yup. As I said, not a blocking issue, I'm just trying to figure out the different possibilities. |
@PierreMartinon please drop a pointer towards the example not converging with constraint!(ocp1, :state, f=(x,v)->x, lb=[r0,v0,mf], ub=[r0+0.2,vmax,m0]) |
Here you go. The one below (scroll) converges
but using the functional constraint fails
|
@jbcaillau, with Joseph we may have found the answer: ipopt will internally project the initial guess inside the variable bounds if needed. Here for instance the default init (0.1) will be projected for both r and m. When using a functional (nonlinear) constraint, there is no such initial guess adjustment, and for this problem in particular, having r<1 (earth radius) is known to be problematic. I'll recheck with a more sensible initial guess and see if the functional constraint converges. |
@PierreMartinon @joseph-gergaud nice! indeed, not having a box prevents |
Confirmed, we get the convergence back when initializing the state with r>1. No more remarks for me here, you can close when you want. |
@jbcaillau Please review what is done:
|
@ocots closed
closed in favour of control-toolbox/OptimalControl.jl#155 |
... but keep for (variable) times
The text was updated successfully, but these errors were encountered: