Description
Background
The cyipopt version we used in testing caused an ImportError with the latest scipy versions; Therefore many of our tests for nonlinear constraints did not run.
Bug description
When trying to create the bounds for the numerical derivatives of nonlinear constraints, we use the user provided selector
on the
user provided bounds. This does not work if bounds are just specified for a subset of a pytree.
Solution
The bounds that are passed to process_nonlinear_constraints
already need to be extended to have the same structure as params
. To avoid similar places in other problem, this extension should already be done in create_optimization_problem
.
My temporary solution was to not pass bounds to the numerical derivatives of constraints which is usually not a big problem.
After fixing this, we need to comment the following code back in: