Commit c3325378 authored by David Bommes's avatar David Bommes
Browse files

-changed number of iterations in ipopt solver

-added access functions for coefficients and rhs of linear constraints

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@68 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 31037bdd
...@@ -40,6 +40,7 @@ solve(NProblemGmmInterface* _problem, std::vector<NConstraintInterface*>& _const ...@@ -40,6 +40,7 @@ solve(NProblemGmmInterface* _problem, std::vector<NConstraintInterface*>& _const
app->Options()->SetStringValue("linear_solver", "ma57"); app->Options()->SetStringValue("linear_solver", "ma57");
// app->Options()->SetStringValue("derivative_test", "second-order"); // app->Options()->SetStringValue("derivative_test", "second-order");
// app->Options()->SetIntegerValue("print_level", 0); // app->Options()->SetIntegerValue("print_level", 0);
app->Options()->SetIntegerValue("max_iter", 100);
// Initialize the IpoptApplication and process the options // Initialize the IpoptApplication and process the options
Ipopt::ApplicationReturnStatus status; Ipopt::ApplicationReturnStatus status;
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
LinearConstraint(const ConstraintType _type = NC_EQUAL) : NConstraintInterface(_type) LinearConstraint(const ConstraintType _type = NC_EQUAL) : NConstraintInterface(_type)
{} {}
// linear equation of the form -> coeffs_^T * (x,1) =_type= 0 // linear equation of the form -> coeffs_^T *x + b_=_type= 0
LinearConstraint(const SVectorNC& _coeffs, const double _b, const ConstraintType _type = NC_EQUAL) : NConstraintInterface(_type) LinearConstraint(const SVectorNC& _coeffs, const double _b, const ConstraintType _type = NC_EQUAL) : NConstraintInterface(_type)
{ {
coeffs_ = _coeffs; coeffs_ = _coeffs;
...@@ -58,6 +58,9 @@ public: ...@@ -58,6 +58,9 @@ public:
return coeffs_.innerSize(); return coeffs_.innerSize();
} }
SVectorNC& coeffs() { return coeffs_;}
double& b() { return b_;}
virtual double eval_constraint ( const double* _x ) virtual double eval_constraint ( const double* _x )
{ {
double v = b_; double v = b_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment