Open timmercy opened 8 years ago
ok maybe, but
In my experience such information is valuable. Especially when you see ipopt during its iterations to struggle to meet some constraints. It can be a helpful way to spot mistakes in your formulation.
Joris showed me once how to do this. If I recall correctly: Before solving: from casadi.tools import reportBounds solver.setOption('warn_initial_bounds', True) solver.setOption('constr_viol_tol', 1e-4) After soving: solver.reportConstraints() reportBounds(nlp.getOutput("g"),solver.getInput("lbg"),solver.getInput("ubg"), showNonViolating=False)
You get a list in which you can see which constraints are fulfilled and which are violated. The only downside is that you don't get the name of the constraint, so you have to couple your list to your optimization formulation.
Is this implementation still possible in CasADi 3.0 or are there any other/better ways to do this?
well okay that method is lame; i'm sure you can do it better..
(if you used casadi structures, you can easily request readable labels for all entries of g)
Okay, I used this method indeed before CasADi structures were used
We do use casadi structs for constraints
Okay, I used this method indeed before CasADi structures were used
You are receiving this because you commented. Reply to this email directly or view it on GitHubhttps://github.com/meco-group/omg-tools/issues/28#issuecomment-213275143
Maybe we should add an option to show which constraints are violated in the case of an infeasible problem?