ConicBundle
BoxIPBundleBlock.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_BOXIPBUNDLEBLOCK_HXX
4 #define CONICBUNDLE_BOXIPBUNDLEBLOCK_HXX
5 
14 
15 namespace ConicBundle {
16 
21 
27 {
28 protected:
33  bool use_scaling;
35 
42 
49 
58 
64 
68 
70 
77 
81 
84 
86 
88 
91  CH_Matrix_Classes::Real trace_bound,
92  bool cautious) const;
93 
95  void point_changed();
96 
98  int compute_NTscaling(void);
99 
101  int given_dx_compute_dz(void);
102 
103 public:
105  void clear(const CH_Matrix_Classes::Matrix& lb,
106  const CH_Matrix_Classes::Matrix& ub,
107  bool use_scaling,
108  CH_Matrix_Classes::Real scalub);
109 
112  const CH_Matrix_Classes::Matrix& ub,
113  bool use_scaling=false,
114  CH_Matrix_Classes::Real scalub=-1.,
115  CBout* cb=0,int cbinc=-1);
116 
117  ~BoxIPBundleBlock();
118 
120  virtual InteriorPointBundleBlock* clone();
121 
123  virtual int copy_from(InteriorPointBundleBlock*);
124 
126  virtual CH_Matrix_Classes::Integer get_vecdim() const;
127 
129  virtual int center_x(CH_Matrix_Classes::Real val,bool add=false);
130 
132  virtual int center_z(CH_Matrix_Classes::Real val,bool add=false);
133 
135  virtual int set_x(const CH_Matrix_Classes::Matrix& vec,CH_Matrix_Classes::Integer startindex,CH_Matrix_Classes::Real& add_center_value);
136 
138  virtual int set_z(const CH_Matrix_Classes::Matrix& vec,CH_Matrix_Classes::Integer startindex,CH_Matrix_Classes::Real& add_center_value);
139 
141  virtual int vecgetsax(CH_Matrix_Classes::Matrix& vec,
142  CH_Matrix_Classes::Integer startindex,
144  bool add=false);
145 
147  virtual int vecgetsaz(CH_Matrix_Classes::Matrix& vec,
148  CH_Matrix_Classes::Integer startindex,
150  bool add=false);
151 
153  virtual int get_mu_info(CH_Matrix_Classes::Integer& mudim,
155  CH_Matrix_Classes::Real& tr_xdzpdxz,
156  CH_Matrix_Classes::Real& tr_dxdz,
157  CH_Matrix_Classes::Real& min_xz,
158  CH_Matrix_Classes::Real& max_xz) const;
159 
161  virtual int get_nbh_info(CH_Matrix_Classes::Integer mudim,
163  CH_Matrix_Classes::Real tr_xdzpdxz,
164  CH_Matrix_Classes::Real tr_dxdz,
165  CH_Matrix_Classes::Real nbh_ubnd,
167  CH_Matrix_Classes::Real& max_nbh,
168  CH_Matrix_Classes::Real& nrmsqr_xz,
169  CH_Matrix_Classes::Real& nrmsqr_xdzpdxz,
170  CH_Matrix_Classes::Real& nrmsqr_dxdz,
171  CH_Matrix_Classes::Real& ip_xz_xdzpdxz,
172  CH_Matrix_Classes::Real& ip_xz_dxdz,
173  CH_Matrix_Classes::Real& ip_dxdz_xdzpdxz) const;
174 
176  virtual int linesearch(CH_Matrix_Classes::Real& alpha) const;
177 
179  virtual int add_muxinv(CH_Matrix_Classes::Matrix& rhs,
180  CH_Matrix_Classes::Integer startindex,
182  CH_Matrix_Classes::Real rhscorr,
183  bool minus=false);
184 
185 
187  virtual int set_dx(const CH_Matrix_Classes::Matrix& rhs,CH_Matrix_Classes::Integer startindex);
188 
191 
193  virtual int apply_xizinv(CH_Matrix_Classes::Matrix& rhs,
194  CH_Matrix_Classes::Integer startindex,
195  bool minus=false);
196 
198  virtual int apply_xiz(CH_Matrix_Classes::Matrix& rhs,
199  CH_Matrix_Classes::Integer startindex,
200  bool minus=false);
201 
203  virtual int do_step(CH_Matrix_Classes::Real alpha);
204 
206  virtual int add_AxizinvAt(const CH_Matrix_Classes::Matrix& A,
207  CH_Matrix_Classes::Symmatrix& globalsys,
208  bool minus=false,
209  bool Atrans=false);
210 
212  virtual int add_xiz(CH_Matrix_Classes::Symmatrix& globalsys,CH_Matrix_Classes::Integer startindex,bool minus=false);
213 
214 
215 
216  //---------------------- mainly for testing
217 
220  {
221  CH_Matrix_Classes::mat_xey(vecdim,vecx.get_store()+startindex,x.get_store());
222  if (use_scaling)
223  vecx(startindex+vecdim)=s;
224  return 0; }
225 
228  {
229  CH_Matrix_Classes::mat_xey(vecdim,vecz.get_store()+startindex,lz.get_store());
230  CH_Matrix_Classes::mat_xmey(vecdim,vecz.get_store()+startindex,uz.get_store());
231  if (use_scaling)
232  vecz(startindex+vecdim)=lt-(scalub>0.?ut:0.);
233  return 0;
234  }
235 
238  {
239  if (dx.dim()!=vecdim)
240  return 1;
241  CH_Matrix_Classes::mat_xey(vecdim,vecdx.get_store()+startindex,dx.get_store());
242  if (use_scaling)
243  vecdx(startindex+vecdim)=ds;
244  return 0;
245  }
246 
247 
250  {
251  if (dlz.dim()!=vecdim)
252  return 1;
253  CH_Matrix_Classes::mat_xey(vecdim,vecdz.get_store()+startindex,dlz.get_store());
254  CH_Matrix_Classes::mat_xmey(vecdim,vecdz.get_store()+startindex,duz.get_store());
255  if (use_scaling)
256  vecdz(startindex+vecdim)=dlt-(scalub>0.?dut:0.);
257  return 0;
258  }
259 
261  {return bundle_dim;}
262 
264 
267 
269 
271  virtual int add_trace(CH_Matrix_Classes::Matrix& vec,
273  CH_Matrix_Classes::Integer startindex);
274 
277  CH_Matrix_Classes::Integer startindex);
278 
279  // after the bundle subproblem is solved, this retrieves the local linear solution vector; if linx_activity is set, the values between zero and one indicate the guess on the coefficients activity level
280  // virtual int get_linx(CH_Matrix_Classes::Matrix& linx,
281  // CH_Matrix_Classes::Matrix* linx_activity=0) const;
282 
289  int Btrans,
290  int Atrans,
291  CH_Matrix_Classes::Integer startindex_model,
292  MinorantBundle& globalbundle,
293  CH_Matrix_Classes::Integer startindex_bundle);
294 
301  int Atrans,
302  int Btrans,
303  CH_Matrix_Classes::Integer startindex_model,
304  MinorantBundle& globalbundle,
305  CH_Matrix_Classes::Integer startindex_bundle);
306 
309  add_BDBt(const CH_Matrix_Classes::Matrix& diagvec,
311  bool minus,
312  CH_Matrix_Classes::Integer startindex,
314  CH_Matrix_Classes::Integer startindex_model,
315  MinorantBundle& globalbundle,
316  CH_Matrix_Classes::Integer startindex_bundle);
317 
321  CH_Matrix_Classes::Integer startindex_model,
322  MinorantBundle& global_bundle,
323  CH_Matrix_Classes::Integer startindex_bundle);
324 
328  MinorantBundle& global_bundle,
329  CH_Matrix_Classes::Integer startindex_bundle);
330 
332  virtual int get_sysviol_model(CH_Matrix_Classes::Matrix& sysviol_model,
333  CH_Matrix_Classes::Integer startindex_model,
334  const CH_Matrix_Classes::Matrix& dy,
335  const CH_Matrix_Classes::Real deltatrdual,
336  MinorantBundle& global_bundle,
337  CH_Matrix_Classes::Integer startindex_bundle);
338 
340  virtual int set_bundle_z(const CH_Matrix_Classes::Matrix& y,
341  MinorantBundle& global_bundle,
342  CH_Matrix_Classes::Integer startindex_bundle,
343  CH_Matrix_Classes::Real& add_center_value);
344 
346  virtual int add_trace_to_diff_model(CH_Matrix_Classes::Real trace_dual);
347 
350 
352  virtual int do_bundle_step(CH_Matrix_Classes::Real alpha,
353  const CH_Matrix_Classes::Matrix& y,
354  MinorantBundle& globalbundle,
355  CH_Matrix_Classes::Integer startindex_bundle,
356  CH_Matrix_Classes::Real tracedual,
357  CH_Matrix_Classes::Real trace_rhs);
358 
360  virtual int set_modelrhs(CH_Matrix_Classes::Matrix& globalrhs,
362  CH_Matrix_Classes::Real rhscorr,
363  CH_Matrix_Classes::Integer startindex_model);
364 
366  virtual int add_BtinvsysB(CH_Matrix_Classes::Symmatrix& globalsys,
367  const MinorantBundle& bundle,
368  CH_Matrix_Classes::Integer startindex_bundle) ;
369 
388  MinorantBundle& globalbundle,
389  CH_Matrix_Classes::Integer startindex_bundle,
390  CH_Matrix_Classes::Matrix& trafotrace,
391  CH_Matrix_Classes::Integer startindex_trace);
392 
417  CH_Matrix_Classes::Matrix& ipBtrvec,
418  MinorantBundle& globalbundle,
419  CH_Matrix_Classes::Integer startindex_bundle,
420  const CH_Matrix_Classes::Matrix& trafotrace,
421  CH_Matrix_Classes::Integer startindex_trace);
422 
423 
441  virtual int add_pcsubspace(CH_Matrix_Classes::Matrix& lowrank,
442  CH_Matrix_Classes::Matrix& sigma_guess,
443  const CH_Matrix_Classes::Matrix& Diag_inv,
445  CH_Matrix_Classes::Real diaginvval,
446  CH_Matrix_Classes::Matrix & minus_trmult,
447  CH_Matrix_Classes::Real schur_trace,
448  MinorantBundle& globalbundle,
449  CH_Matrix_Classes::Integer startindex_bundle);
450 
451 
454  CH_Matrix_Classes::Matrix& subspace,
455  CH_Matrix_Classes::Integer startindex_subsspace,
456  MinorantBundle& globalbundle,
457  CH_Matrix_Classes::Integer startindex_bundle);
458 
460  virtual int add_BtinvsysB_times(const CH_Matrix_Classes::Matrix& in_vec,
461  CH_Matrix_Classes::Matrix& out_vec,
462  CH_Matrix_Classes::Real zeta_inval,
463  CH_Matrix_Classes::Real* zeta_outval,
464  MinorantBundle& globalbundle,
465  CH_Matrix_Classes::Integer startindex_bundle);
466 
468  virtual int set_dx_xizsolvestep(const CH_Matrix_Classes::Matrix& step_y,
469  const CH_Matrix_Classes::Real step_trdual,
470  MinorantBundle& globalbundle,
471  CH_Matrix_Classes::Integer startindex_bundle);
472 
473 
476  CH_Matrix_Classes::Matrix* linx_activity,
477  CH_Matrix_Classes::Real trace_rhs,
478  bool cautious) const;
479 
482  {
483  if (use_scaling){
484  if (scalub>0.) {
485  return scalub*ut;
486  }
487  else {
488  return 0.;
489  }
490  }
492  return val;
493  }
494 
495 };
496 
497 
499 
500 }
501 
502 #endif
503 
virtual int add_trace(CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Real alpha, CH_Matrix_Classes::Integer startindex)
add alpha*trace_vec to vec starting at startindex
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
void mat_xmey(Integer len, Val *x, const Val *y)
Set x[i]=-y[i] for len elements of the arrays x and y.
Definition: matop.hxx:174
CH_Matrix_Classes::Matrix oldlz
point before lz
Definition: BoxIPBundleBlock.hxx:73
virtual int add_AxizinvAt(const CH_Matrix_Classes::Matrix &A, CH_Matrix_Classes::Symmatrix &globalsys, bool minus=false, bool Atrans=false)
add the Schur complement to a big system matrix
CH_Matrix_Classes::Matrix uz
"dual" point uz for upper bound >=0
Definition: BoxIPBundleBlock.hxx:38
CH_Matrix_Classes::Real compl_utrhs
rhs usd in solving the complementartiy line for t
Definition: BoxIPBundleBlock.hxx:62
virtual int get_vecdx(CH_Matrix_Classes::Matrix &vecdx, CH_Matrix_Classes::Integer startindex)
return the vector form of dx, 1 if not available
Definition: BoxIPBundleBlock.hxx:237
int Schur_transform_bundle(CH_Matrix_Classes::Matrix &glob_lowrank, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle, CH_Matrix_Classes::Matrix &trafotrace, CH_Matrix_Classes::Integer startindex_trace)
provides basic information for low rank preconditioning (in the extreme case solving) for the case of...
CH_Matrix_Classes::Matrix Boffset
columnvector of bundle offsets
Definition: BoxIPBundleBlock.hxx:79
CH_Matrix_Classes::Real compl_ltrhs
rhs usd in solving the complementartiy line for t
Definition: BoxIPBundleBlock.hxx:61
virtual int add_BtinvsysB(CH_Matrix_Classes::Symmatrix &globalsys, const MinorantBundle &bundle, CH_Matrix_Classes::Integer startindex_bundle)
add the "scaled" minorant outer products to globalsys, where the correct minroants start at the given...
CH_Matrix_Classes::Real ut
"dual" to scaling size <= scalval;
Definition: BoxIPBundleBlock.hxx:45
virtual int set_x(const CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Real &add_center_value)
the base description "set x to the values of vec[startindex+0,+1 ...,+(vecdim-1)] and return in add_c...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual int get_vecz(CH_Matrix_Classes::Matrix &vecz, CH_Matrix_Classes::Integer startindex)
return the vector form of z
Definition: BoxIPBundleBlock.hxx:227
CH_Matrix_Classes::Matrix lz
"dual" point lz for lower bound >=0
Definition: BoxIPBundleBlock.hxx:37
CH_Matrix_Classes::Matrix sqrBnorms
if rowdim>0 it holds the squared norm of each subgradient in the same sequence as in B ...
Definition: BoxIPBundleBlock.hxx:80
CH_Matrix_Classes::Real oldlt
point before lt
Definition: BoxIPBundleBlock.hxx:75
virtual int apply_xiz(CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Integer startindex, bool minus=false)
compute sys*rhs into rhs, possibly with a negative sign
bool use_scaling
whether scaling is to used or s=1. throughout
Definition: BoxIPBundleBlock.hxx:33
virtual int set_dx_xizsolverhs(const CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Integer startindex)
compute dx=sysinv*rhs and at the same time dz (=-rhs -z +complentarity_rhs);
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
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
void dim(Integer &_nr, Integer &_nc) const
returns the number of rows in _nr and the number of columns in _nc
Definition: matrix.hxx:209
CH_Matrix_Classes::Real mu
in a step mu gets the value of last_rhs_mu
Definition: BoxIPBundleBlock.hxx:66
CH_Matrix_Classes::Real oldut
point before ut
Definition: BoxIPBundleBlock.hxx:76
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 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) ...
int given_dx_compute_dz(void)
does what is says
virtual InteriorPointBundleBlock * clone()
returns a clone
virtual int add_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, CH_Matrix_Classes::Matrix &minus_trmult, CH_Matrix_Classes::Real schur_trace, 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 ...
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 int set_dx(const CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Integer startindex)
extract dx from rhs at startindex and compute at the same time dz (=-sys dx-z +complentarity_rhs); ...
CH_Matrix_Classes::Matrix lb
lower bounds of the box, lb < ub
Definition: BoxIPBundleBlock.hxx:31
Real * get_store()
returns the current address of the internal value array; use cautiously, do not use delete! ...
Definition: matrix.hxx:326
Matrix class of symmetric matrices with real values of type Real
Definition: symmat.hxx:43
CH_Matrix_Classes::Real hats
[ut/(scalub-s)]+lt/s+sum(lb(i)^2*lz(i)/(x(i)-s*lb) + ub(i)^2*uz(i)/(s*ub-x(i)))
Definition: BoxIPBundleBlock.hxx:53
virtual int set_dx_xizsolvestep(const CH_Matrix_Classes::Matrix &step_y, const CH_Matrix_Classes::Real step_trdual, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
compute dx (and then dz) given step_y and step_trdual on basis of the last rhs computed for the model...
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 vecgetsax(CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Real a=1., bool add=false)
on vec[startindex+0,+1 ...,+(vecdim-1)] put or add a * x into vec for a real number a ...
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 s
"primal" scaling size >=0
Definition: BoxIPBundleBlock.hxx:43
CH_Matrix_Classes::Real sys_srhs
rhs of s in the system with uz,lz,t eliminated
Definition: BoxIPBundleBlock.hxx:63
virtual int add_xiz(CH_Matrix_Classes::Symmatrix &globalsys, CH_Matrix_Classes::Integer startindex, bool minus=false)
add (or subract if minus==true) the system matrix to a big system matrix starting at startindex ...
CH_Matrix_Classes::Real lt
"dual" to scaling size >= 0
Definition: BoxIPBundleBlock.hxx:44
CH_Matrix_Classes::Matrix olduz
point before uz
Definition: BoxIPBundleBlock.hxx:74
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
CH_Matrix_Classes::Real old_mu
in a step old_mu gets the value of mu before this gets last_rhs_mu
Definition: BoxIPBundleBlock.hxx:67
CH_Matrix_Classes::Real dlt
current step for lt (for s>=0
Definition: BoxIPBundleBlock.hxx:47
CH_Matrix_Classes::Matrix x
"primal" point x, lb*s<= x <= ub*s
Definition: BoxIPBundleBlock.hxx:36
virtual int add_BtinvsysB_times(const CH_Matrix_Classes::Matrix &in_vec, CH_Matrix_Classes::Matrix &out_vec, CH_Matrix_Classes::Real zeta_inval, CH_Matrix_Classes::Real *zeta_outval, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
out_vec+=BtinvsysB*in_vec
virtual int add_muxinv(CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Real rhsmu, CH_Matrix_Classes::Real rhscorr, bool minus=false)
compute the complementarity_rhs=rhsmu*xi-rhscorr*xi*dx*dz (wihtout "-z") for mu=rhsmu and for correct...
virtual int set_xizinvsqrt_trace(CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Integer startindex)
set the trace premultiplied by sqrt(inv(xiz)) in vec[startindex+0,...,startindex+dim_bundle()-1] ...
CH_Matrix_Classes::Real last_alpha
last alpha used in do_step()
Definition: BoxIPBundleBlock.hxx:69
virtual int center_x(CH_Matrix_Classes::Real val, bool add=false)
set x to value*"one" to x, or if add==true, add value*"one" to x
virtual int do_step(CH_Matrix_Classes::Real alpha)
move to (x+alpha*dx, z+alpha*dz)
CH_Matrix_Classes::Matrix tmpmat
temporary matrix to avoid reallocatoins
Definition: BoxIPBundleBlock.hxx:83
int add_bundle_xizinvsqrt_projection(CH_Matrix_Classes::Matrix &glob_lowrank, CH_Matrix_Classes::Matrix &subspace, CH_Matrix_Classes::Integer startindex_subsspace, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle)
add bundle*sqrt(inv(xiz))*subspace to glob_lowrank with bundle(:,si_bundle+1:si_bundle+dim_bundle()-1...
virtual int get_vecx(CH_Matrix_Classes::Matrix &vecx, CH_Matrix_Classes::Integer startindex)
return the vector form of x
Definition: BoxIPBundleBlock.hxx:219
virtual int get_sysviol_model(CH_Matrix_Classes::Matrix &sysviol_model, CH_Matrix_Classes::Integer startindex_model, const CH_Matrix_Classes::Matrix &dy, const CH_Matrix_Classes::Real deltatrdual, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle)
set the model violation for the current system solution for the precomputed rhs on basis of the y and...
CH_Matrix_Classes::Matrix compl_lrhs
rhs used in solving the complementarity line for lb
Definition: BoxIPBundleBlock.hxx:59
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 int set_modelrhs(CH_Matrix_Classes::Matrix &globalrhs, CH_Matrix_Classes::Real rhsmu, CH_Matrix_Classes::Real rhscorr, CH_Matrix_Classes::Integer startindex_model)
If mu is not zero, always add the centering term for this mu as well;.
CH_Matrix_Classes::Integer bundle_dim
dimension of the bundle (in case of subspace projections this may differ from vecdim ...
Definition: InteriorPointBundleBlock.hxx:34
CH_Matrix_Classes::Matrix hatb
(lb(i)*lz(i)/(x(i)-s*lb) + ub(i)*uz(i)/(s*ub-x(i))
Definition: BoxIPBundleBlock.hxx:54
virtual int vecgetsaz(CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Real a=1., bool add=false)
on vec[startindex+0,+1 ...,+(vecdim-1)] put or add a * z into vec for a real number a ...
CH_Matrix_Classes::Real Chols
sqrt(hats-Cholb&#39;*Cholb)
Definition: BoxIPBundleBlock.hxx:56
void mat_xey(Integer len, Val *x, const Val *y)
Copy an array of length len to destination x from source y.
Definition: matop.hxx:117
virtual int add_bundle_xizinv_diagonal(CH_Matrix_Classes::Matrix &diagonal, CH_Matrix_Classes::Matrix &ipBtrvec, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle, const CH_Matrix_Classes::Matrix &trafotrace, CH_Matrix_Classes::Integer startindex_trace)
add diag(Bt*sqrt(invsys)*(I-lambda*trvec*trvec&#39;)*sqrt(invsys)*B) to diagonal
virtual int center_z(CH_Matrix_Classes::Real val, bool add=false)
set z to value*"one" to z, or if add==true, add value*"one" to z
virtual int set_z(const CH_Matrix_Classes::Matrix &vec, CH_Matrix_Classes::Integer startindex, CH_Matrix_Classes::Real &add_center_value)
set z to the values of vec[startindex+0,+1 ...,+(vecdim-1)] and add sufficient center to make z feasi...
virtual CH_Matrix_Classes::Integer dim_bundle() const
returns the number of consecutive bundle elements this cone makes use of
Definition: BoxIPBundleBlock.hxx:260
CH_Matrix_Classes::Matrix Bt
matrix representation of bundle
Definition: BoxIPBundleBlock.hxx:78
CH_Matrix_Classes::Matrix ub
upper bounds of the box, lb < ub
Definition: BoxIPBundleBlock.hxx:32
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual int add_trace_to_diff_model(CH_Matrix_Classes::Real trace_dual)
add trace_dual*trace to diff_model for the right hand side (negative of current model violation) ...
virtual CH_Matrix_Classes::Real evaluate_trace_z()
return the "trace" value of the current point
CH_Matrix_Classes::Matrix oldx
point before x
Definition: BoxIPBundleBlock.hxx:71
virtual int set_bundle_z(const CH_Matrix_Classes::Matrix &y, MinorantBundle &global_bundle, CH_Matrix_Classes::Integer startindex_bundle, CH_Matrix_Classes::Real &add_center_value)
set z to the slack of the bundle and return a value>=0 that needs to be added to make it feasible ...
CH_Matrix_Classes::Matrix uxinv
1./(s*ub-x(i))
Definition: BoxIPBundleBlock.hxx:52
CH_Matrix_Classes::Matrix lxinv
1./(x(i)-s*lb)
Definition: BoxIPBundleBlock.hxx:51
CH_Matrix_Classes::Matrix sqrt_xiz
xiz.^{.5}
Definition: BoxIPBundleBlock.hxx:55
CH_Matrix_Classes::Matrix duz
current step for uz
Definition: BoxIPBundleBlock.hxx:41
virtual int do_bundle_step(CH_Matrix_Classes::Real alpha, const CH_Matrix_Classes::Matrix &y, MinorantBundle &globalbundle, CH_Matrix_Classes::Integer startindex_bundle, CH_Matrix_Classes::Real tracedual, CH_Matrix_Classes::Real trace_rhs)
move to (x+alpha*dx, z+alpha*dz), update diff_model and possibly reduce the model size if some part i...
int get_boxx(CH_Matrix_Classes::Matrix &linx, CH_Matrix_Classes::Matrix *linx_activity, CH_Matrix_Classes::Real trace_rhs, bool cautious) const
after the bundle subproblem is solved, this retrieves the local linear solution vector; if linx_activ...
int find_inactive_indices(CH_Matrix_Classes::Indexmatrix &inactive, CH_Matrix_Classes::Real trace_bound, bool cautious) const
returns in inactive, in increasing order, the indices considered inactive (small in comparison to tra...
CH_Matrix_Classes::Real last_rhs_mu
the last mu used in rhs computations
Definition: BoxIPBundleBlock.hxx:65
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
virtual CH_Matrix_Classes::Real evaluate_trace_x()
return the "trace" value of the current point
CH_Matrix_Classes::Matrix compl_urhs
rhs used in solving the complementarity line for ub
Definition: BoxIPBundleBlock.hxx:60
CH_Matrix_Classes::Matrix Cholinvb
xiz.^{-1}.*hatb/Chols
Definition: BoxIPBundleBlock.hxx:57
virtual CH_Matrix_Classes::Real dualviol_2normsqr()
return the squared Euclidean norm of the dual model violation
CH_Matrix_Classes::Matrix dlz
current step for lz
Definition: BoxIPBundleBlock.hxx:40
CH_Matrix_Classes::Matrix xiz
lz(i)/(x(i)-s*lb) + uz(i)/(s*ub-x(i))
Definition: BoxIPBundleBlock.hxx:50
bool test_myself_call
if true, this is already called by a routine for checking a result, so don&#39;t produce infinite test lo...
Definition: BoxIPBundleBlock.hxx:87
CH_Matrix_Classes::Matrix dx
current step for x
Definition: BoxIPBundleBlock.hxx:39
void clear(const CH_Matrix_Classes::Matrix &lb, const CH_Matrix_Classes::Matrix &ub, bool use_scaling, CH_Matrix_Classes::Real scalub)
reset all point information to zero for dimension dim, the rest to zero
virtual CH_Matrix_Classes::Integer get_vecdim() const
returns the length of the varialbe vector
CH_Matrix_Classes::Real constraints_cost()
returns the dual cost of the box constraints
Definition: BoxIPBundleBlock.hxx:481
abstract interface for interior point routines specific to primal dual complementarity conditions of ...
Definition: InteriorPointBundleBlock.hxx:31
int compute_NTscaling(void)
computes the step information for the complementarity parts
void point_changed()
clear variables that are no longer valid for the current point
CH_Matrix_Classes::Indexmatrix map_to_old
currently not in use (used in failed attempt to eliminate some inactive variables on the fly) ...
Definition: BoxIPBundleBlock.hxx:85
Header declaring the class ConicBundle::InteriorPointBundleBlock.
CH_Matrix_Classes::Real ds
current step for s
Definition: BoxIPBundleBlock.hxx:46
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 get_vecdz(CH_Matrix_Classes::Matrix &vecdz, CH_Matrix_Classes::Integer startindex)
return the vector form of dz, 1 if not available
Definition: BoxIPBundleBlock.hxx:249
BoxIPBundleBlock(const CH_Matrix_Classes::Matrix &lb, const CH_Matrix_Classes::Matrix &ub, bool use_scaling=false, CH_Matrix_Classes::Real scalub=-1., CBout *cb=0, int cbinc=-1)
if use_scaling is true, then if scalub>0 it gives the maximum scaling value allowed, while a negative value just requires nonnegative scalings. If use_scaling is false and scalub>0. then work with (lb*scalub) and (ub*scalub);
virtual int copy_from(InteriorPointBundleBlock *)
copies to content of the argument to this; to work *this must be a clone of the argument; sofar this ...
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...
CH_Matrix_Classes::Matrix tmpvec
temporary vector to avoid reallocations
Definition: BoxIPBundleBlock.hxx:82
CH_Matrix_Classes::Real scalub
>0 only if use_scaling==true, and if so then enforce s <= scalub
Definition: BoxIPBundleBlock.hxx:34
virtual CH_Matrix_Classes::Real evaluate_trace_dx()
return the change in "trace" value caused by the current step
CH_Matrix_Classes::Integer scalvecdim
size of the model vector with scaling
Definition: BoxIPBundleBlock.hxx:30
CH_Matrix_Classes::Real olds
point before s
Definition: BoxIPBundleBlock.hxx:72
Real ip(const Matrix &A, const Matrix &B)
returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i...
Definition: matrix.hxx:1165
CH_Matrix_Classes::Integer vecdim
size of the model vector
Definition: BoxIPBundleBlock.hxx:29
CH_Matrix_Classes::Real dut
current step for ut (for s<=scaval)
Definition: BoxIPBundleBlock.hxx:48
virtual int apply_xizinv(CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Integer startindex, bool minus=false)
compute sysinv*rhs into rhs, possibly with a negative sign