ConicBundle
PSCIPBundleBlock.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_PSCIPBUNDLEBLOCK_HXX
4 #define CONICBUNDLE_PSCIPBUNDLEBLOCK_HXX
5 
14 #include "PSCIPBlock.hxx"
15 #include "SparseCoeffmatMatrix.hxx"
16 
17 namespace ConicBundle {
18 
23 
30  {
31  public:
32  virtual ~QPPSCOracleDataObject();
33 
37  virtual const SparseCoeffmatMatrix& get_opAt()=0;
38 
42  virtual const SparseCoeffmatMatrix& get_C()=0;
43 
46  virtual const CH_Matrix_Classes::Matrix& get_bundlevecs()=0;
47 
48  };
49 
56 {
57 private:
62 
64 
66 
67 
70  const CH_Matrix_Classes::Matrix& vecX,
71  CH_Matrix_Classes::Real trace_bound,
72  bool cautious) const;
73 
75  int get_growth(const CH_Matrix_Classes::Matrix& lamX,
76  const CH_Matrix_Classes::Matrix& vecX,
77  CH_Matrix_Classes::Real& growthrate,
78  CH_Matrix_Classes::Matrix& primalgrowth,
79  CH_Matrix_Classes::Matrix& dualgrowth) const;
80 
82  int form_B(CH_Matrix_Classes::Integer dim,
83  const MinorantBundle& globalbundle,
84  CH_Matrix_Classes::Integer startindex_bundle);
85 
87  int sveciB_times_vec(const CH_Matrix_Classes::Matrix& vec,
89 
90 public:
92  void clear(CH_Matrix_Classes::Integer dim=0);
93 
95  PSCIPBundleBlock(CH_Matrix_Classes::Integer dim=0, CBout* cb=0,int cbinc=-1);
96 
99 
101  virtual InteriorPointBundleBlock* clone();
102 
104  virtual int copy_from(InteriorPointBundleBlock*);
105 
107  virtual void set_oracle_data(QPModelOracleDataObject* in_oracle_data)
108  {oracle_data=dynamic_cast<QPPSCOracleDataObject*>(in_oracle_data);}
109 
112  {return bundle_dim;}
113 
115  virtual CH_Matrix_Classes::Real evaluate_trace_x();
116 
118  virtual CH_Matrix_Classes::Real evaluate_trace_z();
119 
121  virtual CH_Matrix_Classes::Real evaluate_trace_dx();
122 
124  virtual int add_trace(CH_Matrix_Classes::Matrix& vec,
126  CH_Matrix_Classes::Integer startindex);
127 
129  virtual int set_xizinvsqrt_trace(CH_Matrix_Classes::Matrix& vec,
130  CH_Matrix_Classes::Integer startindex);
131 
132  // 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
133  // virtual int get_linx(CH_Matrix_Classes::Matrix& linx,
134  // CH_Matrix_Classes::Matrix* linx_activity=0) const;
135 
138  B_times(const CH_Matrix_Classes::Matrix& A,
142  int Btrans,
143  int Atrans,
144  CH_Matrix_Classes::Integer startindex_model,
145  MinorantBundle& globalbundle,
146  CH_Matrix_Classes::Integer startindex_bundle);
147 
150  times_B(const CH_Matrix_Classes::Matrix& A,
154  int Atrans,
155  int Btrans,
156  CH_Matrix_Classes::Integer startindex_model,
157  MinorantBundle& globalbundle,
158  CH_Matrix_Classes::Integer startindex_bundle);
159 
162  add_BDBt(const CH_Matrix_Classes::Matrix& diagvec,
164  bool minus,
165  CH_Matrix_Classes::Integer startindex,
167  CH_Matrix_Classes::Integer startindex_model,
168  MinorantBundle& globalbundle,
169  CH_Matrix_Classes::Integer startindex_bundle);
170 
173  get_Bt(CH_Matrix_Classes::Matrix& Bt,
174  CH_Matrix_Classes::Integer startindex_model,
175  MinorantBundle& global_bundle,
176  CH_Matrix_Classes::Integer startindex_bundle);
177 
179  virtual int add_modelx_aggregate(CH_Matrix_Classes::Real& val,
181  MinorantBundle& global_bundle,
182  CH_Matrix_Classes::Integer startindex_bundle);
183 
185  virtual int get_sysviol_model(CH_Matrix_Classes::Matrix& sysviol_model,
186  CH_Matrix_Classes::Integer startindex_model,
187  const CH_Matrix_Classes::Matrix& dy,
188  const CH_Matrix_Classes::Real deltatrdual,
189  MinorantBundle& global_bundle,
190  CH_Matrix_Classes::Integer startindex_bundle);
191 
193  virtual int set_bundle_z(const CH_Matrix_Classes::Matrix& y,
194  MinorantBundle& global_bundle,
195  CH_Matrix_Classes::Integer startindex_bundle,
196  CH_Matrix_Classes::Real& add_center_value);
197 
199  virtual int add_trace_to_diff_model(CH_Matrix_Classes::Real trace_dual);
200 
202  virtual CH_Matrix_Classes::Real dualviol_2normsqr();
203 
205  virtual int do_bundle_step(CH_Matrix_Classes::Real alpha,
206  const CH_Matrix_Classes::Matrix& y,
207  MinorantBundle& globalbundle,
208  CH_Matrix_Classes::Integer startindex_bundle,
209  CH_Matrix_Classes::Real tracedual,
210  CH_Matrix_Classes::Real trace_rhs);
211 
213  virtual int set_modelrhs(CH_Matrix_Classes::Matrix& globalrhs,
215  CH_Matrix_Classes::Real rhscorr,
216  CH_Matrix_Classes::Integer startindex_model);
217 
219  virtual int add_BtinvsysB(CH_Matrix_Classes::Symmatrix& globalsys,
220  const MinorantBundle& bundle,
221  CH_Matrix_Classes::Integer startindex_bundle) ;
222 
245  int Schur_transform_bundle(CH_Matrix_Classes::Matrix& glob_lowrank,
246  MinorantBundle& globalbundle,
247  CH_Matrix_Classes::Integer startindex_bundle,
248  CH_Matrix_Classes::Matrix& trafotrace,
249  CH_Matrix_Classes::Integer startindex_trace);
250 
251 
275  virtual int add_bundle_xizinv_diagonal(CH_Matrix_Classes::Matrix& diagonal,
276  CH_Matrix_Classes::Matrix& ipBtrvec,
277  MinorantBundle& globalbundle,
278  CH_Matrix_Classes::Integer startindex_bundle,
279  const CH_Matrix_Classes::Matrix& trafotrace,
280  CH_Matrix_Classes::Integer startindex_trace);
281 
282 
283 
301  virtual int add_pcsubspace(CH_Matrix_Classes::Matrix& lowrank,
302  CH_Matrix_Classes::Matrix& sigma_guess,
303  const CH_Matrix_Classes::Matrix& Diag_inv,
305  CH_Matrix_Classes::Real diaginvval,
306  CH_Matrix_Classes::Matrix & minus_trmult,
307  CH_Matrix_Classes::Real schur_trace,
308  MinorantBundle& globalbundle,
309  CH_Matrix_Classes::Integer startindex_bundle);
310 
311 
313  int add_bundle_xizinvsqrt_projection(CH_Matrix_Classes::Matrix& glob_lowrank,
314  CH_Matrix_Classes::Matrix& subspace,
315  CH_Matrix_Classes::Integer startindex_subsspace,
316  MinorantBundle& globalbundle,
317  CH_Matrix_Classes::Integer startindex_bundle);
318 
320  virtual int add_BtinvsysB_times(const CH_Matrix_Classes::Matrix& in_vec,
321  CH_Matrix_Classes::Matrix& out_vec,
322  CH_Matrix_Classes::Real zeta_inval,
323  CH_Matrix_Classes::Real* zeta_outval,
324  MinorantBundle& globalbundle,
325  CH_Matrix_Classes::Integer startindex_bundle);
326 
328  virtual int set_dx_xizsolvestep(const CH_Matrix_Classes::Matrix& step_y,
329  const CH_Matrix_Classes::Real step_trdual,
330  MinorantBundle& globalbundle,
331  CH_Matrix_Classes::Integer startindex_bundle);
332 
333 
335  int get_pscx(CH_Matrix_Classes::Matrix& pscx_eigs,
336  CH_Matrix_Classes::Matrix& pscx_vecs,
337  CH_Matrix_Classes::Real& pscx_growthrate,
338  CH_Matrix_Classes::Matrix& pscx_primalgrowth,
339  CH_Matrix_Classes::Matrix& pscx_dualgrowth);
340 
341 
342 };
343 
344 
346 
347 }
348 
349 #endif
350 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
CH_Matrix_Classes::Matrix B
matrix representation of bundle
Definition: PSCIPBundleBlock.hxx:58
interface for interior point variable and routines specific to primal dual complementarity conditions...
Definition: PSCIPBlock.hxx:27
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
abstract base class for passing additional oracle information to the QP
Definition: QPModelDataObject.hxx:134
virtual const SparseCoeffmatMatrix & get_opAt()=0
Matrix class of symmetric matrices with real values of type Real
Definition: symmat.hxx:43
CH_Matrix_Classes::Matrix Boffset
columnvector of bundle offsets
Definition: PSCIPBundleBlock.hxx:59
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
stores/organizes the CoeffmatPointer pointers to Coeffmat matrices with the purpose of describing the...
Definition: SparseCoeffmatMatrix.hxx:50
virtual void set_oracle_data(QPModelOracleDataObject *in_oracle_data)
allows to pass on additional information about the oracle if required
Definition: PSCIPBundleBlock.hxx:107
defines an interface for passing on oracle information to PSCIPBundleBlock
Definition: PSCIPBundleBlock.hxx:29
virtual const CH_Matrix_Classes::Matrix & get_bundlevecs()=0
virtual CH_Matrix_Classes::Integer dim_bundle() const
returns the number of consecutive bundle elements this cone makes use of
Definition: PSCIPBundleBlock.hxx:111
Matrix class for real values of type Real
Definition: matrix.hxx:74
interior point variables and routines specific to the primal dual complementarity conditions of a pos...
Definition: PSCIPBundleBlock.hxx:55
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
CH_Matrix_Classes::Matrix sqrBnorms
if rowdim>0 it holds the squared norm of each subgradient in the same sequence as in B ...
Definition: PSCIPBundleBlock.hxx:60
QPPSCOracleDataObject * oracle_data
if not NULL this makes the data of the underlying psc oracle accessible; it is yet to be explored whe...
Definition: PSCIPBundleBlock.hxx:63
Header declaring the classes ConicBundle::SparseCoeffmatMatrix (needed for ConicBundle::PSCAffineFunc...
abstract interface for interior point routines specific to primal dual complementarity conditions of ...
Definition: InteriorPointBundleBlock.hxx:31
Header declaring the class ConicBundle::InteriorPointBundleBlock.
CH_Matrix_Classes::Indexmatrix Bnzcolind
holds the indices of nonzero columns of B in increasing order
Definition: PSCIPBundleBlock.hxx:61
virtual const SparseCoeffmatMatrix & get_C()=0
CoeffmatInfo * clone(const CoeffmatInfo *cip)
if cip is not zero, it calls and returns cip->clone() and 0 otherwise
Definition: Coeffmat.hxx:106
Header declaring the class ConicBundle::PSCIPBlock.
CH_Matrix_Classes::Matrix testmat
for comparisons in testing
Definition: PSCIPBundleBlock.hxx:65