# Constrained Optimization library for equality and inequality constraints

Any recommendations for choice of a constrained optimization library suitable for my optimization function? I am minimizing a i) non-linear function with linear equality and inequality constraints, and ii) have available the gradient and the hessian of the function.

If it helps, the function I am minimizing is the Kullback-Liebler divergence.

constrOptim only deals with inequality constraints. Quadprog handles quadratics. Trust does not support constraints. So the KL divergence does not fit into these solutions.

There are quite a few solutions on the R Cran Task page for Optimization. Iam able to perform the optimization in MATLAB using the fmincon() function which seems to use an interior-point or a trust-region-reflective. Ideally there is a library that is well-suited to the problem defined.

• Are the constraints linear? – cardinal Dec 14 '11 at 2:05
• @cardinal - yes - the constraints are linear – Ram Ahluwalia Dec 14 '11 at 2:12
• So, if your equality constraints are $A x = b$, at least a work-around for constrOptim would be to include both $A x \leq b$ and $A x \geq b$. No? – cardinal Dec 14 '11 at 2:14
• That is very clever. I will explore this and see how it performs. You should consider posting this as an answer. I'll keep the question open for a couple days to see what other tools are available – Ram Ahluwalia Dec 14 '11 at 2:55
• @cardinal trick doesn't help for interior point method, like the one of constrOptim, since the method need a starting point into the interior of the feasible region -not on the border – stackovergio Oct 2 '14 at 8:08