PIPS-NLP
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
SaddlePointSolver Class Reference

#include <SaddlePointSolver.h>

Inheritance diagram for SaddlePointSolver:
DoubleLinearSolver

Public Member Functions

virtual int matrixChanged ()
 
 SaddlePointSolver ()
 
 SaddlePointSolver (DoubleMatrix *MatIn, const int localXSize, const int localYSize, const int localZSize)
 
 ~SaddlePointSolver ()
 
- Public Member Functions inherited from DoubleLinearSolver
 DoubleLinearSolver ()
 
virtual void solveTrans (OoqpVector &x)
 
virtual void Lsolve (OoqpVector &x)
 
virtual void Dsolve (OoqpVector &x)
 
virtual void Ltsolve (OoqpVector &x)
 
virtual ~DoubleLinearSolver ()
 

Protected Member Functions

virtual void firstCall ()
 
virtual int _numericalFact ()
 
virtual void diagonalChanged (int idiag, int extent)
 
virtual void solve (OoqpVector &rhs_)
 
virtual void solve (GenMatrix &rhs_in)
 

Protected Attributes

DoubleLinearSolverAx_solver
 
int firstCallFlag
 
int firstSCsolve
 
int Hxx_Dim
 
int Hss_Dim
 
int Ax_Dim_m
 
int Tx_Dim_m
 
int fullMatDim
 
int Hxx_NNz
 
int Hss_NNz
 
int Ax_NNz
 
int Tx_NNz
 
int fullMatNNz
 
double * Hxx_ele
 
double * Hss_ele
 
double * Ax_ele
 
double * Tx_ele
 
int * Hxx_rowBeg
 
int * Hss_rowBeg
 
int * Ax_rowBeg
 
int * Tx_rowBeg
 
int * Hxx_colIdx
 
int * Hss_colIdx
 
int * Ax_colIdx
 
int * Tx_colIdx
 
int * Hxx_Full_eleMap
 
int * Hss_Full_eleMap
 
int * Ax_Full_eleMap
 
int * Tx_Full_eleMap
 
int locnx
 
int locns
 
int locmy
 
SparseSymMatrixHxx_Mat
 
SparseSymMatrixHss_Mat
 
SparseGenMatrixAx_Mat
 
SparseGenMatrixTx_Mat
 
SparseSymMatrixMsys
 

Private Member Functions

void SaddlePointJacSolve (OoqpVector *rhs_y_, OoqpVector *rhs_z_)
 
void SaddlePointJacTransSolve (OoqpVector *rhs_x_, OoqpVector *rhs_s_)
 

Additional Inherited Members

- Public Attributes inherited from DoubleLinearSolver
int negEigVal
 
int KryIter
 

Detailed Description

u is the decision matrix, x is the others (state var) in this solver, we assume Ax and Ax' are invertible.

all the u var have been removed.

fullMat = Hxx | | Ax' | Tx' | r_x | Hss | | -I | = r_s (1) Ax | |(reg_d) | | r_y Tx | -I | |(reg_d) | r_z

reg_d is diagonal and ==0, we do not need it.

let C = ( Ax ) , Hc = ( Hxx 0 ) (*) ( Tx -I ) ( 0 Hss )

(1)can be rewrited as Hc | C' | = r_p (2) C | | r_d

the invert mat of C is ^{-1} = ( Ax^{-1} ) ( TxAx^{-1} -I )

similar to the schur complement method, we solve the problem fullMat*(x,s,y,z)=r by the following sequence: (a) compute = C^{-1} (r_d)

(b) compute = C^{-T} ( r_p - Hc*delta_p)

note that input matrix fullMat is symmetric, and in a row-wise, lower-triangular form

Constructor & Destructor Documentation

SaddlePointSolver::SaddlePointSolver ( )
SaddlePointSolver::SaddlePointSolver ( DoubleMatrix MatIn,
const int  localXSize,
const int  localYSize,
const int  localZSize 
)
SaddlePointSolver::~SaddlePointSolver ( )
inline

Member Function Documentation

int SaddlePointSolver::_numericalFact ( )
protectedvirtual
virtual void SaddlePointSolver::diagonalChanged ( int  idiag,
int  extent 
)
inlineprotectedvirtual

called if the diagonal elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.

Parameters
idiagindex of the first diagonal element that changed
extentthe number of diagonal element that changed.

Implements DoubleLinearSolver.

void SaddlePointSolver::firstCall ( )
protectedvirtual
virtual int SaddlePointSolver::matrixChanged ( )
inlinevirtual

called if some elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.

Implements DoubleLinearSolver.

void SaddlePointSolver::SaddlePointJacSolve ( OoqpVector rhs_y_,
OoqpVector rhs_z_ 
)
private
void SaddlePointSolver::SaddlePointJacTransSolve ( OoqpVector rhs_x_,
OoqpVector rhs_s_ 
)
private
void SaddlePointSolver::solve ( OoqpVector x)
protectedvirtual

solves a linear system.

Parameters
xon entry the right hand side of the system to be solved. On exit, the solution.

Implements DoubleLinearSolver.

void SaddlePointSolver::solve ( GenMatrix rhs_in)
protectedvirtual

Reimplemented from DoubleLinearSolver.

Member Data Documentation

int * SaddlePointSolver::Ax_colIdx
protected
int SaddlePointSolver::Ax_Dim_m
protected
double * SaddlePointSolver::Ax_ele
protected
int * SaddlePointSolver::Ax_Full_eleMap
protected
SparseGenMatrix* SaddlePointSolver::Ax_Mat
protected
int SaddlePointSolver::Ax_NNz
protected
int * SaddlePointSolver::Ax_rowBeg
protected
DoubleLinearSolver* SaddlePointSolver::Ax_solver
protected
int SaddlePointSolver::firstCallFlag
protected
int SaddlePointSolver::firstSCsolve
protected
int SaddlePointSolver::fullMatDim
protected
int SaddlePointSolver::fullMatNNz
protected
int * SaddlePointSolver::Hss_colIdx
protected
int SaddlePointSolver::Hss_Dim
protected
double * SaddlePointSolver::Hss_ele
protected
int * SaddlePointSolver::Hss_Full_eleMap
protected
SparseSymMatrix * SaddlePointSolver::Hss_Mat
protected
int SaddlePointSolver::Hss_NNz
protected
int * SaddlePointSolver::Hss_rowBeg
protected
int* SaddlePointSolver::Hxx_colIdx
protected
int SaddlePointSolver::Hxx_Dim
protected
double* SaddlePointSolver::Hxx_ele
protected
int* SaddlePointSolver::Hxx_Full_eleMap
protected
SparseSymMatrix* SaddlePointSolver::Hxx_Mat
protected
int SaddlePointSolver::Hxx_NNz
protected
int* SaddlePointSolver::Hxx_rowBeg
protected
int SaddlePointSolver::locmy
protected
int SaddlePointSolver::locns
protected
int SaddlePointSolver::locnx
protected
SparseSymMatrix* SaddlePointSolver::Msys
protected
int * SaddlePointSolver::Tx_colIdx
protected
int SaddlePointSolver::Tx_Dim_m
protected
double * SaddlePointSolver::Tx_ele
protected
int * SaddlePointSolver::Tx_Full_eleMap
protected
SparseGenMatrix * SaddlePointSolver::Tx_Mat
protected
int SaddlePointSolver::Tx_NNz
protected
int * SaddlePointSolver::Tx_rowBeg
protected

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