2 #ifndef CONICBUNDLE_QPSUMMODELBLOCK_HXX 3 #define CONICBUNDLE_QPSUMMODELBLOCK_HXX 216 bool append_globtransp_times_mat_to_subspace,
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
virtual CH_Matrix_Classes::Real dualviol_2normsqr()
return the squared Euclidean norm of the dual model violation
virtual int localsys_mult(const CH_Matrix_Classes::Matrix &in_vec, CH_Matrix_Classes::Matrix &out_vec, CH_Matrix_Classes::Integer startindex_model, CH_Matrix_Classes::Integer startindex_constraints)
multiply the local system diagonal block consisting of the model and local contraints rows and column...
virtual CH_Matrix_Classes::Matrix & times_B(const CH_Matrix_Classes::Matrix &A, CH_Matrix_Classes::Matrix &C, CH_Matrix_Classes::Real alpha, CH_Matrix_Classes::Real beta, int Atrans, int Btrans, CH_Matrix_Classes::Integer startindex_model, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
C=beta*C+alpha*A*B where A and B may be transposed; carry out the model part of this beginning at sta...
virtual int add_Schur_mult(const CH_Matrix_Classes::Matrix &in_vec, CH_Matrix_Classes::Matrix &out_vec, const CH_Matrix_Classes::Matrix *in_cvec, CH_Matrix_Classes::Matrix *out_cvec, CH_Matrix_Classes::Integer startindex_constraints, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
multiply in_vec with the local contribution to the global main block and add it to out_vec; the other...
virtual int get_modeldcstr(CH_Matrix_Classes::Matrix &modeldcstr, CH_Matrix_Classes::Integer startindex_constraints)
set the local modeldcstr value in modeldcstr beginning with startindex (initialize it...
virtual void recursive_delete_and_clear()
usually the objects of the recursive block structure and not deleted in a clear. If needed...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual int add_BtinvsysB(CH_Matrix_Classes::Symmatrix &globalsys, MinorantBundle &bundle, CH_Matrix_Classes::Integer startindex_bundle)
add the "scaled" minorant outer products to globalsys, where the correct minroants start at the given...
virtual int add_modelx_aggregate(CH_Matrix_Classes::Real &val, CH_Matrix_Classes::Matrix &vec, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
adds opB transposed times modelx (without constant affine term) to the arguments
virtual CH_Matrix_Classes::Matrix & get_Bt(CH_Matrix_Classes::Matrix &Bt, CH_Matrix_Classes::Integer startindex_model, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
get the current matrix for the coupling matrix Bt in the first row of blocks
CH_Matrix_Classes::Matrix modeldcstr
only for testing
Definition: QPModelBlock.hxx:58
void clear()
reset to "empty/no" model
CH_Matrix_Classes::Integer modeldim
the joint dimension of the modle, may change after any change of the point
Definition: QPSumModelBlock.hxx:41
virtual int do_step(CH_Matrix_Classes::Real alpha, const CH_Matrix_Classes::Matrix &y, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
move in the last computed step direction by a step of length alpha and compute and store the violatio...
virtual int solve_constrsys(const CH_Matrix_Classes::Symmatrix &ABchol, const CH_Matrix_Classes::Matrix &LinvABrhs, CH_Matrix_Classes::Matrix &LinvABsol, CH_Matrix_Classes::Integer startindex_model, CH_Matrix_Classes::Matrix &Crhs_and_sol, CH_Matrix_Classes::Integer startindex_constraints)
given the Cholesky factorization LL' of minus the blocks A and B (contraints on design variables and ...
virtual int compute_step(const CH_Matrix_Classes::Matrix &ystep, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
compute the step in the model space given the step in the design space
virtual int get_modeldx(CH_Matrix_Classes::Matrix &modeldx, CH_Matrix_Classes::Integer startindex_model)
set the local modeldx value in modeldx beginning with startindex (initialize it, do not add) ...
combines and provides basic functionalities of QPModelDataObject and QPModelBlockObject, but is still abstract
Definition: QPModelBlock.hxx:47
virtual int prepare_BCSchur_JLprecond(CH_Matrix_Classes::Matrix &glob_lowrank, CH_Matrix_Classes::Matrix &subspace, bool append_globtransp_times_mat_to_subspace, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
compute the preconditioning low-rank representation of the Schur complementd blocks belonging to bund...
std::vector< QPModelBlock * > blocks
the container pointing to the QPModelBlock instances comprised in the sum
Definition: QPSumModelBlock.hxx:39
virtual void display_model_values(const CH_Matrix_Classes::Matrix &y, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle, std::ostream &out)
output for debbuging purposes
virtual int add_BCSchur_diagonal(CH_Matrix_Classes::Matrix &diagonal, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
add the diagonal of the Schur complemented blocks belonging to bundle and local constraints (used for...
abstract interface declaring the uniform outer appearance of general cutting models produced by the v...
Definition: QPModelDataObject.hxx:44
virtual int computed_Schur_step(const CH_Matrix_Classes::Matrix &xstep, const CH_Matrix_Classes::Matrix &local_step, CH_Matrix_Classes::Integer startindex_model, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
for passing on the solution information after solvin the system
CH_Matrix_Classes::Matrix modeldx
only for testing
Definition: QPModelBlock.hxx:57
Matrix class of symmetric matrices with real values of type Real
Definition: symmat.hxx:43
virtual int reset_starting_point(const CH_Matrix_Classes::Matrix &y, CH_Matrix_Classes::Real mu, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
reset the starting point for this value of the design variables y
virtual CH_Matrix_Classes::Real primalviol_2normsqr()
return the squared Euclidean norm of constraint violation of modelx
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
virtual CH_Matrix_Classes::Matrix & B_times(const CH_Matrix_Classes::Matrix &A, CH_Matrix_Classes::Matrix &C, CH_Matrix_Classes::Real alpha, CH_Matrix_Classes::Real beta, int Btrans, int Atrans, CH_Matrix_Classes::Integer startindex_model, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
C=beta*C+alpha*B*A where B and A may be transposed; carry out the model part of this beginning at sta...
virtual ~QPSumModelBlock()
virtual destructor
CH_Matrix_Classes::Matrix Bt
if the matrix of the bundle information has to be formed at least once, it is then stored here for la...
Definition: QPModelBlock.hxx:56
virtual int add_Schur_rhs(CH_Matrix_Classes::Matrix &glob_rhs, CH_Matrix_Classes::Matrix *local_rhs, CH_Matrix_Classes::Real rhsmu, CH_Matrix_Classes::Real rhscorr, CH_Matrix_Classes::Integer startindex_constraints, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
add the contributions to glob_rhs of the Schur complemented model block, and return local_rhs of the ...
virtual int recursive_copy_data_of(QPModelBlockObject *)
sofar this is only needed for some comparative evaluations
virtual int get_mu_info(CH_Matrix_Classes::Integer &mudim, CH_Matrix_Classes::Real &tr_xz, CH_Matrix_Classes::Real &tr_xdzpdxz, CH_Matrix_Classes::Real &tr_dxdz, CH_Matrix_Classes::Real &min_xz, CH_Matrix_Classes::Real &max_xz) const
add dimensions of the primal-dual pairs to mudim and add the "trace" (the inner product with center) ...
virtual CH_Matrix_Classes::Integer dim_constraints()
returns the dimension of the system describing the model set (may contain further constraints) ...
virtual int linesearch(CH_Matrix_Classes::Real &alpha) const
if necessary, reduce alpha to the biggest value so that feasibility is maintained with this step size...
virtual CH_Matrix_Classes::Real constraints_cost(void)
returns the dual upper bound to the model value (the trace weighted sum of the dual trace variables);...
virtual int get_nbh_info(CH_Matrix_Classes::Integer mudim, CH_Matrix_Classes::Real tr_xz, CH_Matrix_Classes::Real tr_xdzpdxz, CH_Matrix_Classes::Real tr_dxdz, CH_Matrix_Classes::Real nbh_ubnd, CH_Matrix_Classes::Real &alpha, CH_Matrix_Classes::Real &max_nbh, CH_Matrix_Classes::Real &nrmsqr_xz, CH_Matrix_Classes::Real &nrmsqr_xdzpdxz, CH_Matrix_Classes::Real &nrmsqr_dxdz, CH_Matrix_Classes::Real &ip_xz_xdzpdxz, CH_Matrix_Classes::Real &ip_xz_dxdz, CH_Matrix_Classes::Real &ip_dxdz_xdzpdxz) const
for limiting the stepsize with respect to the neighborhood this information about norms and inner pro...
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual CH_Matrix_Classes::Integer dim_model()
returns the dimension of the model set (here the same as the bundle size)
virtual QPModelBlockObject * clone()
return a cloned object on the heap
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
virtual int get_modelx(CH_Matrix_Classes::Matrix &modelx, CH_Matrix_Classes::Integer startindex_model)
set the local modelx value in modelx beginning with startindex (initialize it, do not add) ...
virtual CH_Matrix_Classes::Symmatrix & add_BDBt(const CH_Matrix_Classes::Matrix &diagvec, CH_Matrix_Classes::Symmatrix &bigS, bool minus, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Matrix &Bt, CH_Matrix_Classes::Integer startindex_model, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
add the main diagonal block tranpose(projection)*diagvec*projection to bigS starting at startindex ...
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
abstract interface for model blocks in the constrained QPSolver
Definition: QPModelBlockObject.hxx:89
virtual int computed_step(const CH_Matrix_Classes::Matrix &modelxstep, CH_Matrix_Classes::Integer startindex_model, const CH_Matrix_Classes::Matrix &modelconstrstep, CH_Matrix_Classes::Integer startindex_constr)
store this computed step locally and compute the missing local dual step information ...
QPSumModelBlock(CBout *cb=0, int cbincr=-1)
default constructor
abstract interface extension of QPModelDataObject for use in SumModel where several blocks are concat...
Definition: QPModelDataObject.hxx:105
Header declaring the classes ConicBundle::QPModelBlock, ConicBundle::QPModelPointer.
virtual CH_Matrix_Classes::Matrix & get_sysviol_constraints()
get the constraint violation for the current system solution
virtual int propose_BCSchur_pcsubspace(CH_Matrix_Classes::Matrix &lowrank, CH_Matrix_Classes::Matrix &sigma_guess, const CH_Matrix_Classes::Matrix &Diag_inv, CH_Matrix_Classes::Real minval, CH_Matrix_Classes::Real diaginvval, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
append to lowrank "large" columns that should serve well for generating a low rank projection of the ...
CH_Matrix_Classes::Integer constrdim
the joint number of constraints within the models, this may change after any change of the point ...
Definition: QPSumModelBlock.hxx:42
virtual int get_sysviol_model(CH_Matrix_Classes::Matrix &modelvec, CH_Matrix_Classes::Integer startindex_model, const CH_Matrix_Classes::Matrix &dy, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
set the model violation for the current system solution
virtual int add_localsys(CH_Matrix_Classes::Symmatrix &globalsys, CH_Matrix_Classes::Integer startindex_model, CH_Matrix_Classes::Integer startindex_constraints)
add the "scaled" minorant outer products to globalsys,
std::vector< MinorantBundle > bundle
the minorants forming the cutting model(s); how to combine them within the model(s) comprised in *thi...
Definition: QPModelBlock.hxx:53
implements a (virtual) cutting model being built of a (possibly recursive) sum of QPModelBlock cuttin...
Definition: QPSumModelBlock.hxx:35
int append(QPModelDataObject *inblock)
add another model at the end of the list
CH_Matrix_Classes::Matrix modelx
the current vector of model variables of all models comprised in *this
Definition: QPModelBlock.hxx:55
virtual int add_localrhs(CH_Matrix_Classes::Matrix &globalrhs, CH_Matrix_Classes::Real rhsmu, CH_Matrix_Classes::Real rhscorr, CH_Matrix_Classes::Integer startindex_model, CH_Matrix_Classes::Integer startindex_constraints, bool append, MinorantBundle &bundle, CH_Matrix_Classes::Integer startindex_bundel)
If mu is not zero, always add the centering term for this mu as well, if append is false...