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

This is the implementation of the Primal-Dual System, using the full space approach with a direct linear solver. More...

#include <IpPDFullSpaceSolver.hpp>

+ Inheritance diagram for Ipopt::PDFullSpaceSolver:

Public Member Functions

bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 overloaded from AlgorithmStrategyObject
 
virtual bool Solve (Number alpha, Number beta, const IteratesVector &rhs, IteratesVector &res, bool allow_inexact=false, bool improve_solution=false)
 Solve the primal dual system, given one right hand side.
 
/Destructor
 PDFullSpaceSolver (AugSystemSolver &augSysSolver, PDPerturbationHandler &perturbHandler)
 Constructor that takes in the Augmented System solver that is to be used inside.
 
virtual ~PDFullSpaceSolver ()
 Default destructor.
 
- Public Member Functions inherited from Ipopt::PDSystemSolver
 PDSystemSolver ()
 Default Constructor.
 
virtual ~PDSystemSolver ()
 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
 

Static Public Member Functions

static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 Methods for IpoptType.
 

Private Member Functions

bool SolveOnce (bool resolve_unmodified, bool pretend_singular, const SymMatrix &W, const Matrix &J_c, const Matrix &J_d, const Matrix &Px_L, const Matrix &Px_U, const Matrix &Pd_L, const Matrix &Pd_U, const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U, const Vector &slack_x_L, const Vector &slack_x_U, const Vector &slack_s_L, const Vector &slack_s_U, const Vector &sigma_x, const Vector &sigma_s, Number alpha, Number beta, const IteratesVector &rhs, IteratesVector &res)
 Internal function for a single backsolve (which will be used for iterative refinement on the outside).
 
void ComputeResiduals (const SymMatrix &W, const Matrix &J_c, const Matrix &J_d, const Matrix &Px_L, const Matrix &Px_U, const Matrix &Pd_L, const Matrix &Pd_U, const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U, const Vector &slack_x_L, const Vector &slack_x_U, const Vector &slack_s_L, const Vector &slack_s_U, const Vector &sigma_x, const Vector &sigma_s, Number alpha, Number beta, const IteratesVector &rhs, const IteratesVector &res, IteratesVector &resid)
 Internal function for computing the residual (resid) given the right hand side (rhs) and the solution of the system (res).
 
Number ComputeResidualRatio (const IteratesVector &rhs, const IteratesVector &res, const IteratesVector &resid)
 Internal function for computing the ratio of the residual compared to the right hand side and solution.
 
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.

 PDFullSpaceSolver ()
 Default Constructor.
 
PDFullSpaceSolveroperator= (const PDFullSpaceSolver &)
 Default Assignment Operator.
 
Auxiliary functions
void SinvBlrmZPTdBr (Number alpha, const Vector &S, const Vector &R, const Vector &Z, const Matrix &P, const Vector &g, Vector &X)
 Compute \( x = S^{-1}(r + \alpha Z P^T d)\).
 

Private Attributes

Strategy objects to hold on to.
SmartPtr< AugSystemSolveraugSysSolver_
 Pointer to the Solver for the augmented system.
 
SmartPtr< PDPerturbationHandlerperturbHandler_
 Pointer to the Perturbation Handler.
 
Data about the correction made to the system
CachedResults< void * > dummy_cache_
 A dummy cache to figure out if the deltas are still up to date.
 
bool augsys_improved_
 Flag indicating if for the current matrix the solution quality of the augmented system solver has already been increased.
 
Parameters
Index min_refinement_steps_
 Minimal number of iterative refinement performed per backsolve.
 
Index max_refinement_steps_
 Maximal number of iterative refinement performed per backsolve.
 
Number residual_ratio_max_
 Maximal allowed ratio of the norm of the residual over the norm of the right hand side and solution.
 
Number residual_ratio_singular_
 If the residual_ratio is larger than this value after trying to improve the solution, the linear system is assumed to be singular and modified.
 
Number residual_improvement_factor_
 Factor defining require improvement to consider iterative refinement successful.
 
Number neg_curv_test_tol_
 Tolerance for heuristic to ignore wrong inertia.
 
bool neg_curv_test_reg_
 Do curvature test with primal regularization.
 

Additional Inherited Members

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

Detailed Description

This is the implementation of the Primal-Dual System, using the full space approach with a direct linear solver.

A note on the iterative refinement: We perform at least min_refinement_steps number of iterative refinement steps. If after one iterative refinement the quality of the solution (defined in ResidualRatio) does not improve or the maximal number of iterative refinement steps is exceeded before the tolerance residual_ratio_max_ is satisfied, we first ask the linear solver to solve the system more accurately (e.g. by increasing the pivot tolerance). If that doesn't help or is not possible, we treat the system, as if it is singular (i.e. increase delta's).

Definition at line 30 of file IpPDFullSpaceSolver.hpp.

Constructor & Destructor Documentation

◆ PDFullSpaceSolver() [1/2]

Ipopt::PDFullSpaceSolver::PDFullSpaceSolver ( AugSystemSolver augSysSolver,
PDPerturbationHandler perturbHandler 
)

Constructor that takes in the Augmented System solver that is to be used inside.

◆ ~PDFullSpaceSolver()

virtual Ipopt::PDFullSpaceSolver::~PDFullSpaceSolver ( )
virtual

Default destructor.

◆ PDFullSpaceSolver() [2/2]

Ipopt::PDFullSpaceSolver::PDFullSpaceSolver ( )
private

Default Constructor.

Member Function Documentation

◆ InitializeImpl()

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

overloaded from AlgorithmStrategyObject

Implements Ipopt::PDSystemSolver.

