Ipopt  3.12.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
Ipopt::GenKKTSolverInterface Class Referenceabstract

Base class for interfaces to symmetric indefinite linear solvers for generic matrices. More...

#include <IpGenKKTSolverInterface.hpp>

+ Inheritance diagram for Ipopt::GenKKTSolverInterface:

Public Member Functions

virtual bool InitializeImpl (const OptionsList &options, const std::string &prefix)=0
 overloaded from AlgorithmStrategyObject More...
 
Constructor/Destructor
 GenKKTSolverInterface ()
 
virtual ~GenKKTSolverInterface ()
 
Methods for requesting solution of the linear system.
virtual ESymSolverStatus MultiSolve (bool new_matrix, Index n_x, Index n_c, Index n_d, SmartPtr< const SymMatrix > W, SmartPtr< const Matrix > Jac_c, SmartPtr< const Matrix > Jac_d, const Number *D_x, const Number *D_s, const Number *D_c, const Number *D_d, Number delta_x, Number delta_s, Number delta_c, Number delta_d, Index n_rhs, Number *rhssol, bool check_NegEVals, Index numberOfNegEVals)=0
 Solve operation for multiple right hand sides. More...
 
virtual Index NumberOfNegEVals () const =0
 Number of negative eigenvalues detected during last factorization. More...
 
virtual bool IncreaseQuality ()=0
 Request to increase quality of solution for next solve. More...
 
virtual bool ProvidesInertia () const =0
 Query whether inertia is computed by linear solver. More...
 
- 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. 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...
 
 AlgorithmStrategyObject ()
 Default Constructor. More...
 
virtual ~AlgorithmStrategyObject ()
 Default Destructor. 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
 

Additional Inherited Members

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

Detailed Description

Base class for interfaces to symmetric indefinite linear solvers for generic matrices.

Definition at line 20 of file IpGenKKTSolverInterface.hpp.

Constructor & Destructor Documentation

Ipopt::GenKKTSolverInterface::GenKKTSolverInterface ( )
inline

Definition at line 25 of file IpGenKKTSolverInterface.hpp.

virtual Ipopt::GenKKTSolverInterface::~GenKKTSolverInterface ( )
inlinevirtual

Definition at line 28 of file IpGenKKTSolverInterface.hpp.

Member Function Documentation

virtual bool Ipopt::GenKKTSolverInterface::InitializeImpl ( const OptionsList options,
const std::string &  prefix 
)
pure virtual
virtual ESymSolverStatus Ipopt::GenKKTSolverInterface::MultiSolve ( bool  new_matrix,
Index  n_x,
Index  n_c,
Index  n_d,
SmartPtr< const SymMatrix W,
SmartPtr< const Matrix Jac_c,
SmartPtr< const Matrix Jac_d,
const Number D_x,
const Number D_s,
const Number D_c,
const Number D_d,
Number  delta_x,
Number  delta_s,
Number  delta_c,
Number  delta_d,
Index  n_rhs,
Number rhssol,
bool  check_NegEVals,
Index  numberOfNegEVals 
)
pure virtual

Solve operation for multiple right hand sides.

The linear system is of the form

$\left[\begin{array}{cccc} W + D_x + \delta_xI & 0 & J_c^T & J_d^T\\ 0 & D_s + \delta_sI & 0 & -I \\ J_c & 0 & D_c - \delta_cI & 0\\ J_d & -I & 0 & D_d - \delta_dI \end{array}\right] \left(\begin{array}{c}sol_x\\sol_s\\sol_c\\sol_d\end{array}\right)= \left(\begin{array}{c}rhs_x\\rhs_s\\rhs_c\\rhs_d\end{array}\right)$

(see also AugSystemSolver).

The return code is SYMSOLV_SUCCESS if the factorization and solves were successful, SYMSOLV_SINGULAR if the linear system is singular, and SYMSOLV_WRONG_INERTIA if check_NegEVals is true and the number of negative eigenvalues in the matrix does not match numberOfNegEVals. If SYMSOLV_CALL_AGAIN is returned, then the calling function will request the pointer for the array for storing a again (with GetValuesPtr), write the values of the nonzero elements into it, and call this MultiSolve method again with the same right-hand sides. (This can be done, for example, if the linear solver realized it does not have sufficient memory and needs to redo the factorization; e.g., for MA27.)

The number of right-hand sides is given by nrhs, the values of the right-hand sides are given in rhs_vals (one full right-hand side stored immediately after the other), and solutions are to be returned in the same array.

check_NegEVals will not be chosen true, if ProvidesInertia() returns false.

Parameters
new_matrixIf this flag is false, the same matrix as in the most recent call is given to the solver again
n_xDimension of D_x
n_cDimension of D_s and D_c
n_dDimension of D_d
WHessian of Lagrangian (as given by NLP)
Jac_cJacobian of equality constraints (as given by NLP)
Jac_dJacobian of inequality constraints (as given by NLP)
D_xArray with the elements D_x (if NULL, assume all zero)
D_sArray with the elements D_s (if NULL, assume all zero)
D_cArray with the elements D_c (if NULL, assume all zero)
D_dArray with the elements D_d (if NULL, assume all zero)
delta_x$ \delta_x$
delta_s$ \delta_s$
delta_c$ \delta_c$
delta_d$ \delta_d$
n_rhsNumber of right hand sides
rhssolOn input, this containts the right hand sides, and on successful termination of the solver, the solutions are expected in there on return. At the moment, the order is x,d,c,s, but this can be made flexible and chosen according to an option.
check_NegEValsif true, we want to ensure that the inertia is correct
numberOfNegEValsRequired number of negative eigenvalues if check_NegEVals is true
virtual Index Ipopt::GenKKTSolverInterface::NumberOfNegEVals ( ) const
pure virtual

Number of negative eigenvalues detected during last factorization.

Returns the number of negative eigenvalues of the most recent factorized matrix. This must not be called if the linear solver does not compute this quantities (see ProvidesInertia).

virtual bool Ipopt::GenKKTSolverInterface::IncreaseQuality ( )
pure virtual

Request to increase quality of solution for next solve.

The calling class asks 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.)

virtual bool Ipopt::GenKKTSolverInterface::ProvidesInertia ( ) const
pure virtual

Query whether inertia is computed by linear solver.

Returns true, if linear solver provides inertia.


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