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

Solver for the augmented system for triple type matrices. More...

#include <IpStdAugSystemSolver.hpp>

+ Inheritance diagram for Ipopt::StdAugSystemSolver:

Public Member Functions

bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 overloaded from AlgorithmStrategyObject
 
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)
 Set up the augmented system and solve it for a set of given right hand side - implementation for GenTMatrices and SymTMatrices.
 
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
 StdAugSystemSolver (SymLinearSolver &LinSolver)
 Constructor using only a linear solver object.
 
virtual ~StdAugSystemSolver ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::AugSystemSolver
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.
 
 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

void CreateAugmentedSpace (const SymMatrix &W, const Matrix &J_c, const Matrix &J_d, const Vector &proto_x, const Vector &proto_s, const Vector &proto_c, const Vector &proto_d)
 Create the matrix space for the Compound Sym Matrix that represents the augmented system.
 
void CreateAugmentedSystem (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_x, const Vector &proto_s, const Vector &proto_c, const Vector &proto_d)
 Create the new compound sym matrix that represents the augmented system.
 
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)
 Check the internal tags and decide if the passed variables are different from what is in the augmented_system_.
 
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.

 StdAugSystemSolver ()
 Default constructor.
 
 StdAugSystemSolver (const StdAugSystemSolver &)
 Copy Constructor.
 
void operator= (const StdAugSystemSolver &)
 Default Assignment Operator.
 

Private Attributes

SmartPtr< SymLinearSolverlinsolver_
 The linear solver object that is to be used to solve the linear systems.
 
SmartPtr< CompoundSymMatrixSpaceaugmented_system_space_
 Spaces for piecing together the augmented system.
 
SmartPtr< SumSymMatrixSpacesumsym_space_x_
 
SmartPtr< DiagMatrixSpacediag_space_x_
 
SmartPtr< DiagMatrixSpacediag_space_s_
 
SmartPtr< DiagMatrixSpacediag_space_c_
 
SmartPtr< IdentityMatrixSpaceident_space_ds_
 
SmartPtr< DiagMatrixSpacediag_space_d_
 
SmartPtr< CompoundVectorSpaceaugmented_vector_space_
 
SmartPtr< CompoundSymMatrixaugmented_system_
 The resulting augmented matrix.
 
SmartPtr< const SymMatrixold_w_
 A copy of a previous W used in the augmented_system_.
 
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.
 
TaggedObject::Tag augsys_tag_
 This is the tag of the matrix storing the augmented system.
 
Algorithmic parameters
bool warm_start_same_structure_
 Flag indicating whether the TNLP with identical structure has already been solved before.
 

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 for triple type matrices.

The current implementation assumes that all matrices are of the type SymTMatrix, and all vectors are of the type DenseVector.

Definition at line 25 of file IpStdAugSystemSolver.hpp.

Constructor & Destructor Documentation

◆ StdAugSystemSolver() [1/3]

Ipopt::StdAugSystemSolver::StdAugSystemSolver ( SymLinearSolver LinSolver)

Constructor using only a linear solver object.

◆ ~StdAugSystemSolver()

virtual Ipopt::StdAugSystemSolver::~StdAugSystemSolver ( )
virtual

Destructor.

◆ StdAugSystemSolver() [2/3]

Ipopt::StdAugSystemSolver::StdAugSystemSolver ( )
private

Default constructor.

◆ StdAugSystemSolver() [3/3]

Ipopt::StdAugSystemSolver::StdAugSystemSolver ( const StdAugSystemSolver )
private

Copy Constructor.

Member Function Documentation

◆ InitializeImpl()

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

overloaded from AlgorithmStrategyObject

Implements Ipopt::AugSystemSolver.

◆ MultiSolve()

virtual ESymSolverStatus Ipopt::StdAugSystemSolver::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 
)
virtual

Set up the augmented system and solve it for a set of given right hand side - implementation for GenTMatrices and SymTMatrices.

Reimplemented from Ipopt::AugSystemSolver.

◆ NumberOfNegEVals()

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

Number of negative eigenvalues detected during last solve.

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

Returns
the number of negative eigenvalues of the most recent factorized matrix

Implements Ipopt::AugSystemSolver.

◆ ProvidesInertia()

virtual bool Ipopt::StdAugSystemSolver::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::StdAugSystemSolver::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::StdAugSystemSolver::operator= ( const StdAugSystemSolver )
private

Default Assignment Operator.

◆ CreateAugmentedSpace()

void Ipopt::StdAugSystemSolver::CreateAugmentedSpace ( const SymMatrix W,
const Matrix J_c,
const Matrix J_d,
const Vector proto_x,
const Vector proto_s,
const Vector proto_c,
const Vector proto_d 
)
private

Create the matrix space for the Compound Sym Matrix that represents the augmented system.

This signifies the "first" time through and requires all structural knowledge

◆ CreateAugmentedSystem()

void Ipopt::StdAugSystemSolver::CreateAugmentedSystem ( 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_x,
const Vector proto_s,
const Vector proto_c,
const Vector proto_d 
)
private

Create the new compound sym matrix that represents the augmented system.

This is done EVERY time Solve is called with ANY different information.

◆ AugmentedSystemRequiresChange()

