GCC Code Coverage Report


Directory: ./
File: src/solvers/solver-HQP-factory.cpp
Date: 2024-11-10 01:12:44
Exec Total Coverage
Lines: 0 5 0.0%
Branches: 0 10 0.0%

Line Branch Exec Source
1 //
2 // Copyright (c) 2017 CNRS
3 //
4 // This file is part of tsid
5 // tsid is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 // tsid is distributed in the hope that it will be
10 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // General Lesser Public License for more details. You should have
13 // received a copy of the GNU Lesser General Public License along with
14 // tsid If not, see
15 // <http://www.gnu.org/licenses/>.
16 //
17
18 #include <tsid/solvers/solver-HQP-factory.hpp>
19 #include <tsid/solvers/solver-HQP-eiquadprog.hpp>
20 #include <tsid/solvers/solver-HQP-eiquadprog-fast.hpp>
21
22 #ifdef TSID_QPMAD_FOUND
23 #include <tsid/solvers/solver-HQP-qpmad.hpp>
24 #endif
25
26 #ifdef TSID_WITH_PROXSUITE
27 #include <tsid/solvers/solver-proxqp.hpp>
28 #endif
29
30 #ifdef TSID_WITH_OSQP
31 #include <tsid/solvers/solver-osqp.hpp>
32 #endif
33
34 #ifdef QPOASES_FOUND
35 #include <tsid/solvers/solver-HQP-qpoases.hh>
36 #endif
37
38 namespace tsid {
39 namespace solvers {
40
41 SolverHQPBase* SolverHQPFactory::createNewSolver(const SolverHQP solverType,
42 const std::string& name) {
43 if (solverType == SOLVER_HQP_EIQUADPROG) return new SolverHQuadProg(name);
44
45 if (solverType == SOLVER_HQP_EIQUADPROG_FAST)
46 return new SolverHQuadProgFast(name);
47
48 #ifdef TSID_QPMAD_FOUND
49 if (solverType == SOLVER_HQP_QPMAD) return new SolverHQpmad(name);
50 #endif
51
52 #ifdef TSID_WITH_PROXSUITE
53 if (solverType == SOLVER_HQP_PROXQP) return new SolverProxQP(name);
54 #endif
55
56 #ifdef TSID_WITH_OSQP
57 if (solverType == SOLVER_HQP_OSQP) return new SolverOSQP(name);
58 #endif
59
60 #ifdef QPOASES_FOUND
61 if (solverType == SOLVER_HQP_QPOASES) return new Solver_HQP_qpoases(name);
62 #endif
63
64 PINOCCHIO_CHECK_INPUT_ARGUMENT(false, "Specified solver type not recognized");
65 return NULL;
66 }
67
68 } // namespace solvers
69 } // namespace tsid
70