ConicBundle
Public Member Functions | Protected Attributes | List of all members
ConicBundle::UQPModelBlock Class Reference

combines and provides basic functionalities of QPModelDataObject and UQPModelBlockObject, but is still abstract More...

#include <UQPModelBlock.hxx>

Inheritance diagram for ConicBundle::UQPModelBlock:
ConicBundle::QPModelDataObject ConicBundle::UQPModelBlockObject ConicBundle::CBout ConicBundle::UQPConeModelBlock ConicBundle::UQPSumModelBlock

Public Member Functions

void clear ()
 reset to "empty/no" model information
 
 UQPModelBlock (CBout *cb=0, int cbinc=-1)
 default constructor
 
virtual ~UQPModelBlock ()
 vritual destructor
 
virtual const MinorantPointerget_constant_minorant () const
 gives reading access to a constant offset minorant
 
virtual const MinorantBundleget_bundle () const
 gives reading access to the bundle minorants of the cutting model
 
virtual MinorantPointerget_constant_minorant ()
 gives access to a constant offset minorant
 
virtual MinorantBundleget_bundle ()
 gives access to the bundle minorants of the cutting model
 
virtual int push_aft (const AffineFunctionTransformation *inaft, const CH_Matrix_Classes::Indexmatrix *global_indices, const CH_Matrix_Classes::Indexmatrix *local_indices, std::map< MinorantPointer, MinorantPointer > *precomputed=0)
 applies the AffineFunctionTransformation to constant_minorant and bundle, where (if given) only the global_indices of the transformed subgradients are required which need the local_indices only. If precomputed is given, it may contain some or contains afterwards a map from original minorant to transformed minorant; retunrs 0 on success
 
virtual int pop_aft ()
 undo the last push_aft
 
- Public Member Functions inherited from ConicBundle::QPModelDataObject
 QPModelDataObject (CBout *cb=0, int cbinc=-1)
 default constructor
 
virtual ~QPModelDataObject ()
 virtual destructor
 
virtual int add_modelx_aggregate (CH_Matrix_Classes::Real &offset, CH_Matrix_Classes::Matrix &gradient)=0
 this routine is added here mainly to allow for comperative testing; for the current value of x it adds the aggregate minorant (offset and gradient) to the arguments. Caution: the bundle used might have been modified by AffineFuncitonTransformations and need not be the same as initialized with.
 
- 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::UQPModelBlockObject
virtual ~UQPModelBlockObject ()
 virtual destructor
 
virtual CH_Matrix_Classes::Integer xdim () const =0
 dimension of externally visible primal variables
 
virtual CH_Matrix_Classes::Integer ydim () const =0
 dimension of externally visible dual variables
 
virtual int set_qp_xstart (CH_Matrix_Classes::Integer x_start_index)=0
 the indices of the local variables correspond to the indices of the qp variables x and z starting with this index; returns 0 on success, 1 on failure
 
virtual int set_qp_ystart (CH_Matrix_Classes::Integer y_start_index)=0
 the indices of the local variables correspond to the indices of the qp variables y starting with this index; returns 0 on success, 1 on failure
 
virtual int starting_x (CH_Matrix_Classes::Matrix &qp_x)=0
 generate a strictly feasible primal starting point, store it in the qpx_range of x; returns 0 on success, 1 on failure
 
virtual int starting_y (CH_Matrix_Classes::Matrix &qp_y, const CH_Matrix_Classes::Matrix &qp_Qx, const CH_Matrix_Classes::Matrix &qp_c)=0
 generate a strictly feasible dual starting point, store it in the qpy_range of y, x is fixed already by a previous call to starting_x and Qx=Q*x; returns 0 on success, 1 on failure
 
virtual CH_Matrix_Classes::Real get_local_primalcost () const =0
 returns the current local primal cost contribution <d,s>
 
virtual CH_Matrix_Classes::Real get_local_dualcost () const =0
 returns the current local dual cost contribution
 
