ConicBundle
QPConeModelBlock.hxx
Go to the documentation of this file.
1 
2 #ifndef CONICBUNDLE_QPCONEMODELBLOCK_HXX
3 #define CONICBUNDLE_QPCONEMODELBLOCK_HXX
4 
13 #include "QPModelBlock.hxx"
14 #include "NNCIPBundleBlock.hxx"
15 #include "SOCIPBundleBlock.hxx"
16 #include "PSCIPBundleBlock.hxx"
17 #include "BoxIPBundleBlock.hxx"
18 
19 namespace ConicBundle {
20 
21 
26 
58 {
59 private:
60  //data that stays constant after init
64  bool use_trace;
65 
66  //values related to the barrier parameter
70 
71  // primal-dual variables for the trace constraint
76 
79 
82 
83  // data that stays fixed as long as the working point is not changed
86 
87  // data that records the rhs used depending on predictor/corrector settings
93 
94  // basic interior point blocks for the cones
96  std::vector<SOCIPBundleBlock*> socblock;
97  std::vector<PSCIPBundleBlock*> pscblock;
99 
100  std::vector<InteriorPointBundleBlock*> block;
101 
103 
104 
107 
109  void modelx_changed();
110 
111 public:
112 
119  int Btrans,
120  int Atrans,
121  CH_Matrix_Classes::Integer startindex_model,
122  MinorantBundle& globalbundle,
123  CH_Matrix_Classes::Integer startindex_bundle);
124 
131  int Atrans,
132  int Btrans,
133  CH_Matrix_Classes::Integer startindex_model,
134  MinorantBundle& globalbundle,
135  CH_Matrix_Classes::Integer startindex_bundle);
136 
139  add_BDBt(const CH_Matrix_Classes::Matrix& diagvec,
141  bool minus,
142  CH_Matrix_Classes::Integer startindex,
144  CH_Matrix_Classes::Integer startindex_model,
145  MinorantBundle& globalbundle,
146  CH_Matrix_Classes::Integer startindex_bundle);
147 
151  CH_Matrix_Classes::Integer startindex_model,
152  MinorantBundle& global_bundle,
153  CH_Matrix_Classes::Integer startindex_bundle);
154 
157  CH_Matrix_Classes::Integer startindex_model);
158 
161  CH_Matrix_Classes::Integer startindex_model);
162 
165  CH_Matrix_Classes::Integer startindex_constraints);
166 
170  MinorantBundle& global_bundle,
171  CH_Matrix_Classes::Integer startindex_bundle);
172 
174  virtual int get_sysviol_model(CH_Matrix_Classes::Matrix& modelvec,
175  CH_Matrix_Classes::Integer startindex_model,
176  const CH_Matrix_Classes::Matrix& y_plus_dy,
177  MinorantBundle& global_bundle,
178  CH_Matrix_Classes::Integer startindex_bundle);
179 
181  virtual int get_sysviol_constraints(CH_Matrix_Classes::Matrix& constrvec,
182  CH_Matrix_Classes::Integer startindex_constr);
183 
184  virtual void display_model_values(const CH_Matrix_Classes::Matrix& y,
185  MinorantBundle& global_bundle,
186  CH_Matrix_Classes::Integer startindex_bundle,
187  std::ostream& out);
188 
189  // bundlevalues holds the negative evaluation of the bundle for the current y
190  virtual int reset_starting_point(const CH_Matrix_Classes::Matrix& y,
192  MinorantBundle& global_bundle,
193  CH_Matrix_Classes::Integer startindex_bundle);
194 
196  virtual int compute_step(const CH_Matrix_Classes::Matrix& ystep,
197  MinorantBundle& global_bundle,
198  CH_Matrix_Classes::Integer startindex_bundle);
199 
201  virtual int computed_step(const CH_Matrix_Classes::Matrix& modelxstep,
202  CH_Matrix_Classes::Integer startindex_model,
203  const CH_Matrix_Classes::Matrix& modelconstrstep,
204  CH_Matrix_Classes::Integer startindex_constr);
205 
207  virtual int do_step(CH_Matrix_Classes::Real alpha,
208  const CH_Matrix_Classes::Matrix& y,
209  MinorantBundle& global_bundle,
210  CH_Matrix_Classes::Integer startindex_bundle);
211 
213  virtual int add_localrhs(CH_Matrix_Classes::Matrix& globalrhs,
215  CH_Matrix_Classes::Real rhscorr,
216  CH_Matrix_Classes::Integer startindex_model,
217  CH_Matrix_Classes::Integer startindex_constraints,
218  bool append,
220  CH_Matrix_Classes::Integer startindex_bundel);
221 
223  virtual int add_BtinvsysB(CH_Matrix_Classes::Symmatrix& globalsys,
225  CH_Matrix_Classes::Integer startindex_bundle);
226 
229  virtual int solve_constrsys(const CH_Matrix_Classes::Symmatrix& ABchol,
230  const CH_Matrix_Classes::Matrix& LinvABrhs,
231  CH_Matrix_Classes::Matrix& LinvABsol,
232  CH_Matrix_Classes::Integer startindex_model,
233  CH_Matrix_Classes::Matrix& Crhs_and_sol,
234  CH_Matrix_Classes::Integer startindex_constraints);
235 
236 
237 
238 public:
240  void clear();
241 
243  QPConeModelBlock(CBout* cb=0,int cbinc=-1);
244 
246  virtual ~QPConeModelBlock();
247 
249  virtual QPModelBlockObject* clone();
250 
252  virtual void recursive_delete_and_clear();
253 
256 
257  //------------ QPModelBlockObject routines
258 
261  const MinorantBundle& bundle,
263  const CH_Matrix_Classes::Indexmatrix& soc_dim,
264  const CH_Matrix_Classes::Indexmatrix& psc_dim,
265  const CH_Matrix_Classes::Matrix& box_lb,
266  const CH_Matrix_Classes::Matrix& box_ub,
268  FunctionTask ft,
269  QPModelOracleDataObject* oracle_data=0,
270  bool scale_box=true);
271 
274 
275 
278 
281 
284  CH_Matrix_Classes::Matrix* nncx_activity=0,
285  bool cautious=false);
286 
290  CH_Matrix_Classes::Real* socx_activity,
291  bool cautious=false);
292 
295  CH_Matrix_Classes::Matrix& pscx_eigs,
296  CH_Matrix_Classes::Matrix& pscx_vecs,
297  CH_Matrix_Classes::Real& pscx_growthrate,
298  CH_Matrix_Classes::Matrix& pscx_primalgrowth,
299  CH_Matrix_Classes::Matrix& pscx_dualgrowth);
300 
303  CH_Matrix_Classes::Matrix* linx_activity=0,
304  bool cautious=false);
305 
308 
309 
310  //----------- QPBlock routines
311 
314 
317 
320 
323 
326 
328  virtual int get_mu_info(CH_Matrix_Classes::Integer& mudim,
330  CH_Matrix_Classes::Real& tr_xdzpdxz,
331  CH_Matrix_Classes::Real& tr_dxdz,
332  CH_Matrix_Classes::Real& min_xz,
333  CH_Matrix_Classes::Real& max_xz) const;
334 
336  virtual int get_nbh_info(CH_Matrix_Classes::Integer mudim,
338  CH_Matrix_Classes::Real tr_xdzpdxz,
339  CH_Matrix_Classes::Real tr_dxdz,
340  CH_Matrix_Classes::Real nbh_ubnd,
342  CH_Matrix_Classes::Real& max_nbh,
343  CH_Matrix_Classes::Real& nrmsqr_xz,
344  CH_Matrix_Classes::Real& nrmsqr_xdzpdxz,
345  CH_Matrix_Classes::Real& nrmsqr_dxdz,
346  CH_Matrix_Classes::Real& ip_xz_xdzpdxz,
347  CH_Matrix_Classes::Real& ip_xz_dxdz,
348  CH_Matrix_Classes::Real& ip_dxdz_xdzpdxz) const;
349 
351  virtual int linesearch(CH_Matrix_Classes::Real& alpha) const;
352 
354  virtual int add_localsys(CH_Matrix_Classes::Symmatrix& globalsys,
355  CH_Matrix_Classes::Integer startindex_model,
356  CH_Matrix_Classes::Integer startindex_constraints);
357 
359  virtual int localsys_mult(const CH_Matrix_Classes::Matrix& in_vec,
360  CH_Matrix_Classes::Matrix& out_vec,
361  CH_Matrix_Classes::Integer startindex_model,
362  CH_Matrix_Classes::Integer startindex_constraints);
363 
366  virtual int add_BCSchur_diagonal(CH_Matrix_Classes::Matrix& diagonal,
367  MinorantBundle& globalbundle,
368  CH_Matrix_Classes::Integer startindex_bundle);
369 
376  CH_Matrix_Classes::Matrix& sigma_guess,
377  const CH_Matrix_Classes::Matrix& Diag_inv,
379  CH_Matrix_Classes::Real diaginvval,
380  MinorantBundle& globalbundle,
381  CH_Matrix_Classes::Integer startindex_bundle);
382 
386  virtual int prepare_BCSchur_JLprecond(CH_Matrix_Classes::Matrix& glob_lowrank,
387  CH_Matrix_Classes::Matrix& subspace,
388  bool append_globtransp_times_mat_to_subspace,
389  MinorantBundle& globalbundle,
390  CH_Matrix_Classes::Integer startindex_bundle);
391 
392 
394  virtual int add_Schur_rhs(CH_Matrix_Classes::Matrix& glob_rhs,
395  CH_Matrix_Classes::Matrix* local_rhs,
397  CH_Matrix_Classes::Real rhscorr,
398  CH_Matrix_Classes::Integer startindex_constraints,
399  MinorantBundle& globalbundle,
400  CH_Matrix_Classes::Integer startindex_bundle);
401 
403  virtual int add_Schur_mult(const CH_Matrix_Classes::Matrix& in_vec,
404  CH_Matrix_Classes::Matrix& out_vec,
405  const CH_Matrix_Classes::Matrix* in_cvec,
406  CH_Matrix_Classes::Matrix* out_cvec,
407  CH_Matrix_Classes::Integer startindex_constraints,
408  MinorantBundle& globalbundle,
409  CH_Matrix_Classes::Integer startindex_bundle);
410 
412  virtual int computed_Schur_step(const CH_Matrix_Classes::Matrix& xstep,
413  const CH_Matrix_Classes::Matrix& local_step,
414  CH_Matrix_Classes::Integer startindex_model,
415  MinorantBundle& globalbundle,
416  CH_Matrix_Classes::Integer startindex_bundle);
417 
419  void set_cbout(const CBout* cb, int incr=-1)
420  {
421  CBout::set_cbout(cb,incr);
422  for(unsigned int i=0;i<block.size();i++)
423  block[i]->set_cbout(this);
424  }
425 
426 
427 
428 };
429 
430 
432 
433 }
434 
435 #endif
436 
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) ...
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
virtual int get_sysviol_model(CH_Matrix_Classes::Matrix &modelvec, CH_Matrix_Classes::Integer startindex_model, const CH_Matrix_Classes::Matrix &y_plus_dy, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
set the model violation for the current system solution
CH_Matrix_Classes::Matrix Btsysinv_trace
gets transpose(B)*sysinv_trce, only formed when needed
Definition: QPConeModelBlock.hxx:91
virtual int recursive_copy_data_of(QPModelBlockObject *)
sofar this is only needed for some comparative evaluations; to work *this must be a clone of the the ...
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...
Header declaring the class ConicBundle::PSCIPBundleBlock.
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...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
CH_Matrix_Classes::Real tracedual(CH_Matrix_Classes::Real *prec=0) const
return the value of the dual variable to the trace consrat == support function value ...
CH_Matrix_Classes::Real schur_trace
gets ip(trace_vec,sysinv_trace)[+slack/dual]>0!, only formed when needed, otherwise -1...
Definition: QPConeModelBlock.hxx:92
virtual CH_Matrix_Classes::Integer dim_model()
returns the dimension of the model set (here the same as the bundle size)
CH_Matrix_Classes::Matrix sysrhs_model
KKT system right hand side computed for the model.
Definition: QPConeModelBlock.hxx:88
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 minorants start at the given...
CH_Matrix_Classes::Matrix modeldcstr
only for testing
Definition: QPModelBlock.hxx:58
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 CH_Matrix_Classes::Real constraints_cost()
returns the dual upper bound to the model value (the trace weighted sum of the dual trace variables);...
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)
use the computed step information to also compute the steps of the complemented parts ...
CH_Matrix_Classes::Real get_trace()
get the right hand side of the trace constraint
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
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) ...
abstract base class for passing additional oracle information to the QP
Definition: QPModelDataObject.hxx:134
virtual ~QPConeModelBlock()
virtual destructor
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...
Header declaring the class ConicBundle::BoxIPBundleBlock.
combines and provides basic functionalities of QPModelDataObject and QPModelBlockObject, but is still abstract
Definition: QPModelBlock.hxx:47
FunctionTask ft
role of the coupling constraint (equality constraint for ObjectiveFunction, otherwise inequality cons...
Definition: QPConeModelBlock.hxx:63
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...
abstract interface extension of QPModelDataObject to allow uniform generation of tuned quadratic solv...
Definition: QPModelDataObject.hxx:144
CH_Matrix_Classes::Real complrhs_trace
stores the complementarity value determined in computing the right hand side value ...
Definition: QPConeModelBlock.hxx:81
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 (with offsets but without constant affine term) to the arguments ...
Header declaring the class ConicBundle::SOCIPBundleBlock.
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
int get_socx(CH_Matrix_Classes::Integer i, CH_Matrix_Classes::Matrix &socx, CH_Matrix_Classes::Real *socx_activity, bool cautious=false)
get the SOC part of modelx (and a guess whether the entire cone is active
QPConeModelBlock(CBout *cb=0, int cbinc=-1)
default constructor
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
CH_Matrix_Classes::Real sys_trace
trace_slack/trace_dual + possibly a box contribution, initialized if >0.
Definition: QPConeModelBlock.hxx:80
virtual int add_localsys(CH_Matrix_Classes::Symmatrix &globalsys, CH_Matrix_Classes::Integer startindex_model, CH_Matrix_Classes::Integer startindex_constraints)
add the local system for the model at startindex, the local for the constraints at startindex_constra...
CH_Matrix_Classes::Matrix sysinv_trace
gets apply_xizinv(trace_vec), only formed when needed
Definition: QPConeModelBlock.hxx:90
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
QPBundleBlock interface for the interior point routines specific to the primal dual complementarity c...
Definition: BoxIPBundleBlock.hxx:26
void clear()
reset to "empty/no" model
CH_Matrix_Classes::Real trace_slack
value of the slack variable to the trace constraint if this is an inequality
Definition: QPConeModelBlock.hxx:74
std::vector< InteriorPointBundleBlock * > block
all active blocks lined up for easier loop design
Definition: QPConeModelBlock.hxx:100
implements a QPModelBlock for conic cutting models in QPSolver
Definition: QPConeModelBlock.hxx:57
std::vector< PSCIPBundleBlock * > pscblock
the PSC blocks of the model
Definition: QPConeModelBlock.hxx:97
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
bool use_trace
true iff the trace constraint is used at all
Definition: QPConeModelBlock.hxx:64
int get_pscx(CH_Matrix_Classes::Integer i, CH_Matrix_Classes::Matrix &pscx_eigs, CH_Matrix_Classes::Matrix &pscx_vecs, CH_Matrix_Classes::Real &pscx_growthrate, CH_Matrix_Classes::Matrix &pscx_primalgrowth, CH_Matrix_Classes::Matrix &pscx_dualgrowth)
get the PSC part of modelx (and a guess on the rank of the active part)
CH_Matrix_Classes::Integer mu_dim
combined size of the interioer point cone dimension relevant for computing the barrier parameter ...
Definition: QPConeModelBlock.hxx:62
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::Real last_rhs_mu
the last mu used in rhs computations
Definition: QPConeModelBlock.hxx:67
CH_Matrix_Classes::Real trace_delta_dual
step of the trace dual variable
Definition: QPConeModelBlock.hxx:78
virtual CH_Matrix_Classes::Real primalviol_2normsqr()
return squared Euclidean norm of constraint violation of modelx
int get_nncx(CH_Matrix_Classes::Matrix &nncx, CH_Matrix_Classes::Matrix *nncx_activity=0, bool cautious=false)
get the linear part of modelx (and a guess, which of them are active, in {0.,1.}) ...
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 ...
void modelx_changed()
whenever modelx is (going to be) changed, the information collected for the oblivious modelx is reset...
CH_Matrix_Classes::Matrix trace_vec
coefficnet vector of the trace constraint, stays constant unless box takes part in scaling; ...
Definition: QPConeModelBlock.hxx:72
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...
NNCIPBundleBlock * nncblock
if not NULL it points to the NNC cone of the model
Definition: QPConeModelBlock.hxx:95
CH_Matrix_Classes::Real trace_dual
dual variable to the trace constraint
Definition: QPConeModelBlock.hxx:75
CH_Matrix_Classes::Real evaluate_trace() const
evaluate the left hand side of the trace constraint for modelx
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
void set_cbout(const CBout *cb, int incr=-1)
output settings
Definition: QPConeModelBlock.hxx:419
CH_Matrix_Classes::Integer modeldim
combined size of the model variables
Definition: QPConeModelBlock.hxx:61
std::vector< SOCIPBundleBlock * > socblock
the SOC blocks of the model
Definition: QPConeModelBlock.hxx:96
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 ...
Matrix class for real values of type Real
Definition: matrix.hxx:74
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&#39; of minus the blocks A and B (contraints on design variables and ...
CH_Matrix_Classes::Real trace_delta_slack
step of the trace slack
Definition: QPConeModelBlock.hxx:77
CH_Matrix_Classes::Real sysrhs_trace
KKT system right hand side computed for the trace constraint.
Definition: QPConeModelBlock.hxx:89
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
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...
FunctionTask
Each function represented by a FunctionModel is equipped with a function_factor (it defaults to 1...
Definition: CBSolver.hxx:221
CH_Matrix_Classes::Real trace_rhs
right hand side value of the trace constraint
Definition: QPConeModelBlock.hxx:73
interior point variables and routines specific to primal dual complementarity conditions of a nonnega...
Definition: NNCIPBundleBlock.hxx:28
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
virtual void display_model_values(const CH_Matrix_Classes::Matrix &y, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle, std::ostream &out)
for test outputs
QPModelOracleDataObject * oracle_data
the pointer to the oracle_data, if given on init
Definition: QPConeModelBlock.hxx:102
Header declaring the class ConicBundle::NNCIPBundleBlock.
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...
abstract interface for model blocks in the constrained QPSolver
Definition: QPModelBlockObject.hxx:89
CH_Matrix_Classes::Real diff_trace
sum of traces - trace_rhs (should be == -trace_slack)
Definition: QPConeModelBlock.hxx:85
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
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 the current y
int init(const MinorantPointer &constant_minorant, const MinorantBundle &bundle, CH_Matrix_Classes::Integer nnc_dim, const CH_Matrix_Classes::Indexmatrix &soc_dim, const CH_Matrix_Classes::Indexmatrix &psc_dim, const CH_Matrix_Classes::Matrix &box_lb, const CH_Matrix_Classes::Matrix &box_ub, CH_Matrix_Classes::Real b, FunctionTask ft, QPModelOracleDataObject *oracle_data=0, bool scale_box=true)
sets up the model with bundle information and how to combine it, see QPConeModelDataObject::init() fo...
CH_Matrix_Classes::Matrix diff_model
trace_dual*trace_vec - bundlevalues (should be == z)
Definition: QPConeModelBlock.hxx:84
virtual CH_Matrix_Classes::Real dualviol_2normsqr()
return the squared Euclidean norm of the model violation
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 ...
virtual QPModelBlockObject * clone()
return a cloned object on the heap
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 void recursive_delete_and_clear()
usually the objects of the recursive block structure and not deleted in a clear. If needed...
CH_Matrix_Classes::Real mu
in a step mu gets the value of last_rhs_mu
Definition: QPConeModelBlock.hxx:68
BoxIPBundleBlock * boxblock
the box block of the model
Definition: QPConeModelBlock.hxx:98
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...
int get_boxx(CH_Matrix_Classes::Matrix &boxx, CH_Matrix_Classes::Matrix *linx_activity=0, bool cautious=false)
get the box part of modelx (and a guess, which of the bounds are active, in {0.,1.})
virtual CH_Matrix_Classes::Integer dim_constraints()
returns the dimension of the system describing the model set (may contain further constraints) ...
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
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) ...
int adjust_trace(CH_Matrix_Classes::Real b)
change the right hand side of the trace constraint to b
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...
CH_Matrix_Classes::Real old_mu
in a step old_mu gets the value of mu before this gets last_rhs_mu
Definition: QPConeModelBlock.hxx:69
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
std::vector< MinorantPointer > constant_minorant
constant offset minorant (fixed affine function to be added to the model); each aft creates a new one...
Definition: QPModelBlock.hxx:51
CH_Matrix_Classes::Matrix modelx
the current vector of model variables of all models comprised in *this
Definition: QPModelBlock.hxx:55
virtual void set_cbout(const CBout *cb, int incr=-1)
Specifies the output level relative to the given CBout class.
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...