Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::LowRankAugSystemSolver Class Reference

Solver for the augmented system with LowRankUpdateSymMatrix Hessian matrices. More...

#include <IpLowRankAugSystemSolver.hpp>

+ Inheritance diagram for Ipopt::LowRankAugSystemSolver:

Public Member Functions

bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 overloaded from AlgorithmStrategyObject
 
virtual ESymSolverStatus Solve (const SymMatrix *W, Number W_factor, const Vector *D_x, Number delta_x, const Vector *D_s, Number delta_s, const Matrix *J_c, const Vector *D_c, Number delta_c, const Matrix *J_d, const Vector *D_d, Number delta_d, const Vector &rhs_x, const Vector &rhs_s, const Vector &rhs_c, const Vector &rhs_d, Vector &sol_x, Vector &sol_s, Vector &sol_c, Vector &sol_d, bool check_NegEVals, Index numberOfNegEVals)
 Set up the augmented system and solve it for a given right hand side.
 
virtual Index NumberOfNegEVals () const
 Number of negative eigenvalues detected during last solve.
 
virtual bool ProvidesInertia () const
 Query whether inertia is computed by linear solver.
 
virtual bool IncreaseQuality ()
 Request to increase quality of solution for next solve.
 
Constructors / Destructors
 LowRankAugSystemSolver (AugSystemSolver &aug_system_solver)
 Constructor using only a linear solver object.
 
virtual ~LowRankAugSystemSolver ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::AugSystemSolver
virtual ESymSolverStatus MultiSolve (const SymMatrix *W, Number W_factor, const Vector *D_x, Number delta_x, const Vector *D_s, Number delta_s, const Matrix *J_c, const Vector *D_c, Number delta_c, const Matrix *J_d, const Vector *D_d, Number delta_d, std::vector< SmartPtr< const Vector > > &rhs_xV, std::vector< SmartPtr< const Vector > > &rhs_sV, std::vector< SmartPtr< const Vector > > &rhs_cV, std::vector< SmartPtr< const Vector > > &rhs_dV, std::vector< SmartPtr< Vector > > &sol_xV, std::vector< SmartPtr< Vector > > &sol_sV, std::vector< SmartPtr< Vector > > &sol_cV, std::vector< SmartPtr< Vector > > &sol_dV, bool check_NegEVals, Index numberOfNegEVals)
 Like Solve, but for multiple right hand sides.
 
 AugSystemSolver ()
 Default constructor.
 
virtual ~AugSystemSolver ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::AlgorithmStrategyObject
bool Initialize (const Journalist &jnlst, IpoptNLP &ip_nlp, IpoptData &ip_data, IpoptCalculatedQuantities &ip_cq, const OptionsList &options, const std::string &prefix)
 This method is called every time the algorithm starts again - it is used to reset any internal state.
 
bool ReducedInitialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 Reduced version of the Initialize method, which does not require special Ipopt information.
 
 AlgorithmStrategyObject ()
 Default Constructor.
 
virtual ~AlgorithmStrategyObject ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Private Member Functions

Default Compiler Generated Methods

