qp_solver_collection
Public Member Functions | Public Attributes | Protected Attributes | List of all members
QpSolverCollection::QpSolverOsqp Class Reference

QP solver OSQP. More...

#include <QpSolverCollection.h>

Inheritance diagram for QpSolverCollection::QpSolverOsqp:
Inheritance graph
[legend]
Collaboration diagram for QpSolverCollection::QpSolverOsqp:
Collaboration graph
[legend]

Public Member Functions

 QpSolverOsqp ()
 Constructor. More...
 
virtual Eigen::VectorXd solve (int dim_var, int dim_eq, int dim_ineq, Eigen::Ref< Eigen::MatrixXd > Q, const Eigen::Ref< const Eigen::VectorXd > &c, const Eigen::Ref< const Eigen::MatrixXd > &A, const Eigen::Ref< const Eigen::VectorXd > &b, const Eigen::Ref< const Eigen::MatrixXd > &C, const Eigen::Ref< const Eigen::VectorXd > &d, const Eigen::Ref< const Eigen::VectorXd > &x_min, const Eigen::Ref< const Eigen::VectorXd > &x_max) override
 Solve QP. More...
 
- Public Member Functions inherited from QpSolverCollection::QpSolver
 QpSolver ()
 Constructor. More...
 
void printInfo (bool verbose=false, const std::string &header="") const
 Print information. More...
 
virtual Eigen::VectorXd solve (QpCoeff &qp_coeff)
 Solve QP. More...
 
QpSolverType type () const
 Get QP solver type. More...
 
bool solveFailed () const
 Get whether it failed to solve the QP. More...
 

Public Attributes

bool force_initialize_ = true
 Whether to initialize each time instead of doing a warm start. More...
 

Protected Attributes

std::unique_ptr< OsqpEigen::Solver > osqp_
 
Eigen::SparseMatrix< double > Q_sparse_
 
Eigen::VectorXd c_
 
Eigen::SparseMatrix< double > AC_with_bound_sparse_
 
Eigen::VectorXd bd_with_bound_min_
 
Eigen::VectorXd bd_with_bound_max_
 
double sparse_duration_ = 0
 
- Protected Attributes inherited from QpSolverCollection::QpSolver
QpSolverType type_ = QpSolverType::Uninitialized
 QP solver type. More...
 
bool solve_failed_ = false
 Whether it failed to solve the QP. More...
 

Additional Inherited Members

- Public Types inherited from QpSolverCollection::QpSolver
using clock = typename std::conditional< std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock >::type
 

Detailed Description

QP solver OSQP.

Todo:
Set without going through a dense matrix.

Definition at line 414 of file QpSolverCollection.h.

Constructor & Destructor Documentation

◆ QpSolverOsqp()

QpSolverCollection::QpSolverOsqp::QpSolverOsqp ( )

Constructor.

Member Function Documentation

◆ solve()

virtual Eigen::VectorXd QpSolverCollection::QpSolverOsqp::solve ( int  dim_var,
int  dim_eq,
int  dim_ineq,
Eigen::Ref< Eigen::MatrixXd >  Q,
const Eigen::Ref< const Eigen::VectorXd > &  c,
const Eigen::Ref< const Eigen::MatrixXd > &  A,
const Eigen::Ref< const Eigen::VectorXd > &  b,
const Eigen::Ref< const Eigen::MatrixXd > &  C,
const Eigen::Ref< const Eigen::VectorXd > &  d,
const Eigen::Ref< const Eigen::VectorXd > &  x_min,
const Eigen::Ref< const Eigen::VectorXd > &  x_max 
)
overridevirtual

Solve QP.

Implements QpSolverCollection::QpSolver.

Member Data Documentation

◆ AC_with_bound_sparse_

Eigen::SparseMatrix<double> QpSolverCollection::QpSolverOsqp::AC_with_bound_sparse_
protected

Definition at line 445 of file QpSolverCollection.h.

◆ bd_with_bound_max_

Eigen::VectorXd QpSolverCollection::QpSolverOsqp::bd_with_bound_max_
protected

Definition at line 447 of file QpSolverCollection.h.

◆ bd_with_bound_min_

Eigen::VectorXd QpSolverCollection::QpSolverOsqp::bd_with_bound_min_
protected

Definition at line 446 of file QpSolverCollection.h.

◆ c_

Eigen::VectorXd QpSolverCollection::QpSolverOsqp::c_
protected

Definition at line 444 of file QpSolverCollection.h.

◆ force_initialize_

bool QpSolverCollection::QpSolverOsqp::force_initialize_ = true

Whether to initialize each time instead of doing a warm start.

Note
Warm start did not give good results.

Definition at line 438 of file QpSolverCollection.h.

◆ osqp_

std::unique_ptr<OsqpEigen::Solver> QpSolverCollection::QpSolverOsqp::osqp_
protected

Definition at line 441 of file QpSolverCollection.h.

◆ Q_sparse_

Eigen::SparseMatrix<double> QpSolverCollection::QpSolverOsqp::Q_sparse_
protected

Definition at line 443 of file QpSolverCollection.h.

◆ sparse_duration_

double QpSolverCollection::QpSolverOsqp::sparse_duration_ = 0
protected

Definition at line 449 of file QpSolverCollection.h.


The documentation for this class was generated from the following file: