jrl::qp::experimental::BlockGISolver Class Reference

#include <jrl-qp/experimental/BlockGISolver.h>

Inheritance diagram for jrl::qp::experimental::BlockGISolver:
Collaboration diagram for jrl::qp::experimental::BlockGISolver:

Classes

struct  Problem
 

Public Member Functions

 BlockGISolver ()
 
 BlockGISolver (int nbVar, int nbCstr, bool useBounds)
 
virtual ~BlockGISolver ()=default
 
TerminationStatus solve (const structured::StructuredG &G, const VectorConstRef &a, const structured::StructuredC &C, const VectorConstRef &bl, const VectorConstRef &bu, const VectorConstRef &xl, const VectorConstRef &xu, const std::vector< ActivationStatus > &as={})
 
- Public Member Functions inherited from jrl::qp::DualSolver
 DualSolver ()
 
 DualSolver (int nbVar, int nbCstr, bool useBounds)
 
virtual ~DualSolver ()=default
 
void resize (int nbVar, int nbCstr, bool useBounds)
 
void options (const SolverOptions &options)
 
WConstVector solution () const
 
WConstVector multipliers () const
 
double objectiveValue () const
 
int iterations () const
 
const std::vector< ActivationStatus > & activeSet () const
 
void resetActiveSet ()
 

Protected Member Functions

internal::InitTermination init_ () override
 
internal::SelectedConstraint selectViolatedConstraint_ (const VectorConstRef &x) const override
 
void computeStep_ (VectorRef z, VectorRef r, const internal::SelectedConstraint &sc) const override
 
StepLength computeStepLength_ (const internal::SelectedConstraint &sc, const VectorConstRef &x, const VectorConstRef &u, const VectorConstRef &z, const VectorConstRef &r) const override
 
bool addConstraint_ (const internal::SelectedConstraint &sc) override
 
bool removeConstraint_ (int l) override
 
double dot_ (const internal::SelectedConstraint &sc, const VectorConstRef &z) override
 
void resize_ (int nbVar, int nbCstr, bool useBounds) override
 
virtual internal::TerminationType processInitialActiveSet ()
 
virtual internal::TerminationType initializeComputationData ()
 
virtual internal::TerminationType initializePrimalDualPoints ()
 
- Protected Member Functions inherited from jrl::qp::DualSolver
TerminationStatus solve ()
 
TerminationStatus terminate (TerminationStatus status)
 
internal::InitTermination init ()
 
internal::SelectedConstraint selectViolatedConstraint (const VectorConstRef &x) const
 
void computeStep (VectorRef z, VectorRef r, const internal::SelectedConstraint &sc) const
 
StepLength computeStepLength (const internal::SelectedConstraint &sc, const VectorConstRef &x, const VectorConstRef &u, const VectorConstRef &z, const VectorConstRef &r) const
 
bool addConstraint (const internal::SelectedConstraint &sc)
 
bool removeConstraint (int l, VectorRef u)
 
virtual double dot (const internal::SelectedConstraint &sc, const VectorConstRef &z)
 

Protected Attributes

internal::Workspace work_d_
 
structured::StructuredJ J_
 
structured::StructuredQR QR_
 
internal::Workspace work_cx_
 
internal::Workspace work_bact_
 
Problem pb_
 
- Protected Attributes inherited from jrl::qp::DualSolver
SolverOptions options_
 
utils::Logger log_
 
int it_
 
int nbVar_
 
internal::ActiveSet A_
 
double f_
 
internal::Workspace work_x_
 
internal::Workspace work_z_
 
internal::Workspace work_u_
 
internal::Workspace work_r_
 
bool needToExpandMultipliers_
 

Detailed Description

Implementation of the Goldfarb-Idnani dual QP solver.

Constructor & Destructor Documentation

◆ BlockGISolver() [1/2]

jrl::qp::experimental::BlockGISolver::BlockGISolver ( )

◆ BlockGISolver() [2/2]

jrl::qp::experimental::BlockGISolver::BlockGISolver ( int  nbVar,
int  nbCstr,
bool  useBounds 
)

Pre-allocate the data for a problem with nbVar variables, nbCstr (general) constraints, and bounds if useBounds is true.

