nlopt icon indicating copy to clipboard operation
nlopt copied to clipboard

Restriction on the number of equality constraints

Open tkx68 opened this issue 5 years ago • 2 comments

The NLopt optimizer returns NLOPT_INVALID_ARGS if you give more than n equality constraints in a problem with n variables. This is totally reasonable in linear settings but not necessarily in nonlinear problems. As far as I can see e.g. ISRES does not depend on this. Could we lift this restriction and maybe just offer a warning with the result?

This feature/restriction was introduced in 2010 as can be seen in the NEWS file.

The problem arises in the functions nlopt_add_equality_mconstraint and nlopt_add_precond_equality_constraint in the file options.c where nlopt_count_constraints is called.

tkx68 avatar Sep 29 '20 08:09 tkx68

Yes, I think it is fine to remove this check and just expect people to know what they are doing.

stevengj avatar Sep 29 '20 20:09 stevengj

Hi, any updates on this?

m-zanichelli avatar May 16 '23 09:05 m-zanichelli