◆ Solve()

virtual bool Ipopt::PDFullSpaceSolver::Solve ( Number  alpha,
Number  beta,
const IteratesVector rhs,
IteratesVector res,
bool  allow_inexact = false,
bool  improve_solution = false 
)
virtual

Solve the primal dual system, given one right hand side.

Implements Ipopt::PDSystemSolver.

◆ RegisterOptions()

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

Methods for IpoptType.

◆ operator=()

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

Default Assignment Operator.

◆ SolveOnce()

bool Ipopt::PDFullSpaceSolver::SolveOnce ( bool  resolve_unmodified,
bool  pretend_singular,
const SymMatrix W,
const Matrix J_c,
const Matrix J_d,
const Matrix Px_L,
const Matrix Px_U,
const Matrix Pd_L,
const Matrix Pd_U,
const Vector z_L,
const Vector z_U,
const Vector v_L,
const Vector v_U,
const Vector slack_x_L,
const Vector slack_x_U,
const Vector slack_s_L,
const Vector slack_s_U,
const Vector sigma_x,
const Vector sigma_s,
Number  alpha,
Number  beta,
const IteratesVector rhs,
IteratesVector res 
)
private

Internal function for a single backsolve (which will be used for iterative refinement on the outside).

Returns
false, if for some reason the linear system could not be solved (e.g. when the regularization parameter becomes too large)

◆ ComputeResiduals()

void Ipopt::PDFullSpaceSolver::ComputeResiduals ( const SymMatrix W,
const Matrix J_c,
const Matrix J_d,
const Matrix Px_L,
const Matrix Px_U,
const Matrix Pd_L,
const Matrix Pd_U,
const Vector z_L,
const Vector z_U,
const Vector v_L,
const Vector v_U,
const Vector slack_x_L,
const Vector slack_x_U,
const Vector slack_s_L,
const Vector slack_s_U,
const Vector sigma_x,
const Vector sigma_s,
Number  alpha,
Number  beta,
const IteratesVector rhs,
const IteratesVector res,
IteratesVector resid 
)
private

Internal function for computing the residual (resid) given the right hand side (rhs) and the solution of the system (res).

◆ ComputeResidualRatio()

Number Ipopt::PDFullSpaceSolver::ComputeResidualRatio ( const IteratesVector rhs,
const IteratesVector res,
const IteratesVector resid 
)
private

Internal function for computing the ratio of the residual compared to the right hand side and solution.

The smaller this value, the better the solution.

◆ SinvBlrmZPTdBr()

void Ipopt::PDFullSpaceSolver::SinvBlrmZPTdBr ( Number  alpha,
const Vector S,
const Vector R,
const Vector Z,
const Matrix P,
const Vector g,
Vector X 
)
private

Compute \( x = S^{-1}(r + \alpha Z P^T d)\).

Member Data Documentation

◆ augSysSolver_

SmartPtr<AugSystemSolver> Ipopt::PDFullSpaceSolver::augSysSolver_
private

Pointer to the Solver for the augmented system.

Definition at line 94 of file IpPDFullSpaceSolver.hpp.

◆ perturbHandler_

SmartPtr<PDPerturbationHandler> Ipopt::PDFullSpaceSolver::perturbHandler_
private

Pointer to the Perturbation Handler.

Definition at line 97 of file IpPDFullSpaceSolver.hpp.

◆ dummy_cache_

CachedResults<void*> Ipopt::PDFullSpaceSolver::dummy_cache_
private

A dummy cache to figure out if the deltas are still up to date.

Definition at line 103 of file IpPDFullSpaceSolver.hpp.

◆ augsys_improved_

bool Ipopt::PDFullSpaceSolver::augsys_improved_
private

Flag indicating if for the current matrix the solution quality of the augmented system solver has already been increased.

Definition at line 108 of file IpPDFullSpaceSolver.hpp.

◆ min_refinement_steps_

Index Ipopt::PDFullSpaceSolver::min_refinement_steps_
private

Minimal number of iterative refinement performed per backsolve.

Definition at line 114 of file IpPDFullSpaceSolver.hpp.

◆ max_refinement_steps_

Index Ipopt::PDFullSpaceSolver::max_refinement_steps_
private

Maximal number of iterative refinement performed per backsolve.

Definition at line 117 of file IpPDFullSpaceSolver.hpp.

◆ residual_ratio_max_

Number Ipopt::PDFullSpaceSolver::residual_ratio_max_
private

Maximal allowed ratio of the norm of the residual over the norm of the right hand side and solution.

Definition at line 122 of file IpPDFullSpaceSolver.hpp.

◆ residual_ratio_singular_

Number Ipopt::PDFullSpaceSolver::residual_ratio_singular_
private

If the residual_ratio is larger than this value after trying to improve the solution, the linear system is assumed to be singular and modified.

Definition at line 128 of file IpPDFullSpaceSolver.hpp.

◆ residual_improvement_factor_

Number Ipopt::PDFullSpaceSolver::residual_improvement_factor_
private

Factor defining require improvement to consider iterative refinement successful.

Definition at line 133 of file IpPDFullSpaceSolver.hpp.

◆ neg_curv_test_tol_

Number Ipopt::PDFullSpaceSolver::neg_curv_test_tol_
private

Tolerance for heuristic to ignore wrong inertia.

Definition at line 136 of file IpPDFullSpaceSolver.hpp.

◆ neg_curv_test_reg_

bool Ipopt::PDFullSpaceSolver::neg_curv_test_reg_
private

Do curvature test with primal regularization.

Definition at line 139 of file IpPDFullSpaceSolver.hpp.


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