(Hidden to avoid implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 LowRankAugSystemSolver ()
 Default constructor.
 
 LowRankAugSystemSolver (const LowRankAugSystemSolver &)
 Copy Constructor.
 
void operator= (const LowRankAugSystemSolver &)
 
Internal functions
ESymSolverStatus UpdateFactorization (const SymMatrix *W, Number W_factor, const Vector *D_x, Number delta_x, const Vector *D_s, Number delta_s, const Matrix &J_c, const Vector *D_c, Number delta_c, const Matrix &J_d, const Vector *D_d, Number delta_d, const Vector &proto_rhs_x, const Vector &proto_rhs_s, const Vector &proto_rhs_c, const Vector &proto_rhs_d, bool check_NegEVals, Index numberOfNegEVals)
 Method for updating the factorization, including J1_, J2_, Vtilde1_, Utilde2, Wdiag_, compound_sol_vecspace_.
 
ESymSolverStatus SolveMultiVector (const Vector *D_x, Number delta_x, const Vector *D_s, Number delta_s, const Matrix &J_c, const Vector *D_c, Number delta_c, const Matrix &J_d, const Vector *D_d, Number delta_d, const Vector &proto_rhs_x, const Vector &proto_rhs_s, const Vector &proto_rhs_c, const Vector &proto_rhs_d, const MultiVectorMatrix &V, const SmartPtr< const Matrix > &P_LM, SmartPtr< MultiVectorMatrix > &V_x, SmartPtr< MultiVectorMatrix > &Vtilde1, SmartPtr< MultiVectorMatrix > &Vtilde1_x, bool check_NegEVals, Index numberOfNegEVals)
 Method for solving the augmented system without low-rank update for multiple right hand sides that are provided as MultiVectorMatrix.
 
bool AugmentedSystemRequiresChange (const SymMatrix *W, Number W_factor, const Vector *D_x, Number delta_x, const Vector *D_s, Number delta_s, const Matrix &J_c, const Vector *D_c, Number delta_c, const Matrix &J_d, const Vector *D_d, Number delta_d)
 Method that compares the tags of the data for the matrix with those from the previous call.
 

Private Attributes

SmartPtr< AugSystemSolveraug_system_solver_
 The augmented system solver object that should be used for the factorization of the augmented system without the low-rank update.
 
Index num_neg_evals_
 Stores the number of negative eigenvalues detected during most recent factorization.
 
Tags and values to track in order to decide whether the

matrix has to be updated compared to the most recent call of the Set method.

TaggedObject::Tag w_tag_
 Tag for W matrix.
 
Number w_factor_
 Most recent value of W_factor.
 
TaggedObject::Tag d_x_tag_
 Tag for D_x vector, representing the diagonal matrix D_x.
 
Number delta_x_
 Most recent value of delta_x from Set method.
 
TaggedObject::Tag d_s_tag_
 Tag for D_s vector, representing the diagonal matrix D_s.
 
Number delta_s_
 Most recent value of delta_s from Set method.
 
TaggedObject::Tag j_c_tag_
 Tag for J_c matrix.
 
TaggedObject::Tag d_c_tag_
 Tag for D_c vector, representing the diagonal matrix D_c.
 
Number delta_c_
 Most recent value of delta_c from Set method.
 
TaggedObject::Tag j_d_tag_
 Tag for J_d matrix.
 
TaggedObject::Tag d_d_tag_
 Tag for D_d vector, representing the diagonal matrix D_d.
 
Number delta_d_
 Most recent value of delta_d from Set method.
 
Information to be stored in order to resolve for the

same matrix with a different right hand side.

bool first_call_
 
SmartPtr< DenseGenMatrixJ1_
 
SmartPtr< DenseGenMatrixJ2_
 
SmartPtr< MultiVectorMatrixVtilde1_
 
SmartPtr< MultiVectorMatrixUtilde2_
 
SmartPtr< DiagMatrixWdiag_
 Hessian Matrix passed to the augmented system solver solving the matrix without the low-rank update.
 
SmartPtr< const CompoundVectorSpacecompound_sol_vecspace_
 Vector space for Compound vectors that capture the entire right hand side and solution vectors .
 

Additional Inherited Members

- Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject
const JournalistJnlst () const
 
IpoptNLPIpNLP () const
 
IpoptDataIpData () const
 
IpoptCalculatedQuantitiesIpCq () const
 
bool HaveIpData () const
 

Detailed Description

Solver for the augmented system with LowRankUpdateSymMatrix Hessian matrices.

This version works with the Sherman-Morrison formula and multiple backsolves.

Definition at line 22 of file IpLowRankAugSystemSolver.hpp.

Constructor & Destructor Documentation

◆ LowRankAugSystemSolver() [1/3]

Ipopt::LowRankAugSystemSolver::LowRankAugSystemSolver ( AugSystemSolver aug_system_solver)

Constructor using only a linear solver object.

◆ ~LowRankAugSystemSolver()

virtual Ipopt::LowRankAugSystemSolver::~LowRankAugSystemSolver ( )
virtual

Destructor.

◆ LowRankAugSystemSolver() [2/3]

Ipopt::LowRankAugSystemSolver::LowRankAugSystemSolver ( )
private

Default constructor.

◆ LowRankAugSystemSolver() [3/3]

Ipopt::LowRankAugSystemSolver::LowRankAugSystemSolver ( const LowRankAugSystemSolver )
private

Copy Constructor.

Member Function Documentation

◆ InitializeImpl()

bool Ipopt::LowRankAugSystemSolver::InitializeImpl ( const OptionsList options,
const std::string &  prefix 
)
virtual

overloaded from AlgorithmStrategyObject

Implements Ipopt::AugSystemSolver.

◆ Solve()

virtual ESymSolverStatus Ipopt::LowRankAugSystemSolver::Solve ( const SymMatrix W,
Number  W_factor,
const Vector D_x,
Number  delta_x,
const Vector D_s,
Number  delta_s,
const Matrix J_c,
const Vector D_c,
Number  delta_c,
const Matrix J_d,
const Vector D_d,
Number  delta_d,
const Vector rhs_x,
const Vector rhs_s,
const Vector rhs_c,
const Vector rhs_d,
Vector sol_x,
Vector sol_s,
Vector sol_c,
Vector sol_d,
bool  check_NegEVals,
Index  numberOfNegEVals 
)
virtual

Set up the augmented system and solve it for a given right hand side.

Reimplemented from Ipopt::AugSystemSolver.

◆ NumberOfNegEVals()

virtual Index Ipopt::LowRankAugSystemSolver::NumberOfNegEVals ( ) const
virtual

Number of negative eigenvalues detected during last solve.

This must not be called if the linear solver does not compute this quantity (see ProvidesInertia).

Returns
number of negative eigenvalues of the most recent factorized matrix

Implements Ipopt::AugSystemSolver.

◆ ProvidesInertia()

virtual bool Ipopt::LowRankAugSystemSolver::ProvidesInertia ( ) const
virtual

Query whether inertia is computed by linear solver.

Returns
true, if linear solver provides inertia

Implements Ipopt::AugSystemSolver.

◆ IncreaseQuality()

virtual bool Ipopt::LowRankAugSystemSolver::IncreaseQuality ( )
virtual

Request to increase quality of solution for next solve.

Ask underlying linear solver to increase quality of solution for the next solve (e.g. increase pivot tolerance).

Returns
false, if this is not possible (e.g. maximal pivot tolerance already used)

Implements Ipopt::AugSystemSolver.

◆ operator=()

void Ipopt::LowRankAugSystemSolver::operator= ( const LowRankAugSystemSolver )
private

◆ UpdateFactorization()

ESymSolverStatus Ipopt::LowRankAugSystemSolver::UpdateFactorization ( const SymMatrix W,
Number  W_factor,
const Vector D_x,
Number  delta_x,
const Vector D_s,
Number  delta_s,
const Matrix J_c,
const Vector D_c,
Number  delta_c,
const Matrix J_d,
const Vector D_d,
Number  delta_d,
const Vector proto_rhs_x,
const Vector proto_rhs_s,
const Vector proto_rhs_c,
const Vector proto_rhs_d,
bool  check_NegEVals,
Index  numberOfNegEVals 
)
private

Method for updating the factorization, including J1_, J2_, Vtilde1_, Utilde2, Wdiag_, compound_sol_vecspace_.

◆ SolveMultiVector()

ESymSolverStatus Ipopt::LowRankAugSystemSolver::SolveMultiVector ( const Vector D_x,
Number  delta_x,
const Vector D_s,
Number  delta_s,
const Matrix J_c,
const Vector D_c,
Number  delta_c,
const Matrix J_d,
const Vector D_d,
Number  delta_d,
const Vector proto_rhs_x,
const Vector proto_rhs_s,
const Vector proto_rhs_c,
const Vector proto_rhs_d,
const MultiVectorMatrix V,
const SmartPtr< const Matrix > &  P_LM,
SmartPtr< MultiVectorMatrix > &  V_x,
SmartPtr< MultiVectorMatrix > &  Vtilde1,
SmartPtr< MultiVectorMatrix > &  Vtilde1_x,
bool  check_NegEVals,
Index  numberOfNegEVals 
)
private

Method for solving the augmented system without low-rank update for multiple right hand sides that are provided as MultiVectorMatrix.

The result is returned as a MultiVectorMatrix in Vtilde1. V_x and Vtilde1_x are V and Vtilde1 in the x-space.

◆ AugmentedSystemRequiresChange()

bool Ipopt::LowRankAugSystemSolver::AugmentedSystemRequiresChange ( const SymMatrix W,
Number  W_factor,
const Vector D_x,
Number  delta_x,
const Vector D_s,
Number  delta_s,
const Matrix J_c,
const Vector D_c,
Number  delta_c,
const Matrix J_d,
const Vector D_d,
Number  delta_d 
)
private

Method that compares the tags of the data for the matrix with those from the previous call.

Returns
true, if there was a change and the factorization has to be updated

Member Data Documentation

◆ aug_system_solver_

SmartPtr<AugSystemSolver> Ipopt::LowRankAugSystemSolver::aug_system_solver_
private

The augmented system solver object that should be used for the factorization of the augmented system without the low-rank update.

Definition at line 120 of file IpLowRankAugSystemSolver.hpp.

◆ w_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::w_tag_
private

Tag for W matrix.

If W has been given to Set as NULL, then this tag is set to 0.

Definition at line 131 of file IpLowRankAugSystemSolver.hpp.

◆ w_factor_

Number Ipopt::LowRankAugSystemSolver::w_factor_
private

Most recent value of W_factor.

Definition at line 134 of file IpLowRankAugSystemSolver.hpp.

◆ d_x_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::d_x_tag_
private

Tag for D_x vector, representing the diagonal matrix D_x.

If D_x has been given to Set as NULL, then this tag is set to 0.

Definition at line 140 of file IpLowRankAugSystemSolver.hpp.

◆ delta_x_

Number Ipopt::LowRankAugSystemSolver::delta_x_
private

Most recent value of delta_x from Set method.

Definition at line 143 of file IpLowRankAugSystemSolver.hpp.

◆ d_s_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::d_s_tag_
private

Tag for D_s vector, representing the diagonal matrix D_s.

If D_s has been given to Set as NULL, then this tag is set to 0.

Definition at line 148 of file IpLowRankAugSystemSolver.hpp.

◆ delta_s_

Number Ipopt::LowRankAugSystemSolver::delta_s_
private

Most recent value of delta_s from Set method.

Definition at line 151 of file IpLowRankAugSystemSolver.hpp.

◆ j_c_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::j_c_tag_
private

Tag for J_c matrix.

If J_c has been given to Set as NULL, then this tag is set to 0.

Definition at line 157 of file IpLowRankAugSystemSolver.hpp.

◆ d_c_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::d_c_tag_
private

Tag for D_c vector, representing the diagonal matrix D_c.

If D_c has been given to Set as NULL, then this tag is set to 0.

Definition at line 163 of file IpLowRankAugSystemSolver.hpp.

◆ delta_c_

Number Ipopt::LowRankAugSystemSolver::delta_c_
private

Most recent value of delta_c from Set method.

Definition at line 166 of file IpLowRankAugSystemSolver.hpp.

◆ j_d_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::j_d_tag_
private

Tag for J_d matrix.

If J_d has been given to Set as NULL, then this tag is set to 0.

Definition at line 172 of file IpLowRankAugSystemSolver.hpp.

◆ d_d_tag_

TaggedObject::Tag Ipopt::LowRankAugSystemSolver::d_d_tag_
private

Tag for D_d vector, representing the diagonal matrix D_d.

If D_d has been given to Set as NULL, then this tag is set to 0.

Definition at line 178 of file IpLowRankAugSystemSolver.hpp.

◆ delta_d_

Number Ipopt::LowRankAugSystemSolver::delta_d_
private

Most recent value of delta_d from Set method.

Definition at line 181 of file IpLowRankAugSystemSolver.hpp.

◆ first_call_

bool Ipopt::LowRankAugSystemSolver::first_call_
private

Definition at line 187 of file IpLowRankAugSystemSolver.hpp.

◆ J1_

SmartPtr<DenseGenMatrix> Ipopt::LowRankAugSystemSolver::J1_
private

Definition at line 188 of file IpLowRankAugSystemSolver.hpp.

◆ J2_

SmartPtr<DenseGenMatrix> Ipopt::LowRankAugSystemSolver::J2_
private

Definition at line 189 of file IpLowRankAugSystemSolver.hpp.

◆ Vtilde1_

SmartPtr<MultiVectorMatrix> Ipopt::LowRankAugSystemSolver::Vtilde1_
private

Definition at line 190 of file IpLowRankAugSystemSolver.hpp.

◆ Utilde2_

SmartPtr<MultiVectorMatrix> Ipopt::LowRankAugSystemSolver::Utilde2_
private

Definition at line 191 of file IpLowRankAugSystemSolver.hpp.

◆ Wdiag_

SmartPtr<DiagMatrix> Ipopt::LowRankAugSystemSolver::Wdiag_
private

Hessian Matrix passed to the augmented system solver solving the matrix without the low-rank update.

Definition at line 195 of file IpLowRankAugSystemSolver.hpp.

◆ compound_sol_vecspace_

SmartPtr<const CompoundVectorSpace> Ipopt::LowRankAugSystemSolver::compound_sol_vecspace_
private

Vector space for Compound vectors that capture the entire right hand side and solution vectors .

Definition at line 199 of file IpLowRankAugSystemSolver.hpp.

◆ num_neg_evals_

Index Ipopt::LowRankAugSystemSolver::num_neg_evals_
private

Stores the number of negative eigenvalues detected during most recent factorization.

This is what is returned by NumberOfNegEVals() of this class. It usually is the number of negative eigenvalues returned from the aug_system_solver solve, but if a Cholesky factorization could not be performed, the returned value is one more than this what the aug_system_solver returned.

Definition at line 211 of file IpLowRankAugSystemSolver.hpp.


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