◆ ~BlockGISolver()

virtual jrl::qp::experimental::BlockGISolver::~BlockGISolver ( )
virtualdefault

Member Function Documentation

◆ addConstraint_()

bool jrl::qp::experimental::BlockGISolver::addConstraint_ ( const internal::SelectedConstraint sc)
overrideprotectedvirtual

Add a constraint to the active set and update the computation data accordingly.

Implements jrl::qp::DualSolver.

◆ computeStep_()

void jrl::qp::experimental::BlockGISolver::computeStep_ ( VectorRef  z,
VectorRef  r,
const internal::SelectedConstraint sc 
) const
overrideprotectedvirtual

Compute a primal step z and dual step r, given n+

Implements jrl::qp::DualSolver.

◆ computeStepLength_()

DualSolver::StepLength jrl::qp::experimental::BlockGISolver::computeStepLength_ ( const internal::SelectedConstraint sc,
const VectorConstRef x,
const VectorConstRef u,
const VectorConstRef z,
const VectorConstRef r 
) const
overrideprotectedvirtual

Compute a step length and update x and u given the data n+, z and r.

Implements jrl::qp::DualSolver.

◆ dot_()

double jrl::qp::experimental::BlockGISolver::dot_ ( const internal::SelectedConstraint sc,
const VectorConstRef z 
)
overrideprotectedvirtual

Compute the dot product between the vector corresponding to sc and z.

Implements jrl::qp::DualSolver.

◆ init_()

internal::InitTermination jrl::qp::experimental::BlockGISolver::init_ ( )
overrideprotectedvirtual

Compute the initial iterate, the corresponding objective value and initialize any relevant data of the derived class.

Implements jrl::qp::DualSolver.

◆ initializeComputationData()

internal::TerminationType jrl::qp::experimental::BlockGISolver::initializeComputationData ( )
protectedvirtual

◆ initializePrimalDualPoints()

internal::TerminationType jrl::qp::experimental::BlockGISolver::initializePrimalDualPoints ( )
protectedvirtual

◆ processInitialActiveSet()

internal::TerminationType jrl::qp::experimental::BlockGISolver::processInitialActiveSet ( )
protectedvirtual

◆ removeConstraint_()

bool jrl::qp::experimental::BlockGISolver::removeConstraint_ ( int  l)
overrideprotectedvirtual

Remove the l-th active constraint from the active set and update the computation data accordingly.

Implements jrl::qp::DualSolver.

◆ resize_()

void jrl::qp::experimental::BlockGISolver::resize_ ( int  nbVar,
int  nbCstr,
bool  useBounds 
)
overrideprotectedvirtual

Resize the data managed by the derived class.

Implements jrl::qp::DualSolver.

◆ selectViolatedConstraint_()

internal::SelectedConstraint jrl::qp::experimental::BlockGISolver::selectViolatedConstraint_ ( const VectorConstRef x) const
overrideprotectedvirtual

Select the violated constraint to be considered for the current iteration.

Implements jrl::qp::DualSolver.

◆ solve()

TerminationStatus jrl::qp::experimental::BlockGISolver::solve ( const structured::StructuredG G,
const VectorConstRef a,
const structured::StructuredC C,
const VectorConstRef bl,
const VectorConstRef bu,
const VectorConstRef xl,
const VectorConstRef xu,
const std::vector< ActivationStatus > &  as = {} 
)

Solve the problem min. 0.5 x^T G x + a^T x s.t. bl <= C^T x <= bu xl <= x <= xu

Member Data Documentation

◆ J_

structured::StructuredJ jrl::qp::experimental::BlockGISolver::J_
protected

◆ pb_

Problem jrl::qp::experimental::BlockGISolver::pb_
protected

◆ QR_

structured::StructuredQR jrl::qp::experimental::BlockGISolver::QR_
protected

◆ work_bact_

internal::Workspace jrl::qp::experimental::BlockGISolver::work_bact_
protected

◆ work_cx_

internal::Workspace jrl::qp::experimental::BlockGISolver::work_cx_
mutableprotected

◆ work_d_

internal::Workspace jrl::qp::experimental::BlockGISolver::work_d_
mutableprotected

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