ConicBundle
|
abstract interface extension of QPModelDataObject to allow uniform generation of tuned quadratic solver model blocks in model forming routines for specializd oracles More...
#include <QPModelDataObject.hxx>
Public Member Functions | |
QPConeModelDataObject (CBout *cb=0, int cbinc=-1) | |
default constructor | |
virtual | ~QPConeModelDataObject () |
virtual destructor | |
virtual int | init (const MinorantPointer &constant_minorant, const MinorantBundle &bundle, CH_Matrix_Classes::Integer nncdim, const CH_Matrix_Classes::Indexmatrix &socdim, const CH_Matrix_Classes::Indexmatrix &pscdim, const CH_Matrix_Classes::Matrix &box_lb, const CH_Matrix_Classes::Matrix &box_ub, CH_Matrix_Classes::Real rhs_trace, FunctionTask ft, QPModelOracleDataObject *oracle_data=0, bool scale_box=true)=0 |
set the model data of the current local model, only positive trace values are allowed More... | |
virtual int | adjust_trace (CH_Matrix_Classes::Real next_rhs_trace)=0 |
only positive trace values are allowed, this | |
virtual CH_Matrix_Classes::Real | evaluate_trace () const =0 |
after the bundle subpolbem is sovled returns the sum of the trace values of x of the local model | |
virtual int | get_nncx (CH_Matrix_Classes::Matrix &nncx, CH_Matrix_Classes::Matrix *nncx_activity=0, bool cautious=false)=0 |
after the bundle subproblem is solved, this retrieves the local nonnegative cone solution vector; if nncx_activity is set, the return values between zero and one indicate the guess on the coefficients activity level | |
virtual int | get_socx (CH_Matrix_Classes::Integer i, CH_Matrix_Classes::Matrix &socx, CH_Matrix_Classes::Real *socx_activity=0, bool cautious=false)=0 |
after the bundle subproblem is solved, this retrieves the local soc solution vector i; if socx_activity is set, the return value between zero and one indicates the guess on the activity level | |
virtual int | get_pscx (CH_Matrix_Classes::Integer i, CH_Matrix_Classes::Matrix &pscx_eigs, CH_Matrix_Classes::Matrix &pscx_vecs, CH_Matrix_Classes::Real &pscx_growthrate, CH_Matrix_Classes::Matrix &pscx_primalgrowth, CH_Matrix_Classes::Matrix &pscx_dualgrowth)=0 |
after the bundle subproblem is solved, this retrieves the local psc solution i as eigenvalue factorization; the growthrate is <x,z>/<x^⁻,z^->, where x^- and z^- refer to the previous and x, z to the current. | |
virtual int | get_boxx (CH_Matrix_Classes::Matrix &x, CH_Matrix_Classes::Matrix *x_activity=0, bool cautious=false)=0 |
after the bundle subproblem is solved, this retrieves the local box solution vector; if boxx_activity is set, the values between zero and one indicate the guess on the coefficients activity level | |
virtual CH_Matrix_Classes::Real | tracedual (CH_Matrix_Classes::Real *prec=0) const =0 |
after the bundle subproblem is solved, this returns the dual variable to the trace constraint which yields an upper bound to the model value for the local model without the constant minorant; if prec is given, the termination precision used in its computation (here typically the current value of the barrier parameter) is returned here | |
Public Member Functions inherited from ConicBundle::QPModelDataObject | |
virtual void | clear ()=0 |
clear | |
QPModelDataObject (CBout *cb=0, int cbinc=-1) | |
default constructor | |
virtual | ~QPModelDataObject () |
virtual destructor | |
virtual const MinorantPointer & | get_constant_minorant () const =0 |
gives reading access to a constant offset minorant | |
virtual const MinorantBundle & | get_bundle () const =0 |
gives reading access to the (possibly transformed) bundle minorants of the cutting model | |
virtual MinorantPointer & | get_constant_minorant ()=0 |
gives access to a constant offset minorant | |
virtual MinorantBundle & | get_bundle ()=0 |
gives access to the bundle minorants of the cutting model so that an AffineFunctionsTransformation and similar can be applied | |
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)=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. More... | |
virtual int | pop_aft ()=0 |
undo the top push_aft this | |
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 | |
abstract interface extension of QPModelDataObject to allow uniform generation of tuned quadratic solver model blocks in model forming routines for specializd oracles
|
pure virtual |
set the model data of the current local model, only positive trace values are allowed
[in] | constant_minorant | serves as a common offset for all minorants, may be empty |
[in] | bundle | the minorant information (not necessarily all feasible minorants by themselves); the sequence must match the sequence of the variables in the nonempty cones and box bounds in the argument list. The linear combination of this minorant information by feasible conic variable settings observing the trace constraint must give rise to a valid minorant (-> the "aggregate") of the underlying convex function. |
[in] | nncdim | the dimension of the nonnegative cone; together with the trace constraint restricting the value of the sum of the single variables this typically models convex combinations of minorants. |
[in] | socdim | a vector giving the dimensions of the second order cone variables to be used in this sequence. |
[in] | pscdim | a vector giving the order of the positive semidefinite matrix variables. In this sequence each matrix variable X of order n has to have a matching sequence of n*(n+1)/2 items in bundle, the orderinig within being as in CH_Matrix_Classes::svec(). |
[in] | box_lb | the vector specifies the lower bounds (with matching upper bounds in box_ub) of a corresponding sequence of box constrained variables |
[in] | box_ub | the vector specifies the upper bounds (with matching lower bounds in box_lb) of a corresponding sequence of box constrained variables |
[in] | rhs_trace | a positive value specifiying the right hand side of the trace constraint (if present), i.e., the sum of the NNC-variables, the 0-indexed entries of the SOC vectors, the diagonal entries of the PSC matrix variables, and one common mulitplicative factor variable for jointly scaling the values of box_lb and box_ub (this implicit variable scales the size of the box if there is one). |
[in] | ft | if the value is ObjectiveFunction, the trace constraint is used as equality constraint and the rhs_value serves as a function factor. Otherwise the trace constraint is used as in inequality constraint with an additional slack variable; this models a variable function factor between 0 and rhs_trace, so that the function is used as penalty function with penalty value rhs_trace. |
[in] | oracle_data | Some QP solvers may be able to exploit direct access to the oracle or some other additional data for improving their performance. If this is the case, this allows to pass such information. The object pointed to has to stay valid throughout the solution process of this QP subproblem and will not be destroyed here. |
[in] | scale_box | this variable is only used if the box dimension is not zero and all other cones have dimension zero. In this case, scale_box==true allows the box to be scaled whereas scale_box==false fixes the common scaling variable of box_lb and box_ub to rhs_trace, in this case there is no trace constraint. |
Implemented in ConicBundle::QPConeModelBlock, and ConicBundle::UQPConeModelBlock.