Class for handling the perturbation factors delta_x, delta_s, delta_c, and delta_d in the primal dual system. More...
#include <IpCGPerturbationHandler.hpp>
Public Member Functions | |
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. | |
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. | |
bool | PerturbForSingularity (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d) |
This method returns pertubation factors for the case when the most recent factorization resulted in a singular matrix. | |
bool | PerturbForWrongInertia (Number &delta_x, Number &delta_s, Number &delta_c, Number &delta_d) |
This method returns pertubation factors for the case when the most recent factorization resulted in a matrix with an incorrect number of negative eigenvalues. | |
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. | |
Constructors/Destructors | |
CGPerturbationHandler () | |
Default Constructor. | |
virtual | ~CGPerturbationHandler () |
Default destructor. | |
Static Public Member Functions | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Methods for IpoptType. | |
Private Member Functions | |
Default Compiler Generated Methods | |
CGPerturbationHandler (const CGPerturbationHandler &) | |
Copy Constructor. | |
void | operator= (const CGPerturbationHandler &) |
Overloaded Equals Operator. | |
Auxilliary 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. | |
void | finalize_test () |
This method is call whenever a matrix had been factorization and is not singular. | |
Number | delta_cd () |
Compute perturbation value for constraints. | |
Private Attributes | |
bool | get_deltas_for_wrong_inertia_called_ |
Flag indicating if for the given matrix the perturb for wrong inertia method has already been called. | |
Number | penalty_max_ |
The max reference value for scaling the penalty parameter. | |
Number | mult_diverg_feasibility_tol_ |
Feasibility for perturbation in pure Newton method. | |
Size of the most recent non-zero perturbation. | |
Number | delta_x_last_ |
The last nonzero value for delta_x. | |
Number | delta_s_last_ |
The last nonzero value for delta_s. | |
Number | delta_c_last_ |
The last nonzero value for delta_c. | |
Number | delta_d_last_ |
The last nonzero value for delta_d. | |
Size of the most recently suggested perturbation for the | |
Number | delta_x_curr_ |
The current value for delta_x. | |
Number | delta_s_curr_ |
The current value for delta_s. | |
Number | delta_c_curr_ |
The current value for delta_c. | |
Number | delta_d_curr_ |
The current value for delta_d. | |
Algorithmic parameters. | |
Number | delta_xs_max_ |
Maximal perturbation for x and s. | |
Number | delta_xs_min_ |
Smallest possible perturbation for x and s. | |
Number | delta_xs_first_inc_fact_ |
Increase factor for delta_xs for first required perturbation. | |
Number | delta_xs_inc_fact_ |
Increase factor for delta_xs for later perturbations. | |
Number | delta_xs_dec_fact_ |
Decrease factor for delta_xs for later perturbations. | |
Number | delta_xs_init_ |
Very first trial value for delta_xs perturbation. | |
Number | delta_cd_val_ |
Size of perturbation for c and d blocks. | |
Number | delta_cd_exp_ |
Exponent on mu in formula for of perturbation for c and d blocks. | |
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. | |
Index | degen_iters_max_ |
Required number of iterations for degeneracy conclusions. | |
bool | perturb_always_cd_ |
Flag indicating that the delta_c, delta_d perturbation should always be used. | |
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. | |
DegenType | jac_degenerate_ |
Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient. | |
Index | degen_iters_ |
Flag counting matrices in which degeneracy was observed in the first successive iterations. | |
TrialStatus | test_status_ |
Current status. |
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 24 of file IpCGPerturbationHandler.hpp.
enum Ipopt::CGPerturbationHandler::DegenType [private] |
Type for degeneracy flags.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 121 of file IpCGPerturbationHandler.hpp.
enum Ipopt::CGPerturbationHandler::TrialStatus [private] |
Status of current trial configuration.
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 |
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 142 of file IpCGPerturbationHandler.hpp.
Ipopt::CGPerturbationHandler::CGPerturbationHandler | ( | ) |
Default Constructor.
virtual Ipopt::CGPerturbationHandler::~CGPerturbationHandler | ( | ) | [inline, virtual] |
Default destructor.
Definition at line 32 of file IpCGPerturbationHandler.hpp.
Ipopt::CGPerturbationHandler::CGPerturbationHandler | ( | const CGPerturbationHandler & | ) | [private] |
Copy Constructor.
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.
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.
bool Ipopt::CGPerturbationHandler::PerturbForSingularity | ( | Number & | delta_x, | |
Number & | delta_s, | |||
Number & | delta_c, | |||
Number & | delta_d | |||
) | [virtual] |
This method returns pertubation factors for the case when the most recent factorization resulted in a singular matrix.
If the return value is false, no suitable perturbation could be found.
Reimplemented from Ipopt::PDPerturbationHandler.
bool Ipopt::CGPerturbationHandler::PerturbForWrongInertia | ( | Number & | delta_x, | |
Number & | delta_s, | |||
Number & | delta_c, | |||
Number & | delta_d | |||
) | [virtual] |
This method returns pertubation factors for the case when the most recent factorization resulted in a matrix with an incorrect number of negative eigenvalues.
If the return value is false, no suitable perturbation could be found.
Reimplemented from Ipopt::PDPerturbationHandler.
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.
static void Ipopt::CGPerturbationHandler::RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |
Methods for IpoptType.
Reimplemented from Ipopt::PDPerturbationHandler.
void Ipopt::CGPerturbationHandler::operator= | ( | const CGPerturbationHandler & | ) | [private] |
Overloaded Equals Operator.
Reimplemented from Ipopt::PDPerturbationHandler.
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.
Reimplemented from Ipopt::PDPerturbationHandler.
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 deneracy test heuristics.
Reimplemented from Ipopt::PDPerturbationHandler.
Number Ipopt::CGPerturbationHandler::delta_cd | ( | ) | [private] |
Compute perturbation value for constraints.
Reimplemented from Ipopt::PDPerturbationHandler.
The last nonzero value for delta_x.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 92 of file IpCGPerturbationHandler.hpp.
The last nonzero value for delta_s.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 94 of file IpCGPerturbationHandler.hpp.
The last nonzero value for delta_c.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 96 of file IpCGPerturbationHandler.hpp.
The last nonzero value for delta_d.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 98 of file IpCGPerturbationHandler.hpp.
The current value for delta_x.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 105 of file IpCGPerturbationHandler.hpp.
The current value for delta_s.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 107 of file IpCGPerturbationHandler.hpp.
The current value for delta_c.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 109 of file IpCGPerturbationHandler.hpp.
The current value for delta_d.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 111 of file IpCGPerturbationHandler.hpp.
Flag indicating if for the given matrix the perturb for wrong inertia method has already been called.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 116 of file IpCGPerturbationHandler.hpp.
Flag indicating whether the reduced Hessian matrix is thought to be structurally singular.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 130 of file IpCGPerturbationHandler.hpp.
Flag indicating whether the Jacobian of the constraints is thought to be structurally rank-deficient.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 134 of file IpCGPerturbationHandler.hpp.
Flag counting matrices in which degeneracy was observed in the first successive iterations.
-1 means that there was a non-degenerate (unperturbed) matrix at some point.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 139 of file IpCGPerturbationHandler.hpp.
Current status.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 152 of file IpCGPerturbationHandler.hpp.
Maximal perturbation for x and s.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 158 of file IpCGPerturbationHandler.hpp.
Smallest possible perturbation for x and s.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 160 of file IpCGPerturbationHandler.hpp.
Increase factor for delta_xs for first required perturbation.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 162 of file IpCGPerturbationHandler.hpp.
Increase factor for delta_xs for later perturbations.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 164 of file IpCGPerturbationHandler.hpp.
Decrease factor for delta_xs for later perturbations.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 166 of file IpCGPerturbationHandler.hpp.
Very first trial value for delta_xs perturbation.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 168 of file IpCGPerturbationHandler.hpp.
Size of perturbation for c and d blocks.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 170 of file IpCGPerturbationHandler.hpp.
Exponent on mu in formula for of perturbation for c and d blocks.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 172 of file IpCGPerturbationHandler.hpp.
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.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 176 of file IpCGPerturbationHandler.hpp.
Required number of iterations for degeneracy conclusions.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 178 of file IpCGPerturbationHandler.hpp.
bool Ipopt::CGPerturbationHandler::perturb_always_cd_ [private] |
Flag indicating that the delta_c, delta_d perturbation should always be used.
Reimplemented from Ipopt::PDPerturbationHandler.
Definition at line 181 of file IpCGPerturbationHandler.hpp.
The max reference value for scaling the penalty parameter.
Definition at line 185 of file IpCGPerturbationHandler.hpp.
Feasibility for perturbation in pure Newton method.
Definition at line 187 of file IpCGPerturbationHandler.hpp.