GithubHelp home page GithubHelp logo

jrl-umi3218 / eigen-quadprog Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 17.0 1.19 MB

eigen-quadprog allow to use the QuadProg QP solver with the Eigen3 library.

License: GNU Lesser General Public License v3.0

CMake 5.04% C++ 17.37% C 41.36% Fortran 34.32% Python 1.91%

eigen-quadprog's People

Contributors

gergondet avatar jorisv avatar pre-commit-ci[bot] avatar stephane-caron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eigen-quadprog's Issues

QPTest does not compile any more

Since #4 was merged I get the following make error:

[ 87%] Building CXX object tests/CMakeFiles/QPTest.dir/QPTest.cpp.o
cd /home/scaron/Software/eigen-quadprog/build/tests && /usr/bin/c++   -I/home/scaron/Software/eigen-quadprog/build -I/home/scaron/Software/eigen-quadprog/build/include -I/home/scaron/Software/eigen-quadprog/include -I/home/scaron/Software/eigen-quadprog/src -isystem /usr/local/include/eigen3  -pedantic -Wno-long-long -Wall -Wextra -Wcast-align -Wcast-qual -Wformat -Wwrite-strings -Wconversion  -O2 -g -DNDEBUG   -o CMakeFiles/QPTest.dir/QPTest.cpp.o -c /home/scaron/Software/eigen-quadprog/tests/QPTest.cpp
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp: In function ‘void ineqWithXBounds(Eigen::MatrixXd&, Eigen::VectorXd&, const VectorXd&, const VectorXd&)’:
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:90:12: error: ‘class std::vector<std::pair<int, double> >’ has no member named ‘emplace_back’
    lbounds.emplace_back(i, XL[i]);
            ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:92:12: error: ‘class std::vector<std::pair<int, double> >’ has no member named ‘emplace_back’
    ubounds.emplace_back(i, XU[i]);
            ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:108:9: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   const auto& b = lbounds[i];
         ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:108:15: error: ISO C++ forbids declaration of ‘b’ with no type [-fpermissive]
   const auto& b = lbounds[i];
               ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:108:28: error: invalid initialization of reference of type ‘const int&’ from expression of type ‘std::pair<int, double>’
   const auto& b = lbounds[i];
                            ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:109:14: error: request for member ‘first’ in ‘b’, which is of non-class type ‘const int’
   A(start, b.first) = -1.;
              ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:110:17: error: request for member ‘second’ in ‘b’, which is of non-class type ‘const int’
   B(start) = -b.second;
                 ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:116:9: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   const auto& b = ubounds[i];
         ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:116:15: error: ISO C++ forbids declaration of ‘b’ with no type [-fpermissive]
   const auto& b = ubounds[i];
               ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:116:28: error: invalid initialization of reference of type ‘const int&’ from expression of type ‘std::pair<int, double>’
   const auto& b = ubounds[i];
                            ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:117:14: error: request for member ‘first’ in ‘b’, which is of non-class type ‘const int’
   A(start, b.first) = 1.;
              ^
/home/scaron/Software/eigen-quadprog/tests/QPTest.cpp:118:16: error: request for member ‘second’ in ‘b’, which is of non-class type ‘const int’
   B(start) = b.second;
                ^
make[2]: *** [tests/CMakeFiles/QPTest.dir/QPTest.cpp.o] Error 1

On this system c++ is g++ (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904.

How to solve a problem without inequality constraints?

Hi there,

thanks for making this library! I'm trying to solve a problem where I don't have any inequality constraints, I've tried something like:

Eigen::QuadProgDense qp(..., ..., 0);
VectorXd c = VectorXd::Zero(getCostMatrix(dim).rows()); // zero linear term
auto Aeq = getConstraintMatrix(dim);
auto beq = getConstraintVector(dim);
MatrixXd Aineq;
VectorXd bineq;
qp.solve(H_[dim], c, Aeq, beq, Aineq, bineq);

But I get the following problem:

 /usr/include/eigen3/Eigen/src/Core/DenseBase.h:261: void Eigen::DenseBase<Derived>::resize(Eigen::Index, Eigen::Index) [with Derived = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; Eigen::Index = long int]: Assertion `rows == this->rows() && cols == this->cols() && "DenseBase::resize() does not actually allow to resize."' failed.

Any ideas?

problem

Hello, I'm working on this algorithm. Can you ask which paper you referred to?

Initial guess

Hello, I am using the Eigen::QuadProgDense solver and I wonder if there is a way to give an initial guess as an input. I am running an MPC and pushing the previous solutionto the qp would probably save some computation time.
Thank you for the info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.