cyqlone develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
Loading...
Searching...
No Matches
cyqlone::qpalm::Solver< Backend > Class Template Reference

#include <cyqlone/qpalm/solver.hpp>

Detailed Description

template<class Backend>
class cyqlone::qpalm::Solver< Backend >
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 84 of file solver.hpp.

Public Types

using BackendStats = typename detail::backend_stats_type<backend_type>::type

Public Member Functions

SolverStatus operator() ()
index_t get_num_variables () const
index_t get_num_equality_constraints () const
index_t get_num_inequality_constraints () const
bool has_result () const
void get_solution (std::span< real_t >) const
std::vector< real_t > get_solution () const
void get_equality_multipliers (std::span< real_t >) const
std::vector< real_t > get_equality_multipliers () const
void get_equality_constraints (std::span< real_t >) const
std::vector< real_t > get_equality_constraints () const
void get_inequality_multipliers (std::span< real_t >) const
std::vector< real_t > get_inequality_multipliers () const
void get_inequality_constraints (std::span< real_t >) const
std::vector< real_t > get_inequality_constraints () const
void get_penalty_factors (std::span< real_t >) const
std::vector< real_t > get_penalty_factors () const
void warm_start_solution ()
void set_initial_guess (std::span< const real_t > x, std::span< const real_t > y, std::span< const real_t > λ)
bool get_initial_guess (std::span< real_t > x, std::span< real_t > y, std::span< real_t > λ)
void set_b_eq (std::span< const real_t > b_eq)
void set_b_lb (std::span< const real_t > b_lb)
void set_b_ub (std::span< const real_t > b_ub)
void stop ()
 Solver (Backend backend, Settings settings={})
 Solver (const Solver &)=delete
Solveroperator= (const Solver &)=delete
 Solver (Solver &&) noexcept
Solveroperator= (Solver &&) noexcept
 ~Solver ()

Public Attributes

Backend backend
Settings settings
std::unique_ptr< SolverImplementation< backend_type > > impl {}
std::optional< SolverStatsstats = std::nullopt
std::optional< BackendStatsstats_backend = std::nullopt
guanaqo::AtomicStopSignal stop_signal {}

Private Types

using backend_type = detail::backend_type_t<Backend>

Private Member Functions

SolverStatus do_solve ()
 Run QPALM on the scaled problem.

Member Typedef Documentation

◆ backend_type

template<class Backend>
using cyqlone::qpalm::Solver< Backend >::backend_type = detail::backend_type_t<Backend>
private

Definition at line 86 of file solver.hpp.

◆ BackendStats

template<class Backend>
using cyqlone::qpalm::Solver< Backend >::BackendStats = typename detail::backend_stats_type<backend_type>::type

Definition at line 91 of file solver.hpp.

Constructor & Destructor Documentation

◆ Solver() [1/3]

template<class Backend>
Solver::Solver ( Backend backend,
Settings settings = {} )

Definition at line 624 of file solver.tpp.

◆ Solver() [2/3]

template<class Backend>
cyqlone::qpalm::Solver< Backend >::Solver ( const Solver< Backend > & )
delete

◆ Solver() [3/3]

template<class Backend>
Solver::Solver ( Solver< Backend > && )
defaultnoexcept

◆ ~Solver()

template<class Backend>
Solver::~Solver ( )
default

Member Function Documentation

◆ do_solve()

template<class Backend>
SolverStatus Solver::do_solve ( )
nodiscardprivate

Run QPALM on the scaled problem.

Definition at line 101 of file solver.tpp.

◆ operator()()

template<class Backend>
SolverStatus cyqlone::qpalm::Solver< Backend >::operator() ( )
inline

Definition at line 93 of file solver.hpp.

◆ get_num_variables()

template<class Backend>
index_t Solver::get_num_variables ( ) const
nodiscard

Definition at line 502 of file solver.tpp.

◆ get_num_equality_constraints()

template<class Backend>
index_t Solver::get_num_equality_constraints ( ) const
nodiscard

Definition at line 506 of file solver.tpp.

◆ get_num_inequality_constraints()

template<class Backend>
index_t Solver::get_num_inequality_constraints ( ) const
nodiscard

Definition at line 510 of file solver.tpp.

◆ has_result()

template<class Backend>
bool Solver::has_result ( ) const
nodiscard

Definition at line 514 of file solver.tpp.

◆ get_solution() [1/2]

template<class Backend>
void Solver::get_solution ( std::span< real_t > x) const

Definition at line 518 of file solver.tpp.

◆ get_solution() [2/2]

template<class Backend>
std::vector< real_t > Solver::get_solution ( ) const
nodiscard

Definition at line 523 of file solver.tpp.

◆ get_equality_multipliers() [1/2]

