QPALM 1.2.5
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
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 140 of file qpalm.hpp.

+ Collaboration diagram for qpalm::Solver:

Public Member Functions

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

Constructor & Destructor Documentation

◆ Solver() [1/2]

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

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

Exceptions
std::invalid_argumentif calling qpalm_setup failed. This may be caused by invalid bounds or invalid settings.

Definition at line 27 of file qpalm.cpp.

◆ Solver() [2/2]

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

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

Exceptions
std::invalid_argumentif calling qpalm_setup failed. This may be caused by invalid bounds or invalid settings.

Definition at line 151 of file qpalm.hpp.

Member Function Documentation

◆ update_settings()

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

Definition at line 39 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 43 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 49 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 53 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 57 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ 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 63 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ cancel()

void qpalm::Solver::cancel ( )

Cancel the ongoing call to solve.

Thread- and signal handler-safe.

Definition at line 65 of file qpalm.cpp.

+ Here is the call graph for this function:

◆ 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 67 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 79 of file qpalm.cpp.

◆ 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 84 of file qpalm.cpp.

◆ 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 89 of file qpalm.cpp.

◆ 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 197 of file qpalm.hpp.

◆ get_m()

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

Get the number of constraints \( m \).

See also
QPALMData::m

Definition at line 200 of file qpalm.hpp.

◆ get_c_work_ptr()

const ::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 204 of file qpalm.hpp.


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