nlopt icon indicating copy to clipboard operation
nlopt copied to clipboard

Added matlab binding for vector valued constraints

Open nicolapiccinelli opened this issue 5 years ago • 5 comments

I've added to the mex file the binding for the vector-valued inequality and equality constraints. They are available through the opt structure (in the same way for the standard constraint functions) with the following parameters:

  • mfc to define vector-valued inequality function binding
  • mfc_count to define the amount of inequality constraints
  • mfc_tol to define the tolerance for each inequality constraint
  • mh to define vector-valued equality function binding
  • mh_count to define the amount of equality constraints
  • mh_tol to define the tolerance for each equality constraint

there is also the new callback evaluation function user_mfunction defined with the signature provided in the reference manual. This enhancement allows integrating nlopt as a custom solver for the nonlinear model predictive controller in Matlab (the actual limitation is the need for a double evaluation of the nonlinear constraints function).

The limitation could be avoided by adding another specific binding for inequality-equality function binding (nlmpc custom solver).

nicolapiccinelli avatar Jan 21 '20 12:01 nicolapiccinelli

please dont change the indentation or eols, this is annoying to review

jschueller avatar Jan 21 '20 12:01 jschueller

please dont change the indentation or eols, this is annoying to review

do you have a vscode profile which can be used?

nicolapiccinelli avatar Jan 21 '20 12:01 nicolapiccinelli

no, sorry

jschueller avatar Jan 21 '20 12:01 jschueller

This should solve #280

DWolfr avatar Jul 06 '20 09:07 DWolfr

We can use https://github.com/stevengj/nlopt/pull/313/files?w=true to review while ignoring whitespace changes…

stevengj avatar Nov 21 '20 14:11 stevengj