Ipopt Documentation  
Ipopt::CGPerturbationHandler Class Reference

Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual system. More...

#include <IpCGPerturbationHandler.hpp>

+ Inheritance diagram for Ipopt::CGPerturbationHandler:

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.

 CGPerturbationHandler (const CGPerturbationHandler &)
 Copy Constructor. More...
 
void operator= (const CGPerturbationHandler &)
 Default Assignment Operator. More...
 
CGPenaltyDataCGPenData ()
 Method to easily access CGPenalty data. More...
 
CGPenaltyCqCGPenCq ()
 Method to easily access CGPenalty calculated quantities. More...
 
Auxiliary methods
bool get_deltas_for_wrong_inertia (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 Internal version of PerturbForWrongInertia with the difference, that finalize_test is not called. More...
 
void finalize_test ()
 This method is call whenever a matrix had been factorization and is not singular. More...
 
Number delta_cd ()
 Compute perturbation value for constraints. More...
 

Private Attributes

Size of the most recent non-zero perturbation.
Number delta_x_last_
 The last nonzero value for delta_x. More...
 
Number delta_s_last_
 The last nonzero value for delta_s. More...
 
Number delta_c_last_
 The last nonzero value for delta_c. More...
 
Number delta_d_last_
 The last nonzero value for delta_d. More...
 
Size of the most recently suggested perturbation for the

current matrix.

Number delta_x_curr_
 The current value for delta_x. More...
 
Number delta_s_curr_
 The current value for delta_s. More...
 
Number delta_c_curr_
 The current value for delta_c. More...
 
Number delta_d_curr_
 The current value for delta_d. More...
 
bool get_deltas_for_wrong_inertia_called_
 Flag indicating if for the given matrix the perturbation for wrong inertia method has already been called. More...
 
Algorithmic parameters.
Number delta_xs_max_
 Maximal perturbation for x and s. More...
 
Number delta_xs_min_
 Smallest possible perturbation for x and s. More...
 
Number delta_xs_first_inc_fact_
 Increase factor for delta_xs for first required perturbation. More...
 
Number delta_xs_inc_fact_
 Increase factor for delta_xs for later perturbations. More...
 
Number delta_xs_dec_fact_
 Decrease factor for delta_xs for later perturbations. More...
 
Number delta_xs_init_
 Very first trial value for delta_xs perturbation. More...
 
Number delta_cd_val_
 Size of perturbation for c and d blocks. More...
 
Number delta_cd_exp_
 Exponent on mu in formula for of perturbation for c and d blocks. More...
 
bool reset_last_
 Flag indicating whether the new values are based on the perturbations in the last iteration or in the more recent iteration in which a perturbation was done. More...
 
Index degen_iters_max_
 Required number of iterations for degeneracy conclusions. More...
 
bool perturb_always_cd_
 Flag indicating that the delta_c, delta_d perturbation should always be used. More...
 
Number penalty_max_
 The max reference value for scaling the penalty parameter. More...
 
Number mult_diverg_feasibility_tol_
 Feasibility for perturbation in pure Newton method. More...
 

Handling structural degeneracy

enum  DegenType { NOT_YET_DETERMINED , NOT_DEGENERATE , DEGENERATE }
 Type for degeneracy flags. More...
 
enum  TrialStatus {
  NO_TEST , TEST_DELTA_C_EQ_0_DELTA_X_EQ_0 , TEST_DELTA_C_GT_0_DELTA_X_EQ_0 , TEST_DELTA_C_EQ_0_DELTA_X_GT_0 ,
  TEST_DELTA_C_GT_0_DELTA_X_GT_0
}
 Status of current trial configuration. More...
 
DegenType hess_degenerate_
 Flag indicating whether the reduced Hessian matrix is thought to be structurally singular. More...
 
DegenType jac_degenerate_
 Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient. More...
 
Index degen_iters_
 Flag counting matrices in which degeneracy was observed in the first successive iterations. More...
 
TrialStatus test_status_
 Current status. More...
 

Constructors/Destructors

 CGPerturbationHandler ()
 Default Constructor. More...
 
virtual ~CGPerturbationHandler ()
 Destructor. More...
 
virtual bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 Implementation of the initialization method that has to be overloaded by for each derived class. More...
 
bool ConsiderNewSystem (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 This method must be called for each new matrix, and before any other method for generating perturbation factors. More...
 
bool PerturbForSingularity (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 This method returns perturbation factors for the case when the most recent factorization resulted in a singular matrix. More...
 
bool PerturbForWrongInertia (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 This method returns perturbation factors for the case when the most recent factorization resulted in a matrix with an incorrect number of negative eigenvalues. More...
 
void CurrentPerturbation (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 Just return the perturbation values that have been determined most recently. More...
 
static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 

Additional Inherited Members

- Public Member Functions inherited from Ipopt::PDPerturbationHandler
 PDPerturbationHandler ()
 Default Constructor. More...
 
virtual ~PDPerturbationHandler ()
 Destructor. More...
 
- Public Member Functions inherited from Ipopt::AlgorithmStrategyObject
 AlgorithmStrategyObject ()
 Default Constructor. More...
 
virtual ~AlgorithmStrategyObject ()
 Destructor. More...
 
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. More...
 
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. More...
 
- 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
 
- Static Public Member Functions inherited from Ipopt::PDPerturbationHandler
static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 
- Protected Types inherited from Ipopt::PDPerturbationHandler
enum  DegenType { NOT_YET_DETERMINED , NOT_DEGENERATE , DEGENERATE }
 Type for degeneracy flags. More...
 
enum  TrialStatus {
  NO_TEST , TEST_DELTA_C_EQ_0_DELTA_X_EQ_0 , TEST_DELTA_C_GT_0_DELTA_X_EQ_0 , TEST_DELTA_C_EQ_0_DELTA_X_GT_0 ,
  TEST_DELTA_C_GT_0_DELTA_X_GT_0
}
 Status of current trial configuration. More...
 
- Protected Member Functions inherited from Ipopt::PDPerturbationHandler
 PDPerturbationHandler (const PDPerturbationHandler &)
 Copy Constructor. More...
 
void operator= (const PDPerturbationHandler &)
 Default Assignment Operator. More...
 
bool get_deltas_for_wrong_inertia (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d)
 Internal version of PerturbForWrongInertia with the difference, that finalize_test is not called. More...
 
void finalize_test ()
 This method is call whenever a matrix had been factorization and is not singular. More...
 
Number delta_cd ()
 Compute perturbation value for constraints. More...
 
- Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject
const JournalistJnlst () const
 
IpoptNLPIpNLP () const
 
IpoptDataIpData () const
 
IpoptCalculatedQuantitiesIpCq () const
 
bool HaveIpData () const
 
- Protected Attributes inherited from Ipopt::PDPerturbationHandler
Number delta_x_last_
 The last nonzero value for delta_x. More...
 
Number delta_s_last_
 The last nonzero value for delta_s. More...
 
Number delta_c_last_
 The last nonzero value for delta_c. More...
 
Number delta_d_last_
 The last nonzero value for delta_d. More...
 
Number delta_x_curr_
 The current value for delta_x. More...
 
Number delta_s_curr_
 The current value for delta_s. More...
 
Number delta_c_curr_
 The current value for delta_c. More...
 
Number delta_d_curr_
 The current value for delta_d. More...
 
bool get_deltas_for_wrong_inertia_called_
 Flag indicating if for the given matrix the perturb for wrong inertia method has already been called. More...
 
Number delta_xs_max_
 Maximal perturbation for x and s. More...
 
Number delta_xs_min_
 Smallest possible perturbation for x and s. More...
 
Number delta_xs_first_inc_fact_
 Increase factor for delta_xs for first required perturbation. More...
 
Number delta_xs_inc_fact_
 Increase factor for delta_xs for later perturbations. More...
 
Number delta_xs_dec_fact_
 Decrease factor for delta_xs for later perturbations. More...
 
Number delta_xs_init_
 Very first trial value for delta_xs perturbation. More...
 
Number delta_cd_val_
 Size of perturbation for c and d blocks. More...
 
Number delta_cd_exp_
 Exponent on mu in formula for of perturbation for c and d blocks. More...
 
bool reset_last_
 Flag indicating whether the new values are based on the perturbations in the last iteration or in the more recent iteration in which a perturbation was done. More...
 
Index degen_iters_max_
 Required number of iterations for degeneracy conclusions. More...
 
bool perturb_always_cd_
 Flag indicating that the delta_c, delta_d perturbation should always be used. More...
 
DegenType hess_degenerate_
 Flag indicating whether the reduced Hessian matrix is thought to be structurally singular. More...
 
DegenType jac_degenerate_
 Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient. More...
 
Index degen_iters_
 Flag counting matrices in which degeneracy was observed in the first successive iterations. More...
 
TrialStatus test_status_
 Current status. More...
 

Detailed Description

Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual system.

This class is used by the PDFullSpaceSolver to handle the cases where the primal-dual system is singular or has the wrong inertia. The perturbation factors are obtained based on simple heuristics, taking into account the size of previous perturbations.

Definition at line 25 of file IpCGPerturbationHandler.hpp.

Member Enumeration Documentation

◆ DegenType

Type for degeneracy flags.

Enumerator
NOT_YET_DETERMINED 
NOT_DEGENERATE 
DEGENERATE 

Definition at line 169 of file IpCGPerturbationHandler.hpp.

◆ TrialStatus

Status of current trial configuration.

Enumerator
NO_TEST 
TEST_DELTA_C_EQ_0_DELTA_X_EQ_0 
TEST_DELTA_C_GT_0_DELTA_X_EQ_0 
TEST_DELTA_C_EQ_0_DELTA_X_GT_0 
TEST_DELTA_C_GT_0_DELTA_X_GT_0 

Definition at line 195 of file IpCGPerturbationHandler.hpp.

Constructor & Destructor Documentation

◆ CGPerturbationHandler() [1/2]

Ipopt::CGPerturbationHandler::CGPerturbationHandler ( )

Default Constructor.

◆ ~CGPerturbationHandler()

virtual Ipopt::CGPerturbationHandler::~CGPerturbationHandler ( )
inlinevirtual

Destructor.

Definition at line 34 of file IpCGPerturbationHandler.hpp.

◆ CGPerturbationHandler() [2/2]

Ipopt::CGPerturbationHandler::CGPerturbationHandler ( const CGPerturbationHandler )
private

Copy Constructor.

Member Function Documentation

◆ InitializeImpl()

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

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

Reimplemented from Ipopt::PDPerturbationHandler.

◆ ConsiderNewSystem()

bool Ipopt::CGPerturbationHandler::ConsiderNewSystem ( Number delta_x,
Number delta_s,
Number delta_c,
Number delta_d 
)
virtual

This method must be called for each new matrix, and before any other method for generating perturbation factors.

Usually, the returned perturbation factors are zero, but if the system is thought to be structurally singular, they might be positive. If the return value is false, no suitable perturbation could be found.

Reimplemented from Ipopt::PDPerturbationHandler.

◆ PerturbForSingularity()

bool Ipopt::CGPerturbationHandler::PerturbForSingularity ( Number delta_x,
Number delta_s,
Number delta_c,
Number delta_d 
)
virtual

This method returns perturbation factors for the case when the most recent factorization resulted in a singular matrix.

Returns
false, if no suitable perturbation could be found

Reimplemented from Ipopt::PDPerturbationHandler.

◆ PerturbForWrongInertia()

bool Ipopt::CGPerturbationHandler::PerturbForWrongInertia ( Number delta_x,
Number delta_s,
Number delta_c,
Number delta_d 
)
virtual

This method returns perturbation factors for the case when the most recent factorization resulted in a matrix with an incorrect number of negative eigenvalues.

Returns
false, if no suitable perturbation could be found

Reimplemented from Ipopt::PDPerturbationHandler.

◆ CurrentPerturbation()

void Ipopt::CGPerturbationHandler::CurrentPerturbation ( Number delta_x,
Number delta_s,
Number delta_c,
Number delta_d 
)
virtual

Just return the perturbation values that have been determined most recently.

Reimplemented from Ipopt::PDPerturbationHandler.

◆ RegisterOptions()

static void Ipopt::CGPerturbationHandler::RegisterOptions ( SmartPtr< RegisteredOptions roptions)
static

◆ operator=()

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

Default Assignment Operator.

◆ CGPenData()

CGPenaltyData& Ipopt::CGPerturbationHandler::CGPenData ( )
inlineprivate

Method to easily access CGPenalty data.

Definition at line 122 of file IpCGPerturbationHandler.hpp.

◆ CGPenCq()

CGPenaltyCq& Ipopt::CGPerturbationHandler::CGPenCq ( )
inlineprivate

Method to easily access CGPenalty calculated quantities.

Definition at line 130 of file IpCGPerturbationHandler.hpp.

◆ get_deltas_for_wrong_inertia()

bool Ipopt::CGPerturbationHandler::get_deltas_for_wrong_inertia ( Number delta_x,
Number delta_s,
Number delta_c,
Number delta_d 
)
private

Internal version of PerturbForWrongInertia with the difference, that finalize_test is not called.

Returns
false, if the delta_x and delta_s parameters become too large

◆ finalize_test()

void Ipopt::CGPerturbationHandler::finalize_test ( )
private

This method is call whenever a matrix had been factorization and is not singular.

In here, we can evaluate the outcome of the degeneracy test heuristics.

◆ delta_cd()

Number Ipopt::CGPerturbationHandler::delta_cd ( )
private

Compute perturbation value for constraints.

Member Data Documentation

◆ delta_x_last_

Number Ipopt::CGPerturbationHandler::delta_x_last_
private

The last nonzero value for delta_x.

Definition at line 140 of file IpCGPerturbationHandler.hpp.

◆ delta_s_last_

Number Ipopt::CGPerturbationHandler::delta_s_last_
private

The last nonzero value for delta_s.

Definition at line 142 of file IpCGPerturbationHandler.hpp.

◆ delta_c_last_

Number Ipopt::CGPerturbationHandler::delta_c_last_
private

The last nonzero value for delta_c.

Definition at line 144 of file IpCGPerturbationHandler.hpp.

◆ delta_d_last_

Number Ipopt::CGPerturbationHandler::delta_d_last_
private

The last nonzero value for delta_d.

Definition at line 146 of file IpCGPerturbationHandler.hpp.

◆ delta_x_curr_

Number Ipopt::CGPerturbationHandler::delta_x_curr_
private

The current value for delta_x.

Definition at line 153 of file IpCGPerturbationHandler.hpp.

◆ delta_s_curr_

Number Ipopt::CGPerturbationHandler::delta_s_curr_
private

The current value for delta_s.

Definition at line 155 of file IpCGPerturbationHandler.hpp.

◆ delta_c_curr_

Number Ipopt::CGPerturbationHandler::delta_c_curr_
private

The current value for delta_c.

Definition at line 157 of file IpCGPerturbationHandler.hpp.

◆ delta_d_curr_

Number Ipopt::CGPerturbationHandler::delta_d_curr_
private

The current value for delta_d.

Definition at line 159 of file IpCGPerturbationHandler.hpp.

◆ get_deltas_for_wrong_inertia_called_

bool Ipopt::CGPerturbationHandler::get_deltas_for_wrong_inertia_called_
private

Flag indicating if for the given matrix the perturbation for wrong inertia method has already been called.

Definition at line 164 of file IpCGPerturbationHandler.hpp.

◆ hess_degenerate_

DegenType Ipopt::CGPerturbationHandler::hess_degenerate_
private

Flag indicating whether the reduced Hessian matrix is thought to be structurally singular.

Definition at line 179 of file IpCGPerturbationHandler.hpp.

◆ jac_degenerate_

DegenType Ipopt::CGPerturbationHandler::jac_degenerate_
private

Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient.

Definition at line 184 of file IpCGPerturbationHandler.hpp.

◆ degen_iters_

Index Ipopt::CGPerturbationHandler::degen_iters_
private

Flag counting matrices in which degeneracy was observed in the first successive iterations.

A value of -1 means that there was a non-degenerate (unperturbed) matrix at some point.

Definition at line 192 of file IpCGPerturbationHandler.hpp.

◆ test_status_

TrialStatus Ipopt::CGPerturbationHandler::test_status_
private

Current status.

Definition at line 205 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_max_

Number Ipopt::CGPerturbationHandler::delta_xs_max_
private

Maximal perturbation for x and s.

Definition at line 211 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_min_

Number Ipopt::CGPerturbationHandler::delta_xs_min_
private

Smallest possible perturbation for x and s.

Definition at line 213 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_first_inc_fact_

Number Ipopt::CGPerturbationHandler::delta_xs_first_inc_fact_
private

Increase factor for delta_xs for first required perturbation.

Definition at line 215 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_inc_fact_

Number Ipopt::CGPerturbationHandler::delta_xs_inc_fact_
private

Increase factor for delta_xs for later perturbations.

Definition at line 217 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_dec_fact_

Number Ipopt::CGPerturbationHandler::delta_xs_dec_fact_
private

Decrease factor for delta_xs for later perturbations.

Definition at line 219 of file IpCGPerturbationHandler.hpp.

◆ delta_xs_init_

Number Ipopt::CGPerturbationHandler::delta_xs_init_
private

Very first trial value for delta_xs perturbation.

Definition at line 221 of file IpCGPerturbationHandler.hpp.

◆ delta_cd_val_

Number Ipopt::CGPerturbationHandler::delta_cd_val_
private

Size of perturbation for c and d blocks.

Definition at line 223 of file IpCGPerturbationHandler.hpp.

◆ delta_cd_exp_

Number Ipopt::CGPerturbationHandler::delta_cd_exp_
private

Exponent on mu in formula for of perturbation for c and d blocks.

Definition at line 225 of file IpCGPerturbationHandler.hpp.

◆ reset_last_

bool Ipopt::CGPerturbationHandler::reset_last_
private

Flag indicating whether the new values are based on the perturbations in the last iteration or in the more recent iteration in which a perturbation was done.

Definition at line 230 of file IpCGPerturbationHandler.hpp.

◆ degen_iters_max_

Index Ipopt::CGPerturbationHandler::degen_iters_max_
private

Required number of iterations for degeneracy conclusions.

Definition at line 232 of file IpCGPerturbationHandler.hpp.

◆ perturb_always_cd_

bool Ipopt::CGPerturbationHandler::perturb_always_cd_
private

Flag indicating that the delta_c, delta_d perturbation should always be used.

Definition at line 235 of file IpCGPerturbationHandler.hpp.

◆ penalty_max_

Number Ipopt::CGPerturbationHandler::penalty_max_
private

The max reference value for scaling the penalty parameter.

Definition at line 239 of file IpCGPerturbationHandler.hpp.

◆ mult_diverg_feasibility_tol_

Number Ipopt::CGPerturbationHandler::mult_diverg_feasibility_tol_
private

Feasibility for perturbation in pure Newton method.

Definition at line 241 of file IpCGPerturbationHandler.hpp.


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