A modern, light-weight, Eigen-based C++ interface to Nonlinear Programming solvers, such as Ipopt and Snopt to solve problem like this:
For an overview, see Github's README.md .