ConicBundle
PSCData.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CONICBUNDLE_PSCDATA_HXX
4 #define CONICBUNDLE_PSCDATA_HXX
5 
6 
15 #include "BundleData.hxx"
16 #include "PSCOracle.hxx"
17 //#include "PSCAffineFunction.hxx"
18 
19 namespace ConicBundle {
20 
25 
45 class PSCData:public BundleData
46 {
47 private:
48  friend class PSCModel;
49  friend class QPPSCOracleData;
50 
51  //===== variables =====
52  //CH_Matrix_Classes::Integer dim; ///< the incoming dimension, once it is detected, -1 if not yet clear (some need it, but it is mainly for consistency checks and should be initialized in eval_function, lb_function, recompute_center, and updated in apply_modification)
53  //FunctionTask function_task;
54  //CH_Matrix_Classes::Real function_factor; ///< >0, interpreted according to function_task
55 
56  //CH_Matrix_Classes::Integer modification_id; ///< increased on any modification applied to the function
57 
58  //CH_Matrix_Classes::Integer center_ub_mid; ///< modification id for which center_ub was computed, <0 if not initialized
59  //CH_Matrix_Classes::Real center_ub; ///< upper bound on function value for modification id center_mid and center with point id center_id
60  //CH_Matrix_Classes::Real center_relprec; ///< relative precision used in computing center_ub
61  //CH_Matrix_Classes::Integer center_id; ///< point id of the stored center
65 
66 
67  //CH_Matrix_Classes::Integer cand_ub_mid; ///< modification id for which cand_ub was computed, <0 if not initialized
68  //CH_Matrix_Classes::Real cand_ub; ///< upper bound on function value for modification id cand_mid and candidate with point id cand_id
69  //CH_Matrix_Classes::Real cand_relprec; ///< relative precision used in computing cand_ub
70  //CH_Matrix_Classes::Integer cand_id; ///< point id of the stored candidate
74 
75  //CH_Matrix_Classes::Integer aggregate_id;
76  //MinorantPointer local_aggregate; ///< the local (possibly empty) aggregate linear minorant of the model handled by this and its descendants (including @a function_factor and @a function_task)
77  //MinorantPointer aggregate; ///< the aggregate linear minorant of the model (including @a function_factor and @a function_task)
83 
87 
88  //the bundle is initialized if bundlevecs.coldim()>0 (then it must have rowdim>0!)
91 
92 
98 
99  //SumBundle sumbundle;
100 
101  //CH_Matrix_Classes::Integer prex_id; // counter for keeping track of PriamlExtender calls
102 
103  //--- data needed for generic scaling
104  //CH_Matrix_Classes::Integer max_old_minorants;
105  //MinorantBundle old_minorants;
106  //CH_Matrix_Classes::Matrix old_lowrank;
107  //CH_Matrix_Classes::Matrix old_diagonal;
108  //CH_Matrix_Classes::Symmatrix old_sym;
109  //CH_Matrix_Classes::Integer minorant_nexti;
110 
111  //--- data needed for collecting specific scaling relevant information
114 
115 public:
116 
117  //===== methods =====
119  ~PSCData();
120 
122  void clear(CH_Matrix_Classes::Integer start_modification_id=0);
123 
125  PSCData(CH_Matrix_Classes::Real fun_factor=1.,FunctionTask fun_task=ObjectiveFunction);
126 
129  { return primalvecs; }
130 
133  { return primaleigs; }
134 
137  { return topvecs; }
138 
141  { return Ritz_values; }
142 
143 
144 
147  { return keepsize; }
148 
151  { return activedim; }
152 
155  { return skippedsize; }
156 
157 
159  int init(const BundleData* bd);
160 
162  BundleData* clone() const;
163 
165  int do_step(CH_Matrix_Classes::Integer point_id);
166 
168  int synchronize_ids(CH_Matrix_Classes::Integer& new_center_ub_fid,
169  CH_Matrix_Classes::Integer new_center_id,
170  CH_Matrix_Classes::Integer old_center_id,
171  CH_Matrix_Classes::Integer& new_cand_ub_fid,
172  CH_Matrix_Classes::Integer new_cand_id,
173  CH_Matrix_Classes::Integer old_cand_id,
174  CH_Matrix_Classes::Integer& new_aggregate_id,
175  CH_Matrix_Classes::Integer new_prex_id=0);
176 
177  //int center_modified() // as in BundleData
178 
179  //int model_aggregate_modified() // as in BundleData
180 
183 
185  void clear_model(bool discard_minorants_only=false);
186 
188  void clear_aggregates();
189 
191  int call_primal_extender(PrimalExtender&,bool include_candidates=true);
192 
195 
197  const PrimalData* get_approximate_primal() const;
198 
200  const PrimalData* get_center_primal() const;
201 
203  const PrimalData* get_candidate_primal() const;
204 
205 };
206 
207 
209 
210 }
211 
212 #endif
213 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
implements (as a derived class of ConeModel) a cutting model for a PSCOracle
Definition: PSCModel.hxx:46
const PrimalData * get_approximate_primal() const
return the PrimalData corresponding to the aggregate
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
CH_Matrix_Classes::Matrix primalvecs
vecs of eigval-decomposition of last eval_augmodel (always the same span as bundlevecs) ...
Definition: PSCData.hxx:79
CH_Matrix_Classes::Matrix center_Ritzvec
a Ritzvector generating center_Ritzval
Definition: PSCData.hxx:63
CH_Matrix_Classes::Real primal_Ritzval
the (common) Ritz_value of the active subspace in primaleigs (= cutting model value) ...
Definition: PSCData.hxx:82
CH_Matrix_Classes::Matrix primaleigs
eigs of eigval-decomposition of last eval_augmodel (if not empty, sum of this and aggrcoeffs is feasi...
Definition: PSCData.hxx:78
CH_Matrix_Classes::Matrix cand_Ritzvec
the Ritzvectors generating cand_Ritzval
Definition: PSCData.hxx:72
PSCData(CH_Matrix_Classes::Real fun_factor=1., FunctionTask fun_task=ObjectiveFunction)
calls clear()
Interface for extending a Minorant, e.g., in Lagrangian Relaxation of cutting plane approaches...
Definition: CBSolver.hxx:490
CH_Matrix_Classes::Real scaling_gap
Ritz threshold for consideration in scaling.
Definition: PSCData.hxx:112
CH_Matrix_Classes::Matrix cand_Ritzval
Ritz values returned by the oracle.
Definition: PSCData.hxx:71
int apply_modification(const GroundsetModification &, MinorantExtender *mex)
rearrange/extend the minorants according to the given groundset modifications
CH_Matrix_Classes::Real center_Ritzval
lower bound on the center value
Definition: PSCData.hxx:62
void clear_model(bool discard_minorants_only=false)
clear the cutting model and all function evaluations
void clear_model_except_bundlevecs()
clear all function evaluations and aggregates, but not the collected subspace information ...
Header declaring the classes ConicBundle::PSCOracle and ConicBundle::PSCBundleParameters (needed for ...
CH_Matrix_Classes::Integer keepsize
extended space dimension kept in bundlevecs
Definition: PSCData.hxx:96
CH_Matrix_Classes::Real primal_aggregate_coeff
coefficient determined in last eval_augmodel, maybe with some aggregated parts of primalvecs if not a...
Definition: PSCData.hxx:81
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
MinorantPointer bundle_aggregate
for getting inside the semidifinite cone
Definition: PSCData.hxx:90
CH_Matrix_Classes::Integer get_skippedsize() const
returns skippedsize
Definition: PSCData.hxx:154
BundleData * clone() const
return a pointer to a clone of this
extends BundleData for use with PSCModel (see there for the description of the function) by adding in...
Definition: PSCData.hxx:45
int call_primal_extender(PrimalExtender &, bool include_candidates=true)
see the last argument of FunctionOracle::evaluate()
CH_Matrix_Classes::Matrix bundlevecs
the columns span the subspace of the semidefinte face (the bundle is initialized if bundlevecs...
Definition: PSCData.hxx:89
CH_Matrix_Classes::Matrix primalgrowth
factor by which primaleigs changed in the last interior point iteration
Definition: PSCData.hxx:85
CH_Matrix_Classes::Integer skippedsize
number of columns in topvecs exceeding activedim
Definition: PSCData.hxx:97
const PrimalData * get_candidate_primal() const
return the PrimalData delivered by the last call of FunctionOracle::evaluate()
const CH_Matrix_Classes::Matrix & get_topvecs() const
returns topvecs
Definition: PSCData.hxx:136
CH_Matrix_Classes::Integer get_activedim() const
returns acitvedim
Definition: PSCData.hxx:150
const CH_Matrix_Classes::Matrix & get_primalvecs() const
returns primalvecs
Definition: PSCData.hxx:128
Header declaring the class ConicBundle::BundleData (see ConicBundle::SumBlockModel) ...
const CH_Matrix_Classes::Matrix & get_Ritz_values() const
returns Ritz_values
Definition: PSCData.hxx:140
CH_Matrix_Classes::Matrix Ritz_values
of the vectors in topvecs and skippedvecs
Definition: PSCData.hxx:94
Matrix class for real values of type Real
Definition: matrix.hxx:74
CH_Matrix_Classes::Integer get_keepsize() const
returns keepsize
Definition: PSCData.hxx:146
CH_Matrix_Classes::Integer activedim
identified size of the active subspace
Definition: PSCData.hxx:95
FunctionTask
Each function represented by a FunctionModel is equipped with a function_factor (it defaults to 1...
Definition: CBSolver.hxx:221
int init(const BundleData *bd)
if bd is of type PSCData, initialize to this data
void clear_aggregates()
delete all kinds of aggregates but keep explicit parts of the cutting model
void clear(CH_Matrix_Classes::Integer start_modification_id=0)
reset to initial state (also used by the default constructor)
In Lagrangean relaxation an approximate primal solution can be generated by supplying primal informat...
Definition: CBSolver.hxx:151
CH_Matrix_Classes::Real growthrate
factor <X,Z>/<X^-,Z^->, where X^- and Z⁻- are the last but one iterates of the interior point method...
Definition: PSCData.hxx:84
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
CH_Matrix_Classes::Real center_gap
the gap observed for the current center
Definition: PSCData.hxx:113
Interface for extending PrimalData, e.g., in Lagrangian relaxation of column generation approaches...
Definition: CBSolver.hxx:180
int do_step(CH_Matrix_Classes::Integer point_id)
if the candidate information is available and consitent for point_id, copy it from cand to center and...
MinorantPointer cand_minorant
if not empty, it matches topvecs.col(0) (!)
Definition: PSCData.hxx:73
base class for use with SumBlockModel for storing and managing essential data of evaluations and the ...
Definition: BundleData.hxx:77
~PSCData()
calls clear()
int synchronize_ids(CH_Matrix_Classes::Integer &new_center_ub_fid, CH_Matrix_Classes::Integer new_center_id, CH_Matrix_Classes::Integer old_center_id, CH_Matrix_Classes::Integer &new_cand_ub_fid, CH_Matrix_Classes::Integer new_cand_id, CH_Matrix_Classes::Integer old_cand_id, CH_Matrix_Classes::Integer &new_aggregate_id, CH_Matrix_Classes::Integer new_prex_id=0)
synchronize ids in any case by discarding inconsistent parts but return number of errors ...
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
CH_Matrix_Classes::Matrix dualgrowth
factor by which the dual Ritz values to primalvecs changed during the last interior point iteration ...
Definition: PSCData.hxx:86
CH_Matrix_Classes::Matrix topvecs
orthonormal columns giving the largest Ritz_values; the range of this includes the range of bundlevec...
Definition: PSCData.hxx:93
const PrimalData * get_center_primal() const
return the PrimalData corresponding to the aggregate
MinorantPointer primal_aggregate
for getting inside the semidifinite cone
Definition: PSCData.hxx:80
const CH_Matrix_Classes::Matrix & get_primaleigs() const
returns primaleigs
Definition: PSCData.hxx:132
MinorantPointer center_minorant
if not empty it matches center_Ritzvec
Definition: PSCData.hxx:64