In the current tutorial, both of the constraints are active at the
optimum point. So, you can just change them into equality constraints
instead of inequality constraints and it should get the same answer.
That is, just change
nlopt_add_inequality_constraint
into
nlopt_add_equality_constraint
and then change the algorithm to something that supports equality
constraints, e.g. NLOPT_LD_SLSQP or NLOPT_LN_COBYLA.
Steven
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss