QPALM 1.1.0
Proximal Augmented Lagrangian method for Quadratic Programs
Public Member Functions
qpalm::Solver Class Reference

#include <qpalm.hpp>

Detailed Description

Main QPALM solver.

See also
qpalm_solve
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 121 of file qpalm.hpp.

+ Collaboration diagram for qpalm::Solver:

Public Member Functions

QPALM_CXX_EXPORT Solver (const Data &data, const Settings &settings)
 Create a new solver for the problem defined by data and with the parameters defined by settings. More...
 
QPALM_CXX_EXPORT void update_settings (const Settings &settings)
 
QPALM_CXX_EXPORT void update_bounds (std::optional< const_ref_vec_t > bmin, std::optional< const_ref_vec_t > bmax)
 
QPALM_CXX_EXPORT void update_q (const_ref_vec_t q)
 
QPALM_CXX_EXPORT void update_Q_A (const_ref_vec_t Q_vals, const_ref_vec_t A_vals)
 
QPALM_CXX_EXPORT void warm_start (std::optional< const_ref_vec_t > x, std::optional< const_ref_vec_t > y)
 
QPALM_CXX_EXPORT void solve ()
 Solve the problem. More...
 
QPALM_CXX_EXPORT SolutionView get_solution () const
 Get the solution computed by solve(). More...
 
QPALM_CXX_EXPORT const QPALMInfoget_info () const
 Get the solver information from the last call to solve(). More...
 
QPALM_CXX_EXPORT const_borrowed_vec_t get_prim_inf_certificate () const
 Get the certificate of primal infeasibility of the problem. More...
 
QPALM_CXX_EXPORT const_borrowed_vec_t get_dual_inf_certificate () const
 Get the certificate of dual infeasibility of the problem. More...
 
index_t get_n () const
 Get the problem dimension \( n \) (size of \( x \)). More...
 
index_t get_m () const
 Get the number of constraints \( m \). More...
 
QPALM_CXX_EXPORTconst ::QPALMWorkspaceget_c_work_ptr () const
 Get a pointer to the underlying C workspace data structure. More...
 

Constructor & Destructor Documentation

◆ Solver()

qpalm::Solver::Solver ( const Data data,
const Settings settings 
)

Create a new solver for the problem defined by data and with the parameters defined by settings.

Definition at line 25 of file qpalm.cpp.

Member Function Documentation

◆ get_c_work_ptr()

QPALM_CXX_EXPORTconst ::QPALMWorkspace * qpalm::Solver::get_c_work_ptr ( ) const
inline

Get a pointer to the underlying C workspace data structure.

See also
QPALMWorkspace

Definition at line 174 of file qpalm.hpp.

◆ get_dual_inf_certificate()

const_borrowed_vec_t qpalm::Solver::get_dual_inf_certificate ( ) const

Get the certificate of dual infeasibility of the problem.

Definition at line 76 of file qpalm.cpp.

◆ get_info()

const QPALMInfo & qpalm::Solver::get_info ( ) const

Get the solver information from the last call to solve().

Note
Returns a reference that is only valid as long as the solver is not destroyed.
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 66 of file qpalm.cpp.

◆ get_m()

index_t qpalm::Solver::get_m ( ) const
inline

Get the number of constraints \( m \).

See also
QPALMData::m

Definition at line 170 of file qpalm.hpp.

◆ get_n()

index_t qpalm::Solver::get_n ( ) const
inline

Get the problem dimension \( n \) (size of \( x \)).

See also
QPALMData::n

Definition at line 167 of file qpalm.hpp.

◆ get_prim_inf_certificate()

const_borrowed_vec_t qpalm::Solver::get_prim_inf_certificate ( ) const

Get the certificate of primal infeasibility of the problem.

Definition at line 71 of file qpalm.cpp.

◆ get_solution()

SolutionView qpalm::Solver::get_solution ( ) const

Get the solution computed by solve().

Note
Returns a view that is only valid as long as the solver is not destroyed.
See also
QPALMWorkspace::solution
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 54 of file qpalm.cpp.

◆ solve()

void qpalm::Solver::solve ( )

Solve the problem.

The solution will be available through get_solution() and the solver information and statistics through get_info().

See also
qpalm_solve
Examples
examples/cxx/qpalm_demo.cpp.

Definition at line 52 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ update_bounds()

void qpalm::Solver::update_bounds ( std::optional< const_ref_vec_t bmin,
std::optional< const_ref_vec_t bmax 
)
See also
qpalm_update_bounds

Definition at line 32 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ update_q()

void qpalm::Solver::update_q ( const_ref_vec_t  q)
See also
qpalm_update_q

Definition at line 38 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ update_Q_A()

void qpalm::Solver::update_Q_A ( const_ref_vec_t  Q_vals,
const_ref_vec_t  A_vals 
)
See also
qpalm_update_Q_A
Note
Updates only the values, sparsity pattern should remain the same.

Definition at line 42 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ update_settings()

void qpalm::Solver::update_settings ( const Settings settings)
See also
qpalm_update_settings

Definition at line 28 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ warm_start()

void qpalm::Solver::warm_start ( std::optional< const_ref_vec_t x,
std::optional< const_ref_vec_t y 
)
See also
qpalm_warm_start

Definition at line 46 of file qpalm.cpp.

+ Here is the call graph for this function:

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