ConicBundle
|
Public Member Functions | |
BData () | |
default constructor | |
BData (const BData &bd) | |
copy constructor (uses clear and init) | |
~BData () | |
destructor | |
void | clear (CH_Matrix_Classes::Real fun_factor=1.) |
resets all to initial state | |
void | init (const BData &bd) |
make a copy | |
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 | |
BData & | operator= (const BData &bd) |
make a copy (uses init) | |
int | eval_model (CH_Matrix_Classes::Real &lb, CH_Matrix_Classes::Integer yid, const CH_Matrix_Classes::Matrix &y) const |
evaluate the model value | |
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 | |
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 AffineFunctionTransformation if aft!=0 | |
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, return the count of fails | |
int | apply_modification (const GroundsetModification &gsmdf, CH_Matrix_Classes::Integer mod_id, MinorantExtender *mex) |
rearrange/extend the minorants according to the given groundset modifications | |
Public Member Functions inherited from ConicBundle::CBout | |
virtual void | set_out (std::ostream *out=0, int print_level=1) |
Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings, level>0 increasingly detailed information) More... | |
virtual void | set_cbout (const CBout *cb, int incr=-1) |
Specifies the output level relative to the given CBout class. More... | |
void | clear_cbout () |
reset to default settings (out=0,print_level=1) | |
CBout (const CBout *cb=0, int incr=-1) | |
calls set_cbout | |
CBout (std::ostream *outp, int pl=1) | |
initialize correspondingly | |
CBout (const CBout &cb, int incr=0) | |
copy constructor | |
virtual bool | cb_out (int pl=-1) const |
Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output. | |
std::ostream & | get_out () const |
If cb_out() returned true, this returns the output stream, but it will abort if called with out==0. | |
std::ostream * | get_out_ptr () const |
returns the pointer to the output stream | |
int | get_print_level () const |
returns the print_level | |
virtual int | mfile_data (std::ostream &out) const |
writes problem data to the given outstream | |
Public Attributes | |
Mode | mode |
==root is handled here, ==child is handled at a parent, ==inactive if currently not in use but kept in sync with the parent | |
CH_Matrix_Classes::Integer | n_contributors |
the number of different subbundles added to this sumbundle part | |
CH_Matrix_Classes::Real | function_factor |
for external use all offsets and minorants have to be mulitplied by this factor | |
CH_Matrix_Classes::Matrix | coeff |
the coefficients for forming the next aggregate generated by the last quadratic bundle subproblem, they sum up to at most the value function_factor | |
MinorantBundle | bundle |
the minorants collected and not discarded over time, they do NOT include function_factor yet | |
MinorantPointer | aggregate |
This is empty or stores last aggregate computed. If not empty, it includes the function_factor. | |
MinorantPointer | cand_minorant |
the minorant in the current candidate is stored and collected here and does NOT include the function_facotr | |
For every SumBundle part it stores the current activity mode and the validity status of its aggregate.
The mode may only be changed by the local bundlehandler. The model has to tell the bundlehandler on initialization, which parts it is allowed to use.
If the mode is root, the bundle was or will be used directly in the quadratic bundle subproblem. If the local handler knows about a parent handler, it keeps the parent's bundlesize part arranged in the same way. It may use more columns, however, if so desired, and forms the aggregate in its own way, even if it has to be stored in the same position in update_model with the coefficients being function_factor for the aggregate and 0 otherwise in order to allow contributing to the parent at later points in time.
If the mode is child, the bundle is incorporated in the parent's summodel, so it may not be used to form a quadratic bundle subproblem and the local handler has to follow the update rules of the parent in detail.
If the mode is inactive, it is currently not in use anywhere, but it is kept alive and up to date in order to allow for switching the mode quickly (this is only necessary if there is a local contributing part). In particular the local handler keeps the minorants in the same order and the model feeds the new minorant in every iteration. Again the purpose is to allow contributing at later points in time with consistent information.
If a sumbundle part is active (root or child), the corresponding valid flag is false, if some problem modification may have caused the bundle information of this to have changed (the BundleHandler needs to make sure that parts contributed to parents are removed before that) to the effect that the bundle with its coefficients might no longer be in sync with the stored aggregate.
The sumbundle parts usable by the handler must be initialized by the model. If the model has not initialized it, the Bundlehandler is not allowed to use it. A part that has no contributors cannot be active. The only way to establish that a sumbundle is a
The coefficients of a part are meaningful only if the bundle is active.