template<class Backend>
void Solver::get_equality_multipliers ( std::span< real_t > λ) const

Definition at line 529 of file solver.tpp.

◆ get_equality_multipliers() [2/2]

template<class Backend>
std::vector< real_t > Solver::get_equality_multipliers ( ) const
nodiscard

Definition at line 534 of file solver.tpp.

◆ get_equality_constraints() [1/2]

template<class Backend>
void Solver::get_equality_constraints ( std::span< real_t > Mxb) const

Definition at line 540 of file solver.tpp.

◆ get_equality_constraints() [2/2]

template<class Backend>
std::vector< real_t > Solver::get_equality_constraints ( ) const
nodiscard

Definition at line 545 of file solver.tpp.

◆ get_inequality_multipliers() [1/2]

template<class Backend>
void Solver::get_inequality_multipliers ( std::span< real_t > y) const

Definition at line 551 of file solver.tpp.

◆ get_inequality_multipliers() [2/2]

template<class Backend>
std::vector< real_t > Solver::get_inequality_multipliers ( ) const
nodiscard

Definition at line 556 of file solver.tpp.

◆ get_inequality_constraints() [1/2]

template<class Backend>
void Solver::get_inequality_constraints ( std::span< real_t > Ax) const

Definition at line 562 of file solver.tpp.

◆ get_inequality_constraints() [2/2]

template<class Backend>
std::vector< real_t > Solver::get_inequality_constraints ( ) const
nodiscard

Definition at line 567 of file solver.tpp.

◆ get_penalty_factors() [1/2]

template<class Backend>
void cyqlone::qpalm::Solver< Backend >::get_penalty_factors ( std::span< real_t > ) const

◆ get_penalty_factors() [2/2]

template<class Backend>
std::vector< real_t > cyqlone::qpalm::Solver< Backend >::get_penalty_factors ( ) const
nodiscard

◆ warm_start_solution()

template<class Backend>
void Solver::warm_start_solution ( )

Definition at line 573 of file solver.tpp.

◆ set_initial_guess()

template<class Backend>
void Solver::set_initial_guess ( std::span< const real_t > x,
std::span< const real_t > y,
std::span< const real_t > λ )

Definition at line 578 of file solver.tpp.

◆ get_initial_guess()

template<class Backend>
bool Solver::get_initial_guess ( std::span< real_t > x,
std::span< real_t > y,
std::span< real_t > λ )

Definition at line 591 of file solver.tpp.

◆ set_b_eq()

template<class Backend>
void Solver::set_b_eq ( std::span< const real_t > b_eq)

Definition at line 601 of file solver.tpp.

◆ set_b_lb()

template<class Backend>
void Solver::set_b_lb ( std::span< const real_t > b_lb)

Definition at line 605 of file solver.tpp.

◆ set_b_ub()

template<class Backend>
void Solver::set_b_ub ( std::span< const real_t > b_ub)

Definition at line 609 of file solver.tpp.

◆ stop()

template<class Backend>
void cyqlone::qpalm::Solver< Backend >::stop ( )
inline

Definition at line 130 of file solver.hpp.

◆ operator=() [1/2]

template<class Backend>
Solver & cyqlone::qpalm::Solver< Backend >::operator= ( const Solver< Backend > & )
delete

◆ operator=() [2/2]

template<class Backend>
Solver< Backend > & Solver::operator= ( Solver< Backend > && )
defaultnoexcept

Member Data Documentation

◆ backend

template<class Backend>
Backend cyqlone::qpalm::Solver< Backend >::backend

Definition at line 98 of file solver.hpp.

◆ settings

template<class Backend>
Settings cyqlone::qpalm::Solver< Backend >::settings

Definition at line 99 of file solver.hpp.

◆ impl

template<class Backend>
std::unique_ptr<SolverImplementation<backend_type> > cyqlone::qpalm::Solver< Backend >::impl {}

Definition at line 100 of file solver.hpp.

◆ stats

template<class Backend>
std::optional<SolverStats> cyqlone::qpalm::Solver< Backend >::stats = std::nullopt

Definition at line 101 of file solver.hpp.

◆ stats_backend

template<class Backend>
std::optional<BackendStats> cyqlone::qpalm::Solver< Backend >::stats_backend = std::nullopt

Definition at line 102 of file solver.hpp.

◆ stop_signal

template<class Backend>
guanaqo::AtomicStopSignal cyqlone::qpalm::Solver< Backend >::stop_signal {}

Definition at line 103 of file solver.hpp.


The documentation for this class was generated from the following files:
  • src/qpalm/include/cyqlone/qpalm/solver.hpp
  • src/qpalm/include/cyqlone/qpalm/implementation/solver.tpp