ConicBundle
QPIterativeKKTHAeqSolver.hxx
1 
2 #ifndef CONICBUNDLE_QPITERATIVEKKTHAEQSOLVER_HXX
3 #define CONICBUNDLE_QPITERATIVEKKTHAEQSOLVER_HXX
4 
14 #include "QPIterativeKKTSolver.hxx"
15 
16 namespace ConicBundle {
17 
21 
50 {
51 protected:
52 
53  //--- data describing the KKT system
54  //QPSolverProxObject* Hp; ///< points to the quadratic cost representation, may NOT be NULL afer init
55  //QPModelBlockObject* model; ///< points to the cutting model information, may be NULL
56  //const CH_Matrix_Classes::Sparsemat* A; ///< points to a possibly present constraint matrix, may be NULL
57  //const Indexmatrix* eq_indices; ///< if not NULL, these rows of A correspond to equations; needed for checking applicability of this Object
58 
59  // CH_Matrix_Classes::IterativeSolverObject* solver; ///< the iterative solution method to be used, may not be NULL, deleted on destruction or replacemnt
60  // QPKKTPrecondObject* precond; ///< a preconditioning routine compatible with this system AND the solver, may be NULL (no preconditioning); consistency cannot be checked here and must be guaranteed externally; deleted on destruction or replacement
61 
62  // CH_Matrix_Classes::Matrix KKTdiagx; ///< diagonal term to be added to the H-block due to bounds on the qudratic variables
63  // CH_Matrix_Classes::Matrix KKTdiagy; ///< diagonal term to be added to the A-block due to bounds on the constraints
64 
65  // CH_Matrix_Classes::Matrix sysrhs; ///< the right hand side of the system
66  // CH_Matrix_Classes::Matrix sol; ///< solution vector of the entire system
67  // CH_Matrix_Classes::Matrix solmod; ///< temporary solution part of the model variables
68  // CH_Matrix_Classes::Matrix solcstr; ///< temporary solution part of the model constraint variables
69 
70  // CH_Matrix_Classes::Matrix in_vecx; ///< temporary storage for x part of in_vec in ItSys_mult
71  // CH_Matrix_Classes::Matrix in_vecy; ///< temporary storage for y part of in_vec in ItSys_mult
72  // CH_Matrix_Classes::Matrix in_model; ///< temporary storage for model part of in_vec in ItSys_mult
73 
76 
79 
80 public:
81  // reset data to empty but keep solver and preconditioner
82  //virtual void clear();
83 
86  CBout(cb,cbinc),QPIterativeKKTSolver(insolver,inprecond,cb,cbinc)
87  {}
88 
90  virtual ~QPIterativeKKTHAeqSolver();
91 
92 
94  virtual int QPinit_KKTdata(QPSolverProxObject* Hp,
98  );
99 
100  // set up the primal dual KKT system for being solved for predictor and corrector rhs in QPsolve_KKTsystem
101  // virtual int QPinit_KKTsystem(const CH_Matrix_Classes::Matrix& KKTdiagx,
102  // const CH_Matrix_Classes::Matrix& KKTdiagy,
103  // CH_Matrix_Classes::Real prec,
104  // QPSolverParameters* params);
105 
109  const CH_Matrix_Classes::Matrix& primalrhs,
110  const CH_Matrix_Classes::Matrix& dualrhs,
112  CH_Matrix_Classes::Real rhscorr,
114  QPSolverParameters* params);
115 
116  //returns the right hand side vector (dense)
117  //virtual const CH_Matrix_Classes::Matrix& ItSys_rhs()
118  //{return sysrhs;}
119 
121  virtual int ItSys_mult(const CH_Matrix_Classes::Matrix& in_vec,CH_Matrix_Classes::Matrix& out_vec);
122 
123  //returns M1^{-1}*vec; default: M1=I
124  //virtual int ItSys_precondM1(CH_Matrix_Classes::Matrix& vec)
125  //{return (precond?precond->precondM1(vec):0);}
126 
127  //returns M2^{-1}vec; default: M2=I
128  //virtual int ItSys_precondM2(CH_Matrix_Classes::Matrix& vec)
129  //{return (precond?precond->precondM2(vec):0);}
130 
133  {return KKTdiagx.rowdim()+(eq_indices?eq_indices->rowdim():0);}
134 
135  };
136 
137 
138 
139 
140 
142 
143 }
144 
145 #endif
146 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
parameters for steering the termination criteria and solution method of the solver ...
Definition: QPSolverParameters.hxx:26
virtual ~QPIterativeKKTHAeqSolver()
virtual destructor
Integer rowdim() const
returns the row dimension
Definition: matrix.hxx:215
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
CH_Matrix_Classes::Integer recordstep
each recordstep iteration the iterate is stored in xrecord
Definition: QPIterativeKKTHAeqSolver.hxx:75
Header declaring the class ConicBundle::QPIterativeKKTSolver.
QPIterativeKKTHAeqSolver(CH_Matrix_Classes::IterativeSolverObject *insolver, QPKKTPrecondObject *inprecond=0, CBout *cb=0, int cbinc=-1)
default constructor
Definition: QPIterativeKKTHAeqSolver.hxx:85
QPModelBlockObject * model
points to the cutting model information, may be NULL
Definition: QPKKTSolverObject.hxx:107
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
allows measuring time difference to its initialization time in Microseconds
Definition: clock.hxx:282
virtual CH_Matrix_Classes::Integer QPget_system_size()
for evaluation purposes with iterative solvers, return the size of the system matrix ...
Definition: QPIterativeKKTHAeqSolver.hxx:132
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
virtual int QPsolve_KKTsystem(CH_Matrix_Classes::Matrix &solx, CH_Matrix_Classes::Matrix &soly, const CH_Matrix_Classes::Matrix &primalrhs, const CH_Matrix_Classes::Matrix &dualrhs, CH_Matrix_Classes::Real rhsmu, CH_Matrix_Classes::Real rhscorr, CH_Matrix_Classes::Real prec, QPSolverParameters *params)
solve the KKTsystem to precision prec for the given right hand sides that have been computed for the ...
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
extra long integer number for expressing and computing time measurements in microseconds.
Definition: clock.hxx:46
CH_Tools::Clock clock
for taking the time spent in ItSys_mult
Definition: QPIterativeKKTHAeqSolver.hxx:77
CH_Matrix_Classes::Matrix xrecord
testing phase attempt to use iterates of the iterative solver for preconditiong, stored here ...
Definition: QPIterativeKKTHAeqSolver.hxx:74
CH_Matrix_Classes::Matrix KKTdiagx
diagonal term to be added to the H-block due to bounds on the qudratic variables
Definition: QPIterativeKKTSolver.hxx:63
Matrix class for real values of type Real
Definition: matrix.hxx:74
Matrix class of sparse matrices with real values of type Real
Definition: sparsmat.hxx:74
Iterative solver for the full symmetric, in general indefinite primal dual KKT System within QPSolver...
Definition: QPIterativeKKTSolver.hxx:49
CH_Tools::Microseconds t_itsys_mult
time spent in ItSys_mult
Definition: QPIterativeKKTHAeqSolver.hxx:78
const CH_Matrix_Classes::Indexmatrix * eq_indices
if not NULL, these rows of A correspond to equations; needed for checking applicability of this Objec...
Definition: QPKKTSolverObject.hxx:109
virtual int ItSys_mult(const CH_Matrix_Classes::Matrix &in_vec, CH_Matrix_Classes::Matrix &out_vec)
returns out_vec=(system matrix)*in_vec
abstract interface for model blocks in the constrained QPSolver
Definition: QPModelBlockObject.hxx:89
Integer rowdim() const
returns the row dimension
Definition: indexmat.hxx:321
Abstract Interface for preconditioners to be used with a QPIterativeKKTSolver and a CH_Matrix_Classes...
Definition: QPKKTPrecondObject.hxx:52
QPSolverProxObject * Hp
points to the quadratic cost representation, may NOT be NULL afer init
Definition: QPKKTSolverObject.hxx:106
virtual int QPinit_KKTdata(QPSolverProxObject *Hp, QPModelBlockObject *model, const CH_Matrix_Classes::Sparsemat *A, const CH_Matrix_Classes::Indexmatrix *eq_indices)
returns 1 if this class is not applicable in the current data situation, otherwise it stores the data...
const CH_Matrix_Classes::Sparsemat * A
points to a possibly present constraint matrix, may be NULL
Definition: QPKKTSolverObject.hxx:108
Abstract interface to iterative methods for solving Ax=b given by an IterativeSystemObject.
Definition: IterativeSystemObject.hxx:61
in order to pass a ConicBundle::BundleProxObject, see Quadratic Proximal Terms, to a custzomized QPSo...
Definition: QPSolverObject.hxx:55
Iterative solver for the reduced symmetric, in general indefinite primal dual KKT System within QPSol...
Definition: QPIterativeKKTHAeqSolver.hxx:49