diff --git a/.ci/travis/docs_versions.txt b/.ci/travis/docs_versions.txt index b5bc5d09eeeff..33fce2ce00d7f 100644 --- a/.ci/travis/docs_versions.txt +++ b/.ci/travis/docs_versions.txt @@ -1,5 +1,5 @@ DART 6 -v6.9.3 +v6.9.5 v6.8.5 v6.7.3 v6.6.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7efb04fe1b132..e20ce71170ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## DART 6 +### [DART 6.9.5 (2020-XX-XX)](https://github.com/dartsim/dart/milestone/63?closed=1) + +* Build + + * Added Ipopt >= 3.13 support: [#1506](https://github.com/dartsim/dart/pull/1506) + + ### [DART 6.9.4 (2020-08-30)](https://github.com/dartsim/dart/milestone/62?closed=1) * Build diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f39c235a4f6f..e64c9e8261866 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ endif() # If you change the version, please update the tag in package.xml. set(DART_MAJOR_VERSION "6") set(DART_MINOR_VERSION "9") -set(DART_PATCH_VERSION "4") +set(DART_PATCH_VERSION "5") set(DART_VERSION "${DART_MAJOR_VERSION}.${DART_MINOR_VERSION}.${DART_PATCH_VERSION}") set(DART_PKG_DESC "Dynamic Animation and Robotics Toolkit.") set(DART_PKG_EXTERNAL_DEPS "eigen, ccd, fcl, assimp, boost") diff --git a/dart/optimizer/ipopt/BackwardCompatibility.hpp b/dart/optimizer/ipopt/BackwardCompatibility.hpp new file mode 100644 index 0000000000000..d5f4a633a3bd8 --- /dev/null +++ b/dart/optimizer/ipopt/BackwardCompatibility.hpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2011-2019, The DART development contributors + * All rights reserved. + * + * The list of contributors can be found at: + * https://github.com/dartsim/dart/blob/master/LICENSE + * + * This file is provided under the following "BSD-style" License: + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_ +#define DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_ + +// clang-format off +#define IPOPT_VERSION_GE(x,y,z) \ + (IPOPT_VERSION_MAJOR > x || (IPOPT_VERSION_MAJOR >= x && \ + (IPOPT_VERSION_MINOR > y || (IPOPT_VERSION_MINOR >= y && \ + IPOPT_VERSION_PATCH >= z)))) +// clang-format on + +#endif // DART_OPTIMIZER_IPOPT_BACKWARDCOMPATIBILITY_HPP_ diff --git a/dart/optimizer/ipopt/CMakeLists.txt b/dart/optimizer/ipopt/CMakeLists.txt index 500f69b14e9d6..1adcc8942582a 100644 --- a/dart/optimizer/ipopt/CMakeLists.txt +++ b/dart/optimizer/ipopt/CMakeLists.txt @@ -28,6 +28,18 @@ dart_generate_include_header_file( ${header_names} ) +# Add definitions for the IpOpt version +string(REPLACE "." ";" ipopt_version_list ${IPOPT_VERSION}) +list(GET ipopt_version_list 0 IPOPT_VERSION_MAJOR) +list(GET ipopt_version_list 1 IPOPT_VERSION_MINOR) +list(GET ipopt_version_list 2 IPOPT_VERSION_PATCH) +target_compile_definitions(${target_name} + PUBLIC + IPOPT_VERSION_MAJOR=${IPOPT_VERSION_MAJOR} + IPOPT_VERSION_MINOR=${IPOPT_VERSION_MINOR} + IPOPT_VERSION_PATCH=${IPOPT_VERSION_PATCH} +) + # Install if(NOT DART_BUILD_DARTPY) install( @@ -36,3 +48,5 @@ if(NOT DART_BUILD_DARTPY) COMPONENT headers ) endif() + +dart_format_add(${hdrs} ${srcs}) diff --git a/dart/optimizer/ipopt/IpoptSolver.cpp b/dart/optimizer/ipopt/IpoptSolver.cpp index 84c2397e8d202..63871e206fe34 100644 --- a/dart/optimizer/ipopt/IpoptSolver.cpp +++ b/dart/optimizer/ipopt/IpoptSolver.cpp @@ -50,8 +50,7 @@ IpoptSolver::IpoptSolver(const Solver::Properties& _properties) } //============================================================================== -IpoptSolver::IpoptSolver(std::shared_ptr _problem) - : Solver(_problem) +IpoptSolver::IpoptSolver(std::shared_ptr _problem) : Solver(_problem) { assert(_problem); @@ -63,8 +62,8 @@ IpoptSolver::IpoptSolver(std::shared_ptr _problem) // Windows DLL. mIpoptApp = IpoptApplicationFactory(); mIpoptApp->Options()->SetStringValue("mu_strategy", "adaptive"); - mIpoptApp->Options()->SetStringValue("hessian_approximation", - "limited-memory"); + mIpoptApp->Options()->SetStringValue( + "hessian_approximation", "limited-memory"); } //============================================================================== @@ -83,14 +82,14 @@ bool IpoptSolver::solve() mIpoptApp->Options()->SetStringValue("output_file", getResultFileName()); std::size_t freq = mProperties.mIterationsPerPrint; - if(freq > 0) + if (freq > 0) { - mIpoptApp->Options()->SetNumericValue("print_frequency_iter", freq); + mIpoptApp->Options()->SetIntegerValue("print_frequency_iter", freq); } else { - mIpoptApp->Options()->SetNumericValue( - "print_frequency_iter", std::numeric_limits::infinity()); + mIpoptApp->Options()->SetIntegerValue( + "print_frequency_iter", std::numeric_limits::max()); } // Intialize the IpoptApplication and process the options @@ -121,7 +120,7 @@ std::string IpoptSolver::getType() const std::shared_ptr IpoptSolver::clone() const { std::shared_ptr newSolver( - new IpoptSolver(getSolverProperties(), mIpoptApp->clone())); + new IpoptSolver(getSolverProperties(), mIpoptApp->clone())); return newSolver; } @@ -133,23 +132,23 @@ const Ipopt::SmartPtr& IpoptSolver::getApplication() } //============================================================================== -Ipopt::SmartPtr IpoptSolver::getApplication() const +Ipopt::SmartPtr IpoptSolver::getApplication() + const { return mIpoptApp; } //============================================================================== -IpoptSolver::IpoptSolver(const Properties& _properties, - const Ipopt::SmartPtr& _app) +IpoptSolver::IpoptSolver( + const Properties& _properties, + const Ipopt::SmartPtr& _app) : Solver(_properties) { mIpoptApp = _app; } //============================================================================== -DartTNLP::DartTNLP(IpoptSolver* _solver) - : Ipopt::TNLP(), - mSolver(_solver) +DartTNLP::DartTNLP(IpoptSolver* _solver) : Ipopt::TNLP(), mSolver(_solver) { assert(_solver && "Null pointer is not allowed."); } @@ -161,11 +160,12 @@ DartTNLP::~DartTNLP() } //============================================================================== -bool DartTNLP::get_nlp_info(Ipopt::Index& n, - Ipopt::Index& m, - Ipopt::Index& nnz_jac_g, - Ipopt::Index& nnz_h_lag, - Ipopt::TNLP::IndexStyleEnum& index_style) +bool DartTNLP::get_nlp_info( + Ipopt::Index& n, + Ipopt::Index& m, + Ipopt::Index& nnz_jac_g, + Ipopt::Index& nnz_h_lag, + Ipopt::TNLP::IndexStyleEnum& index_style) { const std::shared_ptr& problem = mSolver->getProblem(); @@ -188,20 +188,22 @@ bool DartTNLP::get_nlp_info(Ipopt::Index& n, } //============================================================================== -bool DartTNLP::get_bounds_info(Ipopt::Index n, - Ipopt::Number* x_l, - Ipopt::Number* x_u, - Ipopt::Index m, - Ipopt::Number* g_l, - Ipopt::Number* g_u) +bool DartTNLP::get_bounds_info( + Ipopt::Index n, + Ipopt::Number* x_l, + Ipopt::Number* x_u, + Ipopt::Index m, + Ipopt::Number* g_l, + Ipopt::Number* g_u) { const std::shared_ptr& problem = mSolver->getProblem(); // here, the n and m we gave IPOPT in get_nlp_info are passed back to us. // If desired, we could assert to make sure they are what we think they are. assert(static_cast(n) == problem->getDimension()); - assert(static_cast(m) == problem->getNumEqConstraints() - + problem->getNumIneqConstraints()); + assert( + static_cast(m) + == problem->getNumEqConstraints() + problem->getNumIneqConstraints()); DART_UNUSED(m); // lower and upper bounds @@ -225,7 +227,7 @@ bool DartTNLP::get_bounds_info(Ipopt::Index n, // infinity. The default value of nlp_upper_bound_inf and // nlp_lower_bound_inf is 1e+19 and can be changed through ipopt options. g_l[idx] = -std::numeric_limits::infinity(); - g_u[idx] = 0; + g_u[idx] = 0; idx++; } @@ -233,15 +235,16 @@ bool DartTNLP::get_bounds_info(Ipopt::Index n, } //============================================================================== -bool DartTNLP::get_starting_point(Ipopt::Index n, - bool init_x, - Ipopt::Number* x, - bool init_z, - Ipopt::Number* /*z_L*/, - Ipopt::Number* /*z_U*/, - Ipopt::Index /*m*/, - bool init_lambda, - Ipopt::Number* /*lambda*/) +bool DartTNLP::get_starting_point( + Ipopt::Index n, + bool init_x, + Ipopt::Number* x, + bool init_z, + Ipopt::Number* /*z_L*/, + Ipopt::Number* /*z_U*/, + Ipopt::Index /*m*/, + bool init_lambda, + Ipopt::Number* /*lambda*/) { const std::shared_ptr& problem = mSolver->getProblem(); @@ -274,10 +277,11 @@ bool DartTNLP::get_starting_point(Ipopt::Index n, } //============================================================================== -bool DartTNLP::eval_f(Ipopt::Index _n, - const Ipopt::Number* _x, - bool /*_new_x*/, - Ipopt::Number& _obj_value) +bool DartTNLP::eval_f( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool /*_new_x*/, + Ipopt::Number& _obj_value) { const std::shared_ptr& problem = mSolver->getProblem(); @@ -290,10 +294,11 @@ bool DartTNLP::eval_f(Ipopt::Index _n, } //============================================================================== -bool DartTNLP::eval_grad_f(Ipopt::Index _n, - const Ipopt::Number* _x, - bool /*_new_x*/, - Ipopt::Number* _grad_f) +bool DartTNLP::eval_grad_f( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool /*_new_x*/, + Ipopt::Number* _grad_f) { const std::shared_ptr& problem = mSolver->getProblem(); @@ -305,16 +310,18 @@ bool DartTNLP::eval_grad_f(Ipopt::Index _n, } //============================================================================== -bool DartTNLP::eval_g(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Index _m, - Ipopt::Number* _g) +bool DartTNLP::eval_g( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Index _m, + Ipopt::Number* _g) { const std::shared_ptr& problem = mSolver->getProblem(); - assert(static_cast(_m) == problem->getNumEqConstraints() - + problem->getNumIneqConstraints()); + assert( + static_cast(_m) + == problem->getNumEqConstraints() + problem->getNumIneqConstraints()); DART_UNUSED(_m); // TODO(JS): @@ -329,7 +336,7 @@ bool DartTNLP::eval_g(Ipopt::Index _n, for (std::size_t i = 0; i < problem->getNumEqConstraints(); ++i) { _g[idx] = problem->getEqConstraint(i)->eval( - static_cast(x)); + static_cast(x)); idx++; } @@ -337,7 +344,7 @@ bool DartTNLP::eval_g(Ipopt::Index _n, for (std::size_t i = 0; i < problem->getNumIneqConstraints(); ++i) { _g[idx] = problem->getIneqConstraint(i)->eval( - static_cast(x)); + static_cast(x)); idx++; } @@ -345,20 +352,22 @@ bool DartTNLP::eval_g(Ipopt::Index _n, } //============================================================================== -bool DartTNLP::eval_jac_g(Ipopt::Index _n, - const Ipopt::Number* _x, - bool /*_new_x*/, - Ipopt::Index _m, - Ipopt::Index /*_nele_jac*/, - Ipopt::Index* _iRow, - Ipopt::Index* _jCol, - Ipopt::Number* _values) +bool DartTNLP::eval_jac_g( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool /*_new_x*/, + Ipopt::Index _m, + Ipopt::Index /*_nele_jac*/, + Ipopt::Index* _iRow, + Ipopt::Index* _jCol, + Ipopt::Number* _values) { const std::shared_ptr& problem = mSolver->getProblem(); - // If the iRow and jCol arguments are not nullptr, then IPOPT wants you to fill - // in the sparsity structure of the Jacobian (the row and column indices - // only). At this time, the x argument and the values argument will be nullptr. + // If the iRow and jCol arguments are not nullptr, then IPOPT wants you to + // fill in the sparsity structure of the Jacobian (the row and column indices + // only). At this time, the x argument and the values argument will be + // nullptr. if (nullptr == _values) { @@ -386,7 +395,7 @@ bool DartTNLP::eval_jac_g(Ipopt::Index _n, // Evaluate function values for equality constraints for (std::size_t i = 0; i < problem->getNumEqConstraints(); ++i) { - new (&grad)Eigen::Map(_values + idx, _n); + new (&grad) Eigen::Map(_values + idx, _n); problem->getEqConstraint(i)->evalGradient(x, grad); idx += _n; } @@ -394,7 +403,7 @@ bool DartTNLP::eval_jac_g(Ipopt::Index _n, // Evaluate function values for inequality constraints for (std::size_t i = 0; i < problem->getNumIneqConstraints(); ++i) { - new (&grad)Eigen::Map(_values + idx, _n); + new (&grad) Eigen::Map(_values + idx, _n); problem->getIneqConstraint(i)->evalGradient(x, grad); idx += _n; } @@ -404,37 +413,49 @@ bool DartTNLP::eval_jac_g(Ipopt::Index _n, } //============================================================================== -bool DartTNLP::eval_h(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Number _obj_factor, - Ipopt::Index _m, - const Ipopt::Number* _lambda, - bool _new_lambda, - Ipopt::Index _nele_hess, - Ipopt::Index* _iRow, - Ipopt::Index* _jCol, - Ipopt::Number* _values) +bool DartTNLP::eval_h( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Number _obj_factor, + Ipopt::Index _m, + const Ipopt::Number* _lambda, + bool _new_lambda, + Ipopt::Index _nele_hess, + Ipopt::Index* _iRow, + Ipopt::Index* _jCol, + Ipopt::Number* _values) { // TODO(JS): Not implemented yet. dterr << "[DartTNLP::eval_h] Not implemented yet.\n"; - return TNLP::eval_h(_n, _x, _new_x, _obj_factor, _m, _lambda, _new_lambda, - _nele_hess, _iRow, _jCol, _values); + return TNLP::eval_h( + _n, + _x, + _new_x, + _obj_factor, + _m, + _lambda, + _new_lambda, + _nele_hess, + _iRow, + _jCol, + _values); } //============================================================================== -void DartTNLP::finalize_solution(Ipopt::SolverReturn /*_status*/, - Ipopt::Index _n, - const Ipopt::Number* _x, - const Ipopt::Number* /*_z_L*/, - const Ipopt::Number* /*_z_U*/, - Ipopt::Index /*_m*/, - const Ipopt::Number* /*_g*/, - const Ipopt::Number* /*_lambda*/, - Ipopt::Number _obj_value, - const Ipopt::IpoptData* /*_ip_data*/, - Ipopt::IpoptCalculatedQuantities* /*_ip_cq*/) +void DartTNLP::finalize_solution( + Ipopt::SolverReturn /*_status*/, + Ipopt::Index _n, + const Ipopt::Number* _x, + const Ipopt::Number* /*_z_L*/, + const Ipopt::Number* /*_z_U*/, + Ipopt::Index /*_m*/, + const Ipopt::Number* /*_g*/, + const Ipopt::Number* /*_lambda*/, + Ipopt::Number _obj_value, + const Ipopt::IpoptData* /*_ip_data*/, + Ipopt::IpoptCalculatedQuantities* /*_ip_cq*/) { const std::shared_ptr& problem = mSolver->getProblem(); @@ -446,5 +467,5 @@ void DartTNLP::finalize_solution(Ipopt::SolverReturn /*_status*/, problem->setOptimalSolution(x); } -} // namespace optimizer -} // namespace dart +} // namespace optimizer +} // namespace dart diff --git a/dart/optimizer/ipopt/IpoptSolver.hpp b/dart/optimizer/ipopt/IpoptSolver.hpp index 56c512e02e917..30579d0799388 100644 --- a/dart/optimizer/ipopt/IpoptSolver.hpp +++ b/dart/optimizer/ipopt/IpoptSolver.hpp @@ -33,11 +33,17 @@ #ifndef DART_OPTIMIZER_IPOPT_IPOPTSOLVER_HPP_ #define DART_OPTIMIZER_IPOPT_IPOPTSOLVER_HPP_ -#include -#include - #include +#include "dart/optimizer/ipopt/BackwardCompatibility.hpp" +#if IPOPT_VERSION_GE(3, 13, 0) +#include +#include +#else +#include +#include +#endif + #include "dart/optimizer/Solver.hpp" namespace dart { @@ -50,7 +56,6 @@ class DartTNLP; class IpoptSolver : public Solver { public: - /// Default constructor IpoptSolver(const Solver::Properties& _properties = Solver::Properties()); @@ -76,10 +81,10 @@ class IpoptSolver : public Solver Ipopt::SmartPtr getApplication() const; private: - /// Constructor used during cloning - IpoptSolver(const Properties& _properties, - const Ipopt::SmartPtr& _app); + IpoptSolver( + const Properties& _properties, + const Ipopt::SmartPtr& _app); /// IPOPT nonlinear programming problem Ipopt::SmartPtr mNlp; @@ -92,7 +97,6 @@ class IpoptSolver : public Solver class DartTNLP : public Ipopt::TNLP { public: - friend class IpoptSolver; /// \brief @@ -100,96 +104,103 @@ class DartTNLP : public Ipopt::TNLP //------------------------- Ipopt::TNLP -------------------------------------- /// \brief Method to return some info about the nlp - bool get_nlp_info(Ipopt::Index& n, - Ipopt::Index& m, - Ipopt::Index& nnz_jac_g, - Ipopt::Index& nnz_h_lag, - Ipopt::TNLP::IndexStyleEnum& index_style) override; + bool get_nlp_info( + Ipopt::Index& n, + Ipopt::Index& m, + Ipopt::Index& nnz_jac_g, + Ipopt::Index& nnz_h_lag, + Ipopt::TNLP::IndexStyleEnum& index_style) override; /// \brief Method to return the bounds for my problem - bool get_bounds_info(Ipopt::Index n, - Ipopt::Number* x_l, - Ipopt::Number* x_u, - Ipopt::Index m, - Ipopt::Number* g_l, - Ipopt::Number* g_u) override; + bool get_bounds_info( + Ipopt::Index n, + Ipopt::Number* x_l, + Ipopt::Number* x_u, + Ipopt::Index m, + Ipopt::Number* g_l, + Ipopt::Number* g_u) override; /// \brief Method to return the starting point for the algorithm - bool get_starting_point(Ipopt::Index n, - bool init_x, - Ipopt::Number* x, - bool init_z, - Ipopt::Number* z_L, - Ipopt::Number* z_U, - Ipopt::Index m, - bool init_lambda, - Ipopt::Number* lambda) override; + bool get_starting_point( + Ipopt::Index n, + bool init_x, + Ipopt::Number* x, + bool init_z, + Ipopt::Number* z_L, + Ipopt::Number* z_U, + Ipopt::Index m, + bool init_lambda, + Ipopt::Number* lambda) override; /// \brief Method to return the objective value - bool eval_f(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Number& - _obj_value) override; + bool eval_f( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Number& _obj_value) override; /// \brief Method to return the gradient of the objective - bool eval_grad_f(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Number* _grad_f) override; + bool eval_grad_f( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Number* _grad_f) override; /// \brief Method to return the constraint residuals - bool eval_g(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Index _m, - Ipopt::Number* _g) override; + bool eval_g( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Index _m, + Ipopt::Number* _g) override; /// \brief Method to return: /// 1) The structure of the jacobian (if "values" is nullptr) /// 2) The values of the jacobian (if "values" is not nullptr) - bool eval_jac_g(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Index _m, - Ipopt::Index _nele_jac, - Ipopt::Index* _iRow, - Ipopt::Index* _jCol, - Ipopt::Number* _values) override; + bool eval_jac_g( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Index _m, + Ipopt::Index _nele_jac, + Ipopt::Index* _iRow, + Ipopt::Index* _jCol, + Ipopt::Number* _values) override; /// \brief Method to return: /// 1) The structure of the hessian of the lagrangian (if "values" is /// nullptr) /// 2) The values of the hessian of the lagrangian (if "values" is not /// nullptr) - bool eval_h(Ipopt::Index _n, - const Ipopt::Number* _x, - bool _new_x, - Ipopt::Number _obj_factor, - Ipopt::Index _m, - const Ipopt::Number* _lambda, - bool _new_lambda, - Ipopt::Index _nele_hess, - Ipopt::Index* _iRow, - Ipopt::Index* _jCol, - Ipopt::Number* _values) override; + bool eval_h( + Ipopt::Index _n, + const Ipopt::Number* _x, + bool _new_x, + Ipopt::Number _obj_factor, + Ipopt::Index _m, + const Ipopt::Number* _lambda, + bool _new_lambda, + Ipopt::Index _nele_hess, + Ipopt::Index* _iRow, + Ipopt::Index* _jCol, + Ipopt::Number* _values) override; /// \brief This method is called when the algorithm is complete so the TNLP /// can store/write the solution - void finalize_solution(Ipopt::SolverReturn _status, - Ipopt::Index _n, - const Ipopt::Number* _x, - const Ipopt::Number* _z_L, - const Ipopt::Number* _z_U, - Ipopt::Index _m, - const Ipopt::Number* _g, - const Ipopt::Number* _lambda, - Ipopt::Number _obj_value, - const Ipopt::IpoptData* _ip_data, - Ipopt::IpoptCalculatedQuantities* _ip_cq) override; + void finalize_solution( + Ipopt::SolverReturn _status, + Ipopt::Index _n, + const Ipopt::Number* _x, + const Ipopt::Number* _z_L, + const Ipopt::Number* _z_U, + Ipopt::Index _m, + const Ipopt::Number* _g, + const Ipopt::Number* _lambda, + Ipopt::Number _obj_value, + const Ipopt::IpoptData* _ip_data, + Ipopt::IpoptCalculatedQuantities* _ip_cq) override; private: - /// \brief explicit DartTNLP(IpoptSolver* _solver); @@ -206,7 +217,7 @@ class DartTNLP : public Ipopt::TNLP Eigen::MatrixXd mObjHessian; }; -} // namespace optimizer -} // namespace dart +} // namespace optimizer +} // namespace dart -#endif // DART_OPTIMIZER_IPOPT_IPOPTSOLVER_HPP_ +#endif // DART_OPTIMIZER_IPOPT_IPOPTSOLVER_HPP_ diff --git a/package.xml b/package.xml index 41b98cca53e22..e7fa7399b8d5d 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ a Catkin workspace. Catkin is not required to build DART. For more information, see: http://ros.org/reps/rep-0136.html --> dartsim - 6.9.4 + 6.9.5 DART (Dynamic Animation and Robotics Toolkit) is a collaborative, cross-platform, open source library created by the Georgia Tech Graphics