bool Ipopt::StdAugSystemSolver::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

Check the internal tags and decide if the passed variables are different from what is in the augmented_system_.

Member Data Documentation

◆ linsolver_

SmartPtr<SymLinearSolver> Ipopt::StdAugSystemSolver::linsolver_
private

The linear solver object that is to be used to solve the linear systems.

Definition at line 186 of file IpStdAugSystemSolver.hpp.

◆ augmented_system_space_

SmartPtr<CompoundSymMatrixSpace> Ipopt::StdAugSystemSolver::augmented_system_space_
private

Spaces for piecing together the augmented system.

Definition at line 189 of file IpStdAugSystemSolver.hpp.

◆ sumsym_space_x_

SmartPtr<SumSymMatrixSpace> Ipopt::StdAugSystemSolver::sumsym_space_x_
private

Definition at line 190 of file IpStdAugSystemSolver.hpp.

◆ diag_space_x_

SmartPtr<DiagMatrixSpace> Ipopt::StdAugSystemSolver::diag_space_x_
private

Definition at line 191 of file IpStdAugSystemSolver.hpp.

◆ diag_space_s_

SmartPtr<DiagMatrixSpace> Ipopt::StdAugSystemSolver::diag_space_s_
private

Definition at line 192 of file IpStdAugSystemSolver.hpp.

◆ diag_space_c_

SmartPtr<DiagMatrixSpace> Ipopt::StdAugSystemSolver::diag_space_c_
private

Definition at line 193 of file IpStdAugSystemSolver.hpp.

◆ ident_space_ds_

SmartPtr<IdentityMatrixSpace> Ipopt::StdAugSystemSolver::ident_space_ds_
private

Definition at line 194 of file IpStdAugSystemSolver.hpp.

◆ diag_space_d_

SmartPtr<DiagMatrixSpace> Ipopt::StdAugSystemSolver::diag_space_d_
private

Definition at line 195 of file IpStdAugSystemSolver.hpp.

◆ augmented_vector_space_

SmartPtr<CompoundVectorSpace> Ipopt::StdAugSystemSolver::augmented_vector_space_
private

Definition at line 197 of file IpStdAugSystemSolver.hpp.

◆ w_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 208 of file IpStdAugSystemSolver.hpp.

◆ w_factor_

Number Ipopt::StdAugSystemSolver::w_factor_
private

Most recent value of W_factor.

Definition at line 211 of file IpStdAugSystemSolver.hpp.

◆ d_x_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 217 of file IpStdAugSystemSolver.hpp.

◆ delta_x_

Number Ipopt::StdAugSystemSolver::delta_x_
private

Most recent value of delta_x from Set method.

Definition at line 220 of file IpStdAugSystemSolver.hpp.

◆ d_s_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 226 of file IpStdAugSystemSolver.hpp.

◆ delta_s_

Number Ipopt::StdAugSystemSolver::delta_s_
private

Most recent value of delta_s from Set method.

Definition at line 229 of file IpStdAugSystemSolver.hpp.

◆ j_c_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 235 of file IpStdAugSystemSolver.hpp.

◆ d_c_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 241 of file IpStdAugSystemSolver.hpp.

◆ delta_c_

Number Ipopt::StdAugSystemSolver::delta_c_
private

Most recent value of delta_c from set method.

Definition at line 244 of file IpStdAugSystemSolver.hpp.

◆ j_d_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 250 of file IpStdAugSystemSolver.hpp.

◆ d_d_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::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 256 of file IpStdAugSystemSolver.hpp.

◆ delta_d_

Number Ipopt::StdAugSystemSolver::delta_d_
private

Most recent value of delta_d from Set method.

Definition at line 259 of file IpStdAugSystemSolver.hpp.

◆ augsys_tag_

TaggedObject::Tag Ipopt::StdAugSystemSolver::augsys_tag_
private

This is the tag of the matrix storing the augmented system.

Since this object owns this matrix, no changes should happen outside. However, since it is given away as a smart pointer, someone outside might change it. For debugging purposes, we now track its tag as well.

Definition at line 268 of file IpStdAugSystemSolver.hpp.

◆ augmented_system_

SmartPtr<CompoundSymMatrix> Ipopt::StdAugSystemSolver::augmented_system_
private

The resulting augmented matrix.

This matrix is stored as follows: First we have the diagonal elements for the upper left block (for D_W and delta_W), then the elements for the Hessian W, then the Jacobian A, and finally the diagonal elements for the lower right block (for D_C and delta_C).

Definition at line 278 of file IpStdAugSystemSolver.hpp.

◆ old_w_

SmartPtr<const SymMatrix> Ipopt::StdAugSystemSolver::old_w_
private

A copy of a previous W used in the augmented_system_.

Since Solve can be called with a NULL W, we keep a copy of the last W passed to keep the nonzero structure of the augmented_system_ consistent.

Definition at line 285 of file IpStdAugSystemSolver.hpp.

◆ warm_start_same_structure_

bool Ipopt::StdAugSystemSolver::warm_start_same_structure_
private

Flag indicating whether the TNLP with identical structure has already been solved before.

Definition at line 292 of file IpStdAugSystemSolver.hpp.


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