PIPS-NLP
|
#include <ReducedSpaceSolver.h>
Public Member Functions | |
virtual int | getDecisionDim () |
virtual int | matrixChanged () |
ReducedSpaceSolver () | |
ReducedSpaceSolver (DoubleMatrix *MatIn, const int decisionVarSize, int *decisionVarID, const int fullVarXSize, const int fullVarYSize, const int fullVarSSize) | |
~ReducedSpaceSolver () | |
![]() | |
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) |
Private Member Functions | |
void | reducedSpaceJacSolve (OoqpVector *rhs_y_, OoqpVector *rhs_z_) |
void | reducedSpaceJacTransSolve (OoqpVector *rhs_x_, OoqpVector *rhs_s_) |
void | solveDeltaU (OoqpVector &rhs_u, OoqpVector *rhs_Full) |
void | schursolveDeltaU (OoqpVector &rhs_u, OoqpVector *rhs_Full) |
void | schursolveDeltaU_BuildSC (OoqpVector &rhs_, OoqpVector *rhs_Full) |
void | _schursolveDeltaU_BuildSC_firstCall () |
void | addTermToDenseSchurCompl (DenseSymMatrix &SC) |
Private Attributes | |
int * | stateVarIDinFull |
int * | FullVarIDinLocal |
Additional Inherited Members | |
![]() | |
int | negEigVal |
int | KryIter |
u is the decision matrix, x is the others (state var) in this solver, we assume Ax and Ax' are invertible.
fullMat = Hxx | Hxu | |Ax' | Tx' | r_x Hux | Huu | |Au' | Tu' | r_u | | Hss | | -I | = r_s Ax | Au | | | | r_y Tx | Tu | -I | | | r_z
this can be reordered as fullMat = Hxx | | Hxu |Ax' | Tx' | r_x | Hss | | | -I | r_s Hux | | Huu |Au' | Tu' | = r_u (1) Ax | | Au | | | r_y Tx | -I | Tu | | | r_z
let C = ( Ax ) , Ac = ( Au ), Huc = ( Hux 0 ) = Hcu' (*) ( Tx -I ) ( Tu )
the invert mat of C is ^{-1} = ( Ax^{-1} ) ( TxAx^{-1} -I )
(1)can be rewrited as Hc | Hcu | C' | r_p Huc | Huu | Ac' | = r_u (2) C | Ac | | r_d
Hc | C' | Hcu | r_p C | | Ac | r_d (3) Huc | Ac' | Huu | = r_u
similar to the schur complement method, we solve the problem fullMat*(x,u,y,z)=r by the following sequence: (a) solve following equation to get ( Huu-Huc*C^{-1}*Ac-Ac'*C^{-T}Hcu+Ac'*C^{-T}*Hc*C^{-1}*Ac ) * = r_u -Ac'*C^{-T}(r_p-Hc*C^{-1}r_d)-Huc*C^{-1}r_d
here we save rhs_p = C^{-1}r_d and rhs_d = C^{-T}(r_p-Hc*C^{-1}r_d)
(b) compute = C^{-1}(r_d-Ac*) = rhs_p - C^{-1}Ac*
(c) compute = C^{-T} [ (r_p-Hc*C^{-1}r_d) - (Hcu-Hc*C^{-1}*Ac)* ] or = C^{-T} ( r_p - Hc*delta_p- Hcu*delta_u) or = rhs_d - C^{-T} (Hcu* -Hc*C^{-1}*Ac* )
the later terms in (b) and (c) are computed by solving
Hc | C' | = r_p = Hcu*\delta_u
C | | r_d Ac*
note that input matrix fullMat is symmetric, and in a row-wise, lower-triangular form
ReducedSpaceSolver::ReducedSpaceSolver | ( | ) |
ReducedSpaceSolver::ReducedSpaceSolver | ( | DoubleMatrix * | MatIn, |
const int | decisionVarSize, | ||
int * | decisionVarID, | ||
const int | fullVarXSize, | ||
const int | fullVarYSize, | ||
const int | fullVarSSize | ||
) |
|
inline |
|
protectedvirtual |
|
private |
|
private |
|
inlineprotectedvirtual |
called if the diagonal elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.
idiag | index of the first diagonal element that changed |
extent | the number of diagonal element that changed. |
Implements DoubleLinearSolver.
|
protectedvirtual |
|
inlinevirtual |
|
inlinevirtual |
called if some elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.
Implements DoubleLinearSolver.
|
private |
|
private |
|
private |
|
private |
|
protectedvirtual |
solves a linear system.
x | on entry the right hand side of the system to be solved. On exit, the solution. |
Implements DoubleLinearSolver.
|
protectedvirtual |
Reimplemented from DoubleLinearSolver.
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |