ConicBundle
Public Member Functions | List of all members
ConicBundle::BoxModelParametersObject Class Referenceabstract

abstract interface for BoxModel for the model selection routine select_model() More...

#include <BoxModelParametersObject.hxx>

Inheritance diagram for ConicBundle::BoxModelParametersObject:
ConicBundle::CBout ConicBundle::BundleParameters ConicBundle::BoxModelParameters

Public Member Functions

int init (const BundleParameters &bp)
 initialize BundleParameters to given values, if bp is a SumModleParametersObject alos set n_local_models to its values, otherwise leave it unchanged
 
 BoxModelParametersObject (const CBout *cb=0, int cbinc=-1)
 default constructor
 
 BoxModelParametersObject (const BundleParameters &bp, const CBout *cb=0, int cbinc=-1)
 copy constructor for BundleParameters
 
 BoxModelParametersObject (const BoxModelParametersObject &sms)
 copy constructor
 
virtual ~BoxModelParametersObject ()
 virtual destructor, implemented in BoxModelParameters.cxx
 
virtual int select_model (MinorantBundle &box_model, CH_Matrix_Classes::Matrix &box_coeff, CH_Matrix_Classes::Matrix &box_indicators, CH_Matrix_Classes::Indexmatrix &box_coords, CH_Matrix_Classes::Matrix &box_complvalues, MinorantBundle &nnc_model, CH_Matrix_Classes::Matrix &nnc_coeff, CH_Matrix_Classes::Matrix &nnc_indicators, const CH_Matrix_Classes::Matrix &coord_switching, const MinorantBundle &minorants, const MinorantPointer cand_minorant, const PrimalMatrix cand_boxvec, const PrimalMatrix aggr_boxvec, CH_Matrix_Classes::Real aggr_scaleval, BoxOracle *oracle, CH_Matrix_Classes::Integer modification_id, FunctionTask function_task, CH_Matrix_Classes::Real function_factor, BundleModel::ModelUpdate model_update, CH_Matrix_Classes::Integer center_id, const CH_Matrix_Classes::Matrix &center_y, CH_Matrix_Classes::Integer cand_id, const CH_Matrix_Classes::Matrix &cand_y, CH_Matrix_Classes::Real model_maxviol, BundleProxObject &H)=0
 BoxModel calls this for selecting the next coordinates for a specialized polyhedral model with a box part and an nnc part for aggregates, see the general explanation of the class. More...
 
- 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 Member Functions inherited from ConicBundle::BundleParameters
virtual int get_max_model_size () const
 returns the value of the variable
 
virtual int get_max_bundle_size () const
 returns the value of the variable
 
virtual int get_update_rule () const
 returns the value of the variable
 
virtual int set_max_model_size (int mms)
 sets the value of the variable
 
virtual int set_max_bundle_size (int mbs)
 sets the value of the variable
 
virtual int set_update_rule (int ur)
 sets the value of the variable
 
 BundleParameters (const BundleParameters &bp)
 often works well: small model of size 2 and some history in bundle size for use in scaling
 
 BundleParameters (int modelsize=-1, int bundlesize=-1, int updaterule=-1)
 often works well for fast initial progress: small model of size 2 and some history in bundle size for use in scaling; default values give no preference at all
 
virtual ~BundleParameters ()
 virtual destructor
 
virtual BundleParametersclone_BundleParameters () const
 return a new clone object of this on the heap (caller needs to delete the result)
 

Additional Inherited Members

- Protected Attributes inherited from ConicBundle::BundleParameters
int max_model_size
 maximum number of minorants to be selected for the cutting model (numbers<=1 for no limit, numbers >=2 impose a strict limit)
 
int max_bundle_size
 suggested maximum number of latest minorants stored for use in a model, for constructing variable metric information etc. (negative numbers give no preference; the size may be increased internally in case of confliciting requirements, eg. in n_model_size or by variable metric routines)
 
int update_rule
 in case several update rules are available
 

Detailed Description

abstract interface for BoxModel for the model selection routine select_model()

Because BoxModel implements a model for an AffineMatrixTransformation given support function over the box, all subgradients are actually points inside the box (convex combinations of its extreme points).

The possibilities supported by BoxModel allow to specify a (possibly empty) subset of coordinates (box_coords) that are then bounded by their respective intervalls, together with one point (box_complvalues) contained in the box of the remaining coordinates, plus an arbitrary number of standard subgradients (nnc_model) with non negative cone coefficients (nnc_coeff). The trace constraint makes sure that the resulting point is (a nonnegative multiple box_scaleval of) a convex combination of the box representation box_model and the nnc_model.

If the coordinate subset comprises all coordinates – the full or exact model of the box – no other points are needed and no other information may be specified. In this case box_model and box_coeff have the same size as box_coords and box_coeff directly gives the coordinates of the point.

If the coordinates are a nonempty proper subset of all coordinates, the size of box_model and box_coeff is the size of box_coords plus one, where the last element of box_model holds the information of box_complvalues and the last element of box_coeff gives the scaling of the entire box, possibly as convex combination factor to the elements of nnc_model. In particular, assume gamma=box_coeff(box_coeff.rowdim()-1)>0 and let 0<=i<box_coeff.rowdim()-1 be an index into box_coords with orignial coordinate j=box_coords(i), then lb(j)<= box_coeff(i)/gamma <= ub(j) is the value of coordinate j.

