numeric
numeric copied to clipboard
Constrained optimization
How to implement constrained optimization?
- Which algorithm to use? Barrier method?
- How much derivative information is needed for constraint function(s)? How to pass constraint function(s)? Is it an Array of functions, or a function returning an Array? (Latter case: is the gradient a Jacobian? Will it need an order 3 Hessian as well? Does not seem reasonable since the penalty function ends up being scalar-valued.)
- How competitive should it be compared to numeric.solveLP, when used on a linear program?
- What is a suitable battery of tests for this? This is important, untested optimization programs usually don't work.
Hey @sloisel.
I developed a module for solving quadratic programming problems with constraints: https://github.com/albertosantini/node-quadprog
Hope that helps and available to changes, Alberto
Dear Alberto,
Thanks for your note. Your program is already included in numeric.js!
Thanks,
Sébastien Loisel
I see... Thanks for the reference.
I didn't implement the lagrangian, but it is matter of a few lines of code, just in case. I will link numericjs in quadprog readme.
Regards, Alberto
Hi,
Yes, I have included your License in the resources/ subfolder. I've slightly patched quadprog.js but otherwise left it untouched. I have also mentioned that you did this in the documentation.
Thanks,
Sébastien Loisel
Please, update to 1.4.0 (available in a few hours), because I fixed an important bug in the constraints and added input arguments validation.
Please, update also, LICENSE.quadprog
in resources
, because I removed the email address for the spam.
Available to any change, if you think there is a better way to include quadprog in numeric without copy&paste (more changes) when the package is updated.