virtual int get_Ab (CH_Matrix_Classes::Matrix &qp_A, CH_Matrix_Classes::Matrix &qp_b) const =0
 store the local coefficients of matrices A and b in the positions corresponding to qpy_range (rows) and qpx_range (columns); returns 0 on success, 1 on failure
 
virtual int restart_x (CH_Matrix_Classes::Matrix &qp_x, const CH_Matrix_Classes::Matrix &qp_c, const CH_Matrix_Classes::Matrix &qp_dc)=0
 it is assumed that the problem was solved already once and is now resolved for a new linear cost term qp_c that resulted from the old one by adding qp_dc. More...
 
virtual int restart_y (CH_Matrix_Classes::Matrix &qp_y, const CH_Matrix_Classes::Matrix &qp_Qx, const CH_Matrix_Classes::Matrix &qp_c, const CH_Matrix_Classes::Matrix &qp_dc)=0
 this is called after restart_x (see there) More...
 
virtual int add_xinv_kron_z (CH_Matrix_Classes::Symmatrix &barQ)=0
 add the system term corresponding to (xinv kron z) (that arises from solving the linearized perturbed complementarity system x*z =0 or =mu*I for dx in the preferred search direction) to the diagonal block corresponding to qpx_range x qpx_range
 
virtual int add_local_sys (CH_Matrix_Classes::Symmatrix &sysdy, CH_Matrix_Classes::Matrix &rhs)=0
 add the local system informatoin More...
 
virtual int suggest_mu (CH_Matrix_Classes::Real &ip_xz, CH_Matrix_Classes::Integer &mu_dim, CH_Matrix_Classes::Real &sigma, const CH_Matrix_Classes::Matrix &qp_dx, const CH_Matrix_Classes::Matrix &qp_dy, const CH_Matrix_Classes::Matrix &rhs_residual)=0
 supply the information for the choice of the next barrier parameter value More...
 
virtual int get_corr (CH_Matrix_Classes::Matrix &xcorr, CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Real mu)=0
 supply the information for the corrector More...
 
virtual int line_search (CH_Matrix_Classes::Real &alpha, const CH_Matrix_Classes::Matrix &qp_dx, const CH_Matrix_Classes::Matrix &qp_dy, const CH_Matrix_Classes::Matrix &rhs_residual)=0
 perform a line search for the block variables More...
 
virtual int set_point (const CH_Matrix_Classes::Matrix &qp_x, const CH_Matrix_Classes::Matrix &qp_y, CH_Matrix_Classes::Real alpha)=0
 x,y,z is the new point and has to be stored, alpha is the step size used in the step, it is passed so thatthe block can take the same step for internal variables if needed.
 
virtual CH_Matrix_Classes::Matrixadd_Bs (CH_Matrix_Classes::Matrix &qp_vec) const =0
 add the local product of matrices B and s in the positions corresponding to qpy_range (rows) and return qp_vec; returns 0 on success, 1 on failure
 
virtual CH_Matrix_Classes::Matrixsubtract_z (CH_Matrix_Classes::Matrix &dual_residual, bool with_step=false) const =0
 add the contributions of the dual slacks and return dual_residual returns 0 on success, 1 on failure
 

Protected Attributes

std::vector< MinorantPointerconstant_minorant
 constant offset minorant (fixed affine function to be added to the model)
 
std::vector< MinorantBundlebundle
 the minorants forming the cutting model; how to combine them is described in derived classes
 

Detailed Description

combines and provides basic functionalities of QPModelDataObject and UQPModelBlockObject, but is still abstract

This class serves as a base class for actual implementations of the models and provides some basic variables and functionalities required for uniform use by BundleModel and QPSolver.

In particular it provides storage for and access to the bundle (and possibly an additional constant minorant) of the underlying cutting model(s). It also ensures consistent handling of each AffineFunctionTransformation of this data. It might be worth to consider to collect the transformations and not to execute them at once, but direct execution of these transformations is the current approach.

Actual implementations are UQPSumModelBlock (for managing the sum of several model blocks) and UQPConeModelBlock.


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