Closed Yu-ki-Koyama closed 3 years ago
Thank you for your contribution, @Yu-ki-Koyama.
I added it to DQ_Robotics Python as DQ_CPLEXSolver
. Could you test it and let me know how it goes?
Hi, @mmmarinho. Thank you. I tested it, and it worked well!
@Yu-ki-Koyama Great! Thanks again for the contribution.
Hi. I usually work with @mmmarinho. This time, I had trouble solving the quadratic programming and implemented a solver using the CPLEX Python API. @mmmarinho suggested me to share this code here, so I would like to do that.
Trouble
I'm using your DQ Robotics to develop our robotic system. And, I've utilized DQ_QuadprogSolver to solve the quadratic programming. Recently, I've been trying to solve tasks with priority. In this process, I need to solve two serial quadratic programmings, and I add the result of the first one to the second one as an equality constraint to ensure the first cost function remains minimal. Though I don't comment on the details, the second quadratic programming must have at least one answer theoretically. However, my program stops while solving the second one with an error like 'constraints are inconsistent, no solution.'
What I did
I chose to use another solver and utilized the CPLEX Python API. Then, my program never stops with errors. I'm not sure the error was because of DQ_QuadprogSolver, but I wrote a class file of the CPLEX Python API, so I would like to share it.
Cplex_QuadraticSolver.py
How to use
I use this class file as following.
Thank you.