ConicBundle
Public Member Functions | Public Attributes | List of all members

specialized BundleData class for use with AFTModel for storing and managing essential data of evaluations and the bundle describing the model More...

#include <AFTData.hxx>

Inheritance diagram for ConicBundle::AFTData:
ConicBundle::BundleData ConicBundle::VariableMetricBundleData ConicBundle::CBout

Public Member Functions

virtual void clear (CH_Matrix_Classes::Integer start_modification_id=0)
 reset to initial state (also used by the default constructor)
 
 AFTData (CH_Matrix_Classes::Integer start_modification_id=0)
 calls clear()
 
virtual int init (const BundleData *bd)
 initialize from other BundleData
 
BundleDataclone () const
 return a pointer to a clone of this
 
virtual 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 return 0, otherwise return 1
 
virtual 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
 
virtual bool center_modified (CH_Matrix_Classes::Integer &function_id, CH_Matrix_Classes::Integer center_id)
 check whether center computation is still valid for this point and modification id
 
virtual bool model_aggregate_modified (CH_Matrix_Classes::Integer last_aggr_id)
 check whether aggregate is available and has the same id
 
virtual void clear_model (bool discard_minorants_only=false)
 clear the cutting modle and all function evaluatoins
 
virtual void clear_aggregates ()
 delete all kinds of aggregates but keep explicit parts of the cutting model
 
- Public Member Functions inherited from ConicBundle::BundleData
 BundleData ()
 calls clear()
 
BundleDataclone () const
 return a pointer to a clone of this
 
virtual CH_Matrix_Classes::Integer get_dim () const
 returns the observed dimension; intially this is negative until the first point is worked on
 
virtual FunctionTask get_function_task () const
 the purpose or mode the function is used in, see FunctionTask
 
virtual CH_Matrix_Classes::Real get_function_factor () const
 the factor by which the minorants (except for the aggregate) need to be multiplied in order to match the current function scaling
 
virtual CH_Matrix_Classes::Integer get_modification_id () const
 the value is negative if not initialized and otherwise gives the number of modifications applied to the function
 
virtual CH_Matrix_Classes::Integer get_center_modification_id () const
 the value is negative if not initialized and otherwise gives the number of modifications applied to the function
 
virtual CH_Matrix_Classes::Real get_center_ub () const
 the value of the upper bound stored for center (without function_factor) if its modification id is up to date
 
virtual CH_Matrix_Classes::Integer get_center_id () const
 the point id for which center was computed if its modification id is up to date
 
virtual CH_Matrix_Classes::Integer get_cand_modification_id () const
 the value is negative if not initialized and otherwise gives the number of modifications applied to the function
 
virtual CH_Matrix_Classes::Real get_cand_ub () const
 the value of the upper bound stored for the candidate (without function_factor) if its modification id is up to date
 
virtual CH_Matrix_Classes::Integer get_cand_id () const
 the point id for which cand was computed if its modification id is up to date
 
const MinorantBundleget_old_minorants () const
 returns the bundle collected in store_old_minorants()
 
virtual int call_primal_extender (PrimalExtender &, bool include_candidates=true)
 see the last argument of FunctionOracle::evaluate()
 
virtual int apply_modification (const GroundsetModification &, MinorantExtender *mex)
 rearrange/extend the minorants according to the given groundset modifications
 
virtual const PrimalDataget_approximate_primal () const
 return the PrimalData corresponding to the aggregate
 
virtual const PrimalDataget_center_primal () const
 return the PrimalData corresponding to the aggregate
 
virtual const PrimalDataget_candidate_primal () const
 return the PrimalData delivered by the last call of FunctionOracle::evaluate()
 
virtual const SumBundleget_sumbundle () const
 return the sumbundle
 
virtual bool get_local_model_active () const
 return the sumbundle
 
virtual CH_Matrix_Classes::Real get_model_curvature () const
 return a rough curvature estimate to judge the relevance of providing a good model for this oracle
 
virtual int get_latest_minorants (MinorantBundle &latest_minorants, CH_Matrix_Classes::Integer max_number)
 the latest minorants available; the number may fall below or exceed the one requested in request_n_latest_minorants(); the minorants still need to be mutliplied by function_factor
 
virtual int get_model_data (MinorantBundle &model_minorants, CH_Matrix_Classes::Matrix &model_coeff) const
 the minorants currently used in the model; the list may be empty or max contain other minorants than returned in get_latest_minorants(); the minorants still need to be mutliplied by function_factor
 
virtual const MinorantPointerget_aggregate () const
 the aggregate minorant as currently in use in the bundle method; it already includes the function_factor
 
- Public Member Functions inherited from ConicBundle::VariableMetricBundleData
virtual ~VariableMetricBundleData ()
 virtual destructor
 
virtual const CH_Matrix_Classes::Symmatrixget_denseH () const
 allows to retrieve dense variable metric information stored here
 
virtual CH_Matrix_Classes::Symmatrixset_denseH ()
 allows to retrieve the dense variable metric information generated in the previous call and allows to store the new one in the end
 
virtual const CH_Matrix_Classes::Matrixget_lowrankH () const
 allows to retrieve low rank variable metric information stored here
 
