ConicBundle
Public Member Functions | Private Attributes | List of all members
ConicBundle::UQPSumModelBlock Class Reference

implements a (virtual) cutting model being built of a (possibly recursive) sum of UQPModelBlock cutting model instances for UQPSolver More...

#include <UQPSumModelBlock.hxx>

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

Public Member Functions

void clear ()
 reset to "empty/no" model
 
 UQPSumModelBlock (CBout *cb=0, int incr=-1)
 default constructor
 
 ~UQPSumModelBlock ()
 virtual destructor
 
int append (QPModelDataObject *inblock)
 add another model at the end of the list
 
CH_Matrix_Classes::Integer xdim () const
 sum of all xdim of the sublocks
 
CH_Matrix_Classes::Integer ydim () const
 sum of all ydim of the sublocks
 
int set_qp_xstart (CH_Matrix_Classes::Integer x_start_index)
 set the starting index of x also for all subblocks
 
int set_qp_ystart (CH_Matrix_Classes::Integer y_start_index)
 set the starting index of y also for all subblocks
 
int starting_x (CH_Matrix_Classes::Matrix &qp_x)
 get the starting x of all subblocks
 
int starting_y (CH_Matrix_Classes::Matrix &qp_y, const CH_Matrix_Classes::Matrix &qp_Qx, const CH_Matrix_Classes::Matrix &qp_c)
 get the starting y information of all subblocks
 
CH_Matrix_Classes::Real get_local_primalcost () const
 get joint primalcost of all subblocks
 
CH_Matrix_Classes::Real get_local_dualcost () const
 get joint dualcost of all subblocks
 
int get_Ab (CH_Matrix_Classes::Matrix &qp_A, CH_Matrix_Classes::Matrix &qp_b) const
 get the A matrix of all subblocks and store it consistently
 
int restart_x (CH_Matrix_Classes::Matrix &qp_x, const CH_Matrix_Classes::Matrix &qp_c, const CH_Matrix_Classes::Matrix &qp_dc)
 get a good restarting x of all subblocks for this change in costs
 
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)
 get a good restarting y of all subblocks for this change in costs
 
int add_xinv_kron_z (CH_Matrix_Classes::Symmatrix &barQ)
 add this for all subblocks
 
int add_local_sys (CH_Matrix_Classes::Symmatrix &sysdy, CH_Matrix_Classes::Matrix &rhs)
 add this for all subblocks
 
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)
 get this from all subblocks
 
int get_corr (CH_Matrix_Classes::Matrix &xcorr, CH_Matrix_Classes::Matrix &rhs, CH_Matrix_Classes::Real mu)
 get this from all subblocks
 
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)
 get/do this from/for all subblocks
 
int set_point (const CH_Matrix_Classes::Matrix &qp_x, const CH_Matrix_Classes::Matrix &qp_y, CH_Matrix_Classes::Real alpha)
 do this for all subblocks
 
int add_modelx_aggregate (CH_Matrix_Classes::Real &offset, CH_Matrix_Classes::Matrix &gradient)
 do this for all subblocks
 
void set_out (std::ostream *o=0, int pril=1)
 do this for all subblocks
 
void set_cbout (const CBout *cb, int incr=-1)
 do this for all subblocks
 
CH_Matrix_Classes::Matrixadd_Bs (CH_Matrix_Classes::Matrix &qp_vec) const
 do this for all subblocks
 
CH_Matrix_Classes::Matrixsubtract_z (CH_Matrix_Classes::Matrix &dual_residual, bool with_step=false) const
 do this for all subblocks
 
- Public Member Functions inherited from ConicBundle::QPSumModelDataObject
 QPSumModelDataObject (CBout *cb=0, int cbinc=-1)
 default constructor
 
virtual ~QPSumModelDataObject ()
 virtual destructor
 
- Public Member Functions inherited from ConicBundle::QPModelDataObject
 QPModelDataObject (CBout *cb=0, int cbinc=-1)
 default constructor
 
virtual ~QPModelDataObject ()
 virtual destructor
 
- Public Member Functions inherited from ConicBundle::CBout
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::UQPModelBlock
 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::UQPModelBlockObject
virtual ~UQPModelBlockObject ()
 virtual destructor
 

Private Attributes

std::vector< UQPModelBlock * > blocks
 the container pointing to the UQPModelBlock instances comprised in the sum
 
CH_Matrix_Classes::Integer xstart
 starting index of the x variables subsumed here within the globale vector x
 
CH_Matrix_Classes::Integer xend
 ending index of local x
 
CH_Matrix_Classes::Integer ystart
 starting index of the y variables subsumed here within the globale vector y
 
CH_Matrix_Classes::Integer yend
 ending index of local y
 

Additional Inherited Members

- Protected Attributes inherited from ConicBundle::UQPModelBlock
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

implements a (virtual) cutting model being built of a (possibly recursive) sum of UQPModelBlock cutting model instances for UQPSolver

Note, the bundle at the final level might not be the same as the one in the recursive calls, because it might have undergone an AffineFunctionTransformation.

Not much is happening here besides passing on the calls to the various submodels with information on where to find its own (possibly transformed) bundle information and where to store the requested information in respective global objects


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