3 #ifndef CONICBUNDLE_SUMBUNDLE_HXX 4 #define CONICBUNDLE_SUMBUNDLE_HXX int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
CH_Matrix_Classes::Matrix coeff
the coefficients for forming the next aggregate generated by the last quadratic bundle subproblem...
Definition: SumBundle.hxx:357
class for use with SumBlockModel and BundlData for storing and managing a common bundle describing (p...
Definition: SumBundle.hxx:190
bool has_roots() const
returns true if one of its parts is a root
MinorantPointer cand_minorant
the minorant in the current candidate is stored and collected here and does NOT include the function_...
Definition: SumBundle.hxx:366
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
the SumBundle/part is maybe maintained but currently not in use anywhere
Definition: SumBundle.hxx:197
void take_control(Mode mode)
if mode==root or mode==child and *this has a part marked as child, switch the mode to root; if mode==...
CH_Matrix_Classes::Integer get_n_contributors(FunctionTask ft) const
gets the corresponding n_contributors (call only if a has_bundle_for(ft)==true)
int apply_modification(const GroundsetModification &gsmdf, CH_Matrix_Classes::Integer mod_id, MinorantExtender *mex)
rearrange/extend the minorants according to the given groundset modifications
const PrimalData * get_approximate_primal(FunctionTask ft) const
if active, get the approximate primal (if add==false, initialize if possible and set add=true in this...
Interface for extending a Minorant, e.g., in Lagrangian Relaxation of cutting plane approaches...
Definition: CBSolver.hxx:490
CH_Matrix_Classes::Real get_function_factor(FunctionTask ft) const
gets the corresponding function factor (call only if a has_bundle_for(ft)==true)
BData()
default constructor
void synchronize_ids(CH_Matrix_Classes::Integer new_modification_id, CH_Matrix_Classes::Integer new_center_id, CH_Matrix_Classes::Integer old_center_id, CH_Matrix_Classes::Integer new_cand_id, CH_Matrix_Classes::Integer old_cand_id, CH_Matrix_Classes::Integer new_prex_id=0)
sets the modification_id to id
void clear(CH_Matrix_Classes::Real fun_factor=1.)
resets all to initial state
MinorantPointer & set_aggregate(FunctionTask ft)
allows to set the corresponding aggregate (call only if a has_bundle_for(ft)==true) ...
const MinorantBundle & get_bundle(FunctionTask ft) const
gets the corresponding minorants (call only if a has_bundle_for(ft)==true)
Mode
specifies for different parts of the sumbundle whether it is active and who is responsible for handli...
Definition: SumBundle.hxx:194
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
int eval_model(CH_Matrix_Classes::Real &lb, CH_Matrix_Classes::Integer yid, const CH_Matrix_Classes::Matrix &y, CH_Matrix_Classes::Real nullstep_bound, CH_Matrix_Classes::Real relprec) const
evaluate the model values for all root parts, it may only be called if there are such because otherwi...
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
MinorantPointer aggregate
This is empty or stores last aggregate computed. If not empty, it includes the function_factor.
Definition: SumBundle.hxx:363
CH_Matrix_Classes::Real & set_function_factor(FunctionTask ft)
allows to set the corresponding function factor (call only if a has_bundle_for(ft)==true) ...
CH_Matrix_Classes::Real lb_model(CH_Matrix_Classes::Integer yid, const CH_Matrix_Classes::Matrix &y) const
returns a quick lower bound for the model value
bool has_contributions() const
returns true if one of its parts is a child
const CH_Matrix_Classes::Matrix & get_coeff(FunctionTask ft) const
gets the corresponding aggregation coefficients (call only if a has_bundle_for(ft)==true) ...
MinorantBundle & set_bundle(FunctionTask ft)
allows to set the corresponding minorants (call only if a has_bundle_for(ft)==true) ...
Header declaring the classes ConicBundle::VariableMetricModel, ConicBundle::VariableMetricBundleData...
BData & operator=(const BData &bd)
make a copy (uses init)
CH_Matrix_Classes::Integer n_contributors
the number of different subbundles added to this sumbundle part
Definition: SumBundle.hxx:351
int apply_modification(const GroundsetModification &gsmdf, CH_Matrix_Classes::Integer mod_id, MinorantExtender *mex, FunctionTask ft)
rearrange/extend the minorants according to the given groundset modifications
const MinorantPointer & get_cand_minorant(FunctionTask ft) const
gets the corresponding candidate minorant (call only if a has_bundle_for(ft)==true) ...
void init(const SumBundle &sb)
initialize
int get_local_model_aggregate(MinorantPointer &aggregate, CH_Matrix_Classes::Real factor=1., const AffineFunctionTransformation *aft=0) const
get the aggregate that is due to root sumbundle parts handled here
Mode & set_mode(FunctionTask ft)
allows to set the corresponding mode (call only if a has_bundle_for(ft)==true)
the SumBundle/part is active and contributes to the parent, no control here
Definition: SumBundle.hxx:196
CH_Matrix_Classes::Real lb_model(CH_Matrix_Classes::Integer yid, const CH_Matrix_Classes::Matrix &y) const
returns a quick lower bound for the root parts, it may only be called if there are such because other...
bool has_bundle_for(FunctionTask ft) const
returns true if BData exists for this mode
CH_Matrix_Classes::Real function_factor
for external use all offsets and minorants have to be mulitplied by this factor
Definition: SumBundle.hxx:354
MinorantPointer & set_cand_minorant(FunctionTask ft)
allows to set the corresponding aggregate (call only if a has_bundle_for(ft)==true) ...
std::vector< BData > BDataVector
for storing separate data for ObjectiveFunciton, ConstantPenaltyFunction, AdaptivePenaltyFunction ...
Definition: SumBundle.hxx:410
Matrix class for real values of type Real
Definition: matrix.hxx:74
bool has_bundle_data() const
returns true if BData exists
routines for updating and handling SumBundle components, possibly by cooperating over several recursi...
Definition: SumBundleHandler.hxx:42
FunctionTask
Each function represented by a FunctionModel is equipped with a function_factor (it defaults to 1...
Definition: CBSolver.hxx:221
std::vector< MinorantPointer > MinorantBundle
a bundle is a vector with MinorantPointer entries
Definition: MinorantPointer.hxx:24
void init(const BData &bd)
make a copy
int call_primal_extender(PrimalExtender &prex, CH_Matrix_Classes::Integer prex_id, FunctionTask ft)
call this primal extender for the primals; if there minorants but no primals or if it fails...
CH_Matrix_Classes::Integer & set_n_contributors(FunctionTask ft)
allows to set the corresponding n_contributors (call only if a has_bundle_for(ft)==true) ...
const MinorantPointer & get_aggregate(FunctionTask ft) const
gets the corresponding aggregate (call only if a has_bundle_for(ft)==true)
MinorantBundle bundle
the minorants collected and not discarded over time, they do NOT include function_factor yet ...
Definition: SumBundle.hxx:360
Definition: SumBundle.hxx:344
bool has_working_roots() const
returns true if one of its parts is a root with n_contributors>0
the SumBundle/part is active and starts here, it does not contribute to parent
Definition: SumBundle.hxx:195
the SumBundle/part is not even maintained
Definition: SumBundle.hxx:198
int bundle_size(FunctionTask ft) const
if BData exists for this mode it returns its bundle_size (possibly 0), otherwise 0 ...
void synchronize_ids(CH_Matrix_Classes::Integer new_modification_id, CH_Matrix_Classes::Integer new_center_id, CH_Matrix_Classes::Integer old_center_id, CH_Matrix_Classes::Integer new_cand_id, CH_Matrix_Classes::Integer old_cand_id, CH_Matrix_Classes::Integer new_prex_id=0)
sets the modification_id to id
In Lagrangean relaxation an approximate primal solution can be generated by supplying primal informat...
Definition: CBSolver.hxx:151
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
Interface for extending PrimalData, e.g., in Lagrangian relaxation of column generation approaches...
Definition: CBSolver.hxx:180
int get_contributed_model_aggregate(MinorantPointer &aggregate, CH_Matrix_Classes::Real factor=1., const AffineFunctionTransformation *aft=0) const
get the aggregate that is due to child parts of the sumbundle, which are contributed to parents ...
int eval_model(CH_Matrix_Classes::Real &lb, CH_Matrix_Classes::Integer yid, const CH_Matrix_Classes::Matrix &y) const
evaluate the model value
BDataVector bdata
stores separate bundle data for ObjectiveFunciton, ConstantPenaltyFunction, AdaptivePenaltyFunction ...
Definition: SumBundle.hxx:413
int call_primal_extender(PrimalExtender &prex, CH_Matrix_Classes::Integer prex_id)
call this primal extender for the primals; if there are minorants but no primals or if it fails...
int get_model_aggregate(MinorantPointer &aggregate, CH_Matrix_Classes::Real factor=1., const AffineFunctionTransformation *aft=0) const
get the aggregate multiplied by factor, add it if add==true, and with applying the AffineFunctionTran...
Mode get_mode(FunctionTask ft) const
gets the corresponding mode (call only if a has_bundle_for(ft)==true)
CH_Matrix_Classes::Matrix & set_coeff(FunctionTask ft)
allows to set the corresponding aggregation coefficients (call only if a has_bundle_for(ft)==true) ...
bool active() const
returns true if one of its parts is not inactive
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
Mode mode
==root is handled here, ==child is handled at a parent, ==inactive if currently not in use but kept i...
Definition: SumBundle.hxx:348