Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::IterativeSolverTerminationTester Class Referenceabstract

This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt. More...

#include <IpIterativeSolverTerminationTester.hpp>

+ Inheritance diagram for Ipopt::IterativeSolverTerminationTester:

Public Types

enum  ETerminationTest {
  CONTINUE , TEST_1_SATISFIED , TEST_2_SATISFIED , TEST_3_SATISFIED ,
  MODIFY_HESSIAN , OTHER_SATISFIED
}
 Enum to report result of termination test. More...
 

Public Member Functions

virtual bool InitializeImpl (const OptionsList &options, const std::string &prefix)=0
 Implementation of the initialization method that has to be overloaded by for each derived class.
 
virtual bool InitializeSolve ()=0
 Method for initializing for the next iterative solve.
 
virtual ETerminationTest TestTermination (Index ndim, const Number *sol, const Number *resid, Index iter, Number norm2_rhs)=0
 This method checks if the current solution of the iterative linear solver is good enough (by returning the corresponding satisfied termination test), or if the Hessian should be modified.
 
virtual void Clear ()=0
 This method can be called after the Solve is over and we can delete anything that has been allocated to free memory.
 
const JournalistGetJnlst () const
 An easy way to get the journalist if accessed from the outside.
 
virtual Index GetSolverIterations () const =0
 Return the number of iterative solver iteration from the most recent solve.
 
Constructor/Destructor
 IterativeSolverTerminationTester ()
 Default constructor.
 
virtual ~IterativeSolverTerminationTester ()
 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
 

Protected Member Functions

void GetVectors (Index ndim, const Number *array, SmartPtr< const Vector > &comp_x, SmartPtr< const Vector > &comp_s, SmartPtr< const Vector > &comp_c, SmartPtr< const Vector > &comp_d)
 Method for copying a long augmented system array into Vectors in Ipopt notation.
 
InexactDataInexData ()
 Method to easily access Inexact data.
 
InexactCqInexCq ()
 Method to easily access Inexact calculated quantities.
 
- Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject
const JournalistJnlst () const
 
IpoptNLPIpNLP () const
 
IpoptDataIpData () const
 
IpoptCalculatedQuantitiesIpCq () const
 
bool HaveIpData () 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.

IterativeSolverTerminationTesteroperator= (const IterativeSolverTerminationTester &)
 Overloaded Assignment Operator.
 

Detailed Description

This base class is for the termination tests for the iterative linear solver in the inexact version of Ipopt.

Definition at line 19 of file IpIterativeSolverTerminationTester.hpp.

Member Enumeration Documentation

◆ ETerminationTest

Enum to report result of termination test.

Enumerator
CONTINUE 

The current solution is not yet good enough.

TEST_1_SATISFIED 

Termination Test 1 is satisfied.

TEST_2_SATISFIED 

Termination Test 2 is satisfied.

TEST_3_SATISFIED 

Termination Test 3 is satisfied.

MODIFY_HESSIAN 

Hessian matrix should be modified.

OTHER_SATISFIED 

Some other termination criterion satisfied.

Definition at line 23 of file IpIterativeSolverTerminationTester.hpp.

Constructor & Destructor Documentation

◆ IterativeSolverTerminationTester()

Ipopt::IterativeSolverTerminationTester::IterativeSolverTerminationTester ( )
inline

Default constructor.

Definition at line 42 of file IpIterativeSolverTerminationTester.hpp.

◆ ~IterativeSolverTerminationTester()

virtual Ipopt::IterativeSolverTerminationTester::~IterativeSolverTerminationTester ( )
inlinevirtual

Destructor.

Definition at line 46 of file IpIterativeSolverTerminationTester.hpp.

Member Function Documentation

◆ InitializeImpl()

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

Implementation of the initialization method that has to be overloaded by for each derived class.

Implements Ipopt::AlgorithmStrategyObject.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

◆ InitializeSolve()

virtual bool Ipopt::IterativeSolverTerminationTester::InitializeSolve ( )
pure virtual

Method for initializing for the next iterative solve.

This must be call before the test methods are called.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

◆ TestTermination()

virtual ETerminationTest Ipopt::IterativeSolverTerminationTester::TestTermination ( Index  ndim,
const Number sol,
const Number resid,
Index  iter,
Number  norm2_rhs 
)
pure virtual

This method checks if the current solution of the iterative linear solver is good enough (by returning the corresponding satisfied termination test), or if the Hessian should be modified.

The input is the dimension of the augmented system, the current solution vector of the augmented system, the current residual vector.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

◆ Clear()

virtual void Ipopt::IterativeSolverTerminationTester::Clear ( )
pure virtual

This method can be called after the Solve is over and we can delete anything that has been allocated to free memory.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

◆ GetJnlst()

const Journalist & Ipopt::IterativeSolverTerminationTester::GetJnlst ( ) const
inline

An easy way to get the journalist if accessed from the outside.

Definition at line 84 of file IpIterativeSolverTerminationTester.hpp.

◆ GetSolverIterations()

virtual Index Ipopt::IterativeSolverTerminationTester::GetSolverIterations ( ) const
pure virtual

Return the number of iterative solver iteration from the most recent solve.

Implemented in Ipopt::InexactNormalTerminationTester, and Ipopt::InexactPDTerminationTester.

◆ GetVectors()

void Ipopt::IterativeSolverTerminationTester::GetVectors ( Index  ndim,
const Number array,
SmartPtr< const Vector > &  comp_x,
SmartPtr< const Vector > &  comp_s,
SmartPtr< const Vector > &  comp_c,
SmartPtr< const Vector > &  comp_d 
)
protected

Method for copying a long augmented system array into Vectors in Ipopt notation.

◆ InexData()

InexactData & Ipopt::IterativeSolverTerminationTester::InexData ( )
inlineprotected

Method to easily access Inexact data.

Definition at line 108 of file IpIterativeSolverTerminationTester.hpp.

◆ InexCq()

InexactCq & Ipopt::IterativeSolverTerminationTester::InexCq ( )
inlineprotected

Method to easily access Inexact calculated quantities.

Definition at line 116 of file IpIterativeSolverTerminationTester.hpp.

◆ operator=()

IterativeSolverTerminationTester & Ipopt::IterativeSolverTerminationTester::operator= ( const IterativeSolverTerminationTester )
private

Overloaded Assignment Operator.


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