It does not matter, which point is put into box_complvalues as long as the entire model together with the points in nnc_model covers the aggregate and the new candidate subgradient.

Member Function Documentation

◆ select_model()

virtual int ConicBundle::BoxModelParametersObject::select_model ( MinorantBundle box_model,
CH_Matrix_Classes::Matrix box_coeff,
CH_Matrix_Classes::Matrix box_indicators,
CH_Matrix_Classes::Indexmatrix box_coords,
CH_Matrix_Classes::Matrix box_complvalues,
MinorantBundle nnc_model,
CH_Matrix_Classes::Matrix nnc_coeff,
CH_Matrix_Classes::Matrix nnc_indicators,
const CH_Matrix_Classes::Matrix coord_switching,
const MinorantBundle minorants,
const MinorantPointer  cand_minorant,
const PrimalMatrix  cand_boxvec,
const PrimalMatrix  aggr_boxvec,
CH_Matrix_Classes::Real  aggr_scaleval,
BoxOracle oracle,
CH_Matrix_Classes::Integer  modification_id,
FunctionTask  function_task,
CH_Matrix_Classes::Real  function_factor,
BundleModel::ModelUpdate  model_update,
CH_Matrix_Classes::Integer  center_id,
const CH_Matrix_Classes::Matrix center_y,
CH_Matrix_Classes::Integer  cand_id,
const CH_Matrix_Classes::Matrix cand_y,
CH_Matrix_Classes::Real  model_maxviol,
BundleProxObject H 
)
pure virtual

BoxModel calls this for selecting the next coordinates for a specialized polyhedral model with a box part and an nnc part for aggregates, see the general explanation of the class.

There is little experience on how to do this. The current routine is minimalistic and simply uses the weighted number of switches in each coordinate between lower and upper bounds to select coordinates.

To allow maybe better choices in future implementations the arguments try to pass all potentially relevant information items.

On putput the coefficient values of the new model must be feasible and have to generate the same aggregate (the aggregate is maintained), and the new candidate minorant must be in the feasible set.

Parameters
[in,out]box_modelthe boxmodel holds the minorants describing the BoxBlock part of the model for selected coordinates and, unless exact or empty, in the last position the complement coordinates of a feasible point (e.g. aggr_boxvec)
[in,out]box_coeff
  • on input coefficients of BoxBlock determined in last BundleMethod::eval_augmodel giving rise (together with nnc_coeff) to the aggrgate,
  • on output they match the new model and still give rise to the same aggregate
[in,out]box_indicatorsindicators for activity of box minorants, indicators may but need not be maintained
[in,out]box_coordsthe coordinates selected to have their respective interval range in the model
[in,out]box_complvaluesa point with 0 in the box_coords and feasible coordinate values in the complement (if not empty)
[in,out]nnc_modelif box_model is empty, this spans at least the aggregate (if available) and the candidate (always); if box_model is not empty but not the entire box, nnc_model typically holds one of the candidate or the aggregate; if box_model is the entire box, nnc_model is empty
[in,out]nnc_coeff
  • on input coefficients of BoxBlock determined in last BundleMethod::eval_augmodel giving rise (together with box_coeff) to the aggrgate,
  • on output they match the new model and still give rise to the same aggregate
[in,out]nnc_indicatorsindicators for activity of minorants, indicators may but need not be maintained
[in]coord_switchingkeeps track of which coordinates where changing the most in the past by forming a weighted average in BoxModel::eval_function()
[in]minorantsthe vector of MinorantPointer gives additional minorants collected over time (some may be duplicates also of those in nnc_model)
[in]cand_minorantthe (eps)sugradient linear minorant returned by BoxModel::eval_function for the candidate (without function factor)
[in]cand_boxvecthe maximizer over the box for the current candidate
[in]aggr_boxvecthe primal aggregate vector in the box (without function_factor) giving rise to the aggregate; not initialized if zerodimensional
[in]aggr_scaleval0<= aggr_scalevale <= function_factor, ==function_factor if function_task==Objective_Function; the aggregate with function_factor is aggr_boxvec*aggr_scaleval;
[in]oraclegives access to lower and upper bounds of the box
[in]modification_idthe identifier of the current function version to be used in generating specialized minorants corresponding to the coordinate vectors
[in]function_tasksee FunctionTask
[in]function_factorinterpreted according to function_task and the coefficients sum up to at most this value
[in]model_updateinforms about whether cand_y is the result of a null_step or descent_step or a new set up.
[in]center_idthe identifier of the center point
[in]center_ythe center point
[in]cand_idthe identifier of the candidate point
[in]cand_ythe candidate (mostly differnt from the center), close to it the model should be good
[in]model_maxviola minorant violated by this would have caused a null step
[in]Hthe variable metric used in the proximal term (function_factor is already removed in this)
Returns
  • 0 on success
  • 1 on failure

Implemented in ConicBundle::BoxModelParameters.

Referenced by BoxModelParametersObject().


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