virtual CH_Matrix_Classes::Matrixset_lowrankH ()
 allows to retrieve the low rank variable metric information generated in the previous call and allows to store the new one in the end
 
virtual const CH_Matrix_Classes::Matrixget_diagH () const
 allows to retrieve the diagonal variable metric information generated in the previous call and allows to store the new one in the end
 
virtual CH_Matrix_Classes::Matrixset_diagH ()
 allows to retrieve the diagonal variable metric information generated in the previous call and allows to store the new one in the end
 
- 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

CH_Matrix_Classes::Integer aftpoint_id
 increased whenever "a new point" (neither cand nor center) enters from outside or is created by changes in aft
 
CH_Matrix_Classes::Integer function_id
 the most recent (largest) function id known (-1 on initializaton or if model==0)
 
CH_Matrix_Classes::Integer center_ub_fid
 the function id returned on its computation
 
CH_Matrix_Classes::Integer center_mid
 modification_id for which center_offset and aft_center were computed, <0 if not initialized
 
CH_Matrix_Classes::Integer center_pid
 aftpoint_id of the AFT-transformed center
 
CH_Matrix_Classes::Matrix aft_center
 AFT-transformed center.
 
CH_Matrix_Classes::Real center_offset
 constant plus linear y term for modification id center_mid and center with point id center_id
 
CH_Matrix_Classes::Integer cand_ub_fid
 the function id returned on its computation
 
CH_Matrix_Classes::Integer cand_mid
 modification_id for which cand_offset and aft_cand were computed, <0 if not initialized
 
CH_Matrix_Classes::Integer cand_pid
 aftpoint_id of the AFT-transformed cand
 
CH_Matrix_Classes::Matrix aft_cand
 AFT-transformed cand.
 
CH_Matrix_Classes::Real cand_offset
 constant plus linear y term for modification id center_mid and cand with point id cand_id
 
CH_Matrix_Classes::Integer aggregate_fid
 the function's aggregate id for which this aggregate was computed (this was returned by model for get_aggregate_id)
 
bool aggregate_available
 true if still valid, false if outdated or not initialized
 

Additional Inherited Members

- Protected Member Functions inherited from ConicBundle::BundleData
virtual FunctionTaskset_function_task ()
 the purpose or mode the function is used in, see FunctionTask
 
virtual CH_Matrix_Classes::Realset_function_factor ()
 the factor by which the minorants (except for the aggregate) need to be multiplied in order to match the current function scaling
 
virtual CH_Matrix_Classes::Integerset_center_ub_mid ()
 the modification_id when center was computed; -1 indicates not initialized
 
virtual MinorantPointerset_aggregate ()
 the aggregate minorant as currently in use in the bundle method; it already includes the function_factor
 
virtual CH_Matrix_Classes::Integerset_aggregate_id ()
 the identification number of the aggregate minorant
 
virtual SumBundleset_sumbundle ()
 return the sumbundle
 
virtual MinorantBundleset_old_minorants ()
 return old_minorants
 
virtual CH_Matrix_Classes::Integer get_prex_id () const
 for keeping track of changes by primal extenders
 
- Protected Attributes inherited from ConicBundle::BundleData
CH_Matrix_Classes::Integer cand_ub_mid
 modification id for which cand_ub was computed, <0 if not initialized
 
CH_Matrix_Classes::Real cand_ub
 upper bound on function value for modification id cand_mid and candidate with point id cand_id (does not include the effect of function_factor and function_task)
 
CH_Matrix_Classes::Real cand_relprec
 relative precision used in computing cand_ub
 
CH_Matrix_Classes::Integer cand_id
 point id of the stored candidate
 
MinorantPointer local_aggregate
 the local (possibly empty) aggregate linear minorant of the model handled by this and its descendants. It includes function_factor and function_task, and comprises the local_model parts and the active sumbundle parts
 

Detailed Description

specialized BundleData class for use with AFTModel for storing and managing essential data of evaluations and the bundle describing the model

The general philosophy regarding ids is the same as described in BundleData, but this time the modification_id is increased whenever the AFT is modified or it detects that the function it transforms was modified. Furthermore, the AFTModel also generates new points, namly the transformed arguments arising from the input points. In fact, whenever the AFT is modified, typically a new argument needs to be generated for the same old point, so the AFTModle has to assign its own aftpoint_id whenever it generates a new point by way of transforming an argument. Therefore the data has to store for each input point_id the transformed aft_point together with a point_mid (storing what AFT it was generated for) and a point_pid (storing the new point identifier of the AFTModel). Whenever a point is transformed, the affine part dependending on this point only is stored in point_offset. If the function is then evaluated, the returned value is called point_ub with point_ub_mid giving the modification_id when it was determined.

Likewise the situation with the aggregate is a bit more involved. The validity of the aggregate now depends on changes in the function as well as that of the AFT. So whenever the AFT changes but the function does not, the aggregate is in principle still available but has changed, so an extra aggregate_id is needed here again and the id assigned by the function model is stored in aggregate_mid. The role of aggregate_available is as before. Typically there is no need to have an explicit copy of the aggregate available here, it suffices to transform the one available in the function model. In some cases it is hard to avoid storing it explicitly and if it is done, this is marked by setting aggregate_stored to true.


The documentation for this class was generated from the following file: