2 #ifndef CONICBUNDLE_QPSOLVER_HXX 3 #define CONICBUNDLE_QPSOLVER_HXX 115 class GroundsetModification;
209 int postprocess_data(
bool round_to_active_bounds);
225 {
return qp_data->
Hp->
add_Hx(xin,outplusQx);}
275 { original_data.
Hp=0;preproc_data.
Hp=0;
QPclear();}
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
bool QPis_feasible(const CH_Matrix_Classes::Matrix &y, CH_Matrix_Classes::Real relprec=1e-10)
check feasiblity of y for the current groundset constraints
CH_Matrix_Classes::Real objective_gap_eps
relative precision for QP objective termination
Definition: QPSolver.hxx:194
CH_Matrix_Classes::Real lower_bound_gap_eps
distance to lower bound termination parameter
Definition: QPSolver.hxx:192
parameters for steering the termination criteria and solution method of the solver ...
Definition: QPSolverParameters.hxx:26
QPModelBlock * model_block
stores a pointer to the current starting block giving access to the cutting model(s) [it does not own...
Definition: QPModelBlock.hxx:451
abstract interface that allows to use different -norms with a positive definite matrix in the proxi...
Definition: BundleProxObject.hxx:88
const CH_Matrix_Classes::Indexmatrix & get_rhsubind() const
returns the indices with constraint upper bound slacks
Definition: QPSolver.hxx:400
int QPresolve(CH_Matrix_Classes::Real lower_bound, CH_Matrix_Classes::Real upper_bound, CH_Matrix_Classes::Real relprec)
resolve the bundle subproblem (usually because of modified penalty parameters) so that precision requ...
CH_Matrix_Classes::Indexmatrix preproc_fixed
1 if coordinate has fixed value, 0 otherwise; dimension is (0,0) if not initialized ...
Definition: QPSolver.hxx:166
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual int QPset_solver_parameters(QPSolverParameters *params)
pass on new parameters, ownership is tranferred to this, will be deleted here
Definition: QPSolverBasicStructures.hxx:447
const CH_Matrix_Classes::Indexmatrix & QPget_rhsubind() const
QP-sover-interface routine for indices of constraint upper bound slacks.
Definition: QPSolver.hxx:243
const CH_Matrix_Classes::Matrix & QPget_lb() const
QP-solver-interface routine for variable lower bounds.
Definition: QPSolver.hxx:246
const CH_Matrix_Classes::Indexmatrix & QPget_rhslbind() const
QP-sover-interface routine for indices of constraint lower bound slacks.
Definition: QPSolver.hxx:240
CH_Matrix_Classes::Real QPget_lower_bound()
returns the current lower bound on the optimal value (if feasibility is good enough) ...
Definition: QPSolver.hxx:300
virtual CH_Matrix_Classes::Matrix & add_Hx(const CH_Matrix_Classes::Matrix &x, CH_Matrix_Classes::Matrix &outplusHx, CH_Matrix_Classes::Real alpha=1.) const =0
add to outplusHx and return this
CH_Matrix_Classes::Integer dim
dimension of the y ground set
Definition: QPSolver.hxx:130
std::ostream & QPprint_statistics(std::ostream &out, int=0)
currently it does nothing
Definition: QPSolver.hxx:336
QPSolver is the access point for ConicBundle to the internal constrained QP Solver, see Internal QP Solver for linearly constrained groundsets.
Definition: QPSolver.hxx:120
Header declaring the classes ConicBundle::QPSolverBasicInterface, ConicBundle::CentralPathPoint, ConicBundle::QPSolverBasicStructures.
int QPget_solution(CH_Matrix_Classes::Real &augval_lb, CH_Matrix_Classes::Real &augval_ub, CH_Matrix_Classes::Matrix &new_point, CH_Matrix_Classes::Real &gsaggr_offset, CH_Matrix_Classes::Matrix &gsaggr_gradient)
retrieve the solution produced (see Abstract interface for qp solvers)
Header declaring the class ConicBundle::LPGroundsetModification.
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
AffineFunctionTransformation preproc_aft
the transformation of the bundle
Definition: QPSolver.hxx:169
QPProblemData original_data
collects the original problem data and the data describing the quadratic costs
Definition: QPSolver.hxx:161
CH_Matrix_Classes::Indexmatrix rhsubindex
indices i with (Gy)(i) upper bounded (sorted increasingly, used for slacks, equations are not listed)...
Definition: QPSolver.hxx:139
CH_Matrix_Classes::Real QPget_gamma() const
QP-sover-interface routine for constant cost term.
Definition: QPSolver.hxx:231
const CH_Matrix_Classes::Matrix & get_uby() const
returns the upper bounds on y
Definition: QPSolver.hxx:379
bool QPboxconstrained(const CH_Matrix_Classes::Matrix *&lb, const CH_Matrix_Classes::Matrix *&ub, const CH_Matrix_Classes::Indexmatrix *&lbind, const CH_Matrix_Classes::Indexmatrix *&ubind) const
return true if only box constraints are present and return the present box constraints ...
Definition: QPSolver.hxx:403
BundleProxObject * Hp
points to the quadratic cost matrix inside ensure_feasibility() and candidate(), otherwise ==NULL ...
Definition: QPSolver.hxx:148
CH_Matrix_Classes::Integer rowdim() const
number of linear constraints
Definition: QPSolver.hxx:373
CH_Matrix_Classes::Matrix lby
lower bounds on y, same dim as y
Definition: QPSolver.hxx:131
CH_Matrix_Classes::Indexmatrix ubindex
indices i with y(i) upper bounded (sorted increasingly)
Definition: QPSolver.hxx:134
CH_Matrix_Classes::Integer QPget_xdim() const
QP-solver-interface routine, returns primal dimension (length of y)
Definition: QPSolver.hxx:219
bool QPprefer_UQPSolver(QPSolverProxObject *) const
returns true if, for the current constraints and the requested ProxObject, it might be better to use ...
CH_Matrix_Classes::Matrix & QPadd_Ax(const CH_Matrix_Classes::Matrix &xin, CH_Matrix_Classes::Matrix &outplusAx) const
QP-solver-interface routine for adding constraint matrix times vector.
Definition: QPSolver.hxx:258
provides the basic variables and implements basic routines for the primal dual interior point solver ...
Definition: QPSolverBasicStructures.hxx:304
in order to pass parameters to a customized QPSolverObject, derive the parameters from this object; n...
Definition: QPSolverObject.hxx:46
int determine_indices(QPProblemData &qpd)
given lby,uby,rhslb,rhsub compute lbindex,ubindex,rhslbindex,rhsubindex
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
CH_Matrix_Classes::Matrix rhsub
right hand side upper bounds
Definition: QPSolver.hxx:137
CH_Matrix_Classes::Indexmatrix preproc_indices
the sequence of original non fixed indices used in preproc_data; dimension is (0,0) if not initialize...
Definition: QPSolver.hxx:168
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
int solve(BundleProxObject *Hp, const CH_Matrix_Classes::Matrix &c, CH_Matrix_Classes::Real gamma, CH_Matrix_Classes::Real lowerbound, CH_Matrix_Classes::Real upperbound, CH_Matrix_Classes::Real relprec, CH_Matrix_Classes::Real skip_factor)
solve the quadratic problem for the given cost function and precision (without cutting model...
int QPensure_feasibility(CH_Matrix_Classes::Matrix &y, bool &ychanged, QPSolverProxObject *inHp, CH_Matrix_Classes::Real relprec=1e-10)
makes y feasible if not so, see Groundset::ensure_feasibility()
CH_Matrix_Classes::Real dual_infeasibility_eps
dual infeasibility termination parameter
Definition: QPSolver.hxx:191
CH_Matrix_Classes::Real gamma
constant offset for QP-subproblems
Definition: QPSolver.hxx:150
int mfile_data(std::ostream &out) const
output the data describing the QP in m-file style
QPProblemData * qp_data
either points to original_data or to fixing_data
Definition: QPSolver.hxx:172
const CH_Matrix_Classes::Indexmatrix & get_rhslbind() const
returns the indices with constraint lower bound slacks
Definition: QPSolver.hxx:397
bool QPsupports_yfixing()
yfixing is currently not supported, this returns false.
Definition: QPSolver.hxx:291
CH_Matrix_Classes::Real upper_bound_gap_eps
distance to upper bound termination parameter
Definition: QPSolver.hxx:193
bool QPconstrained() const
returns false if the feasible set is the entire space (unconstrained optimization), true otherwise.
Definition: QPSolver.hxx:369
GroundsetModification * QPstart_modification()
return a new modification object on the heap that is initialized for modification of *this ...
Definition: QPSolver.hxx:340
const CH_Matrix_Classes::Matrix & QPget_ub() const
QP-solver-interface routine for variable upper bounds.
Definition: QPSolver.hxx:249
CH_Matrix_Classes::Matrix y
dual variables to the affine constraints
Definition: QPSolverBasicStructures.hxx:310
int preprocess_data(const CH_Matrix_Classes::Matrix ¢er_y, CH_Matrix_Classes::Indexmatrix *yfixed, bool &no_changes)
initialize preproc_data for
const CH_Matrix_Classes::Matrix & get_lby() const
returns the lower bounds on y
Definition: QPSolver.hxx:376
int QPapply_modification(const GroundsetModification &mdf)
groundset changes are communicated to the solver here
void set_cbout(const CBout *cb, int incr=-1)
set output settings
Definition: QPSolver.hxx:422
Matrix class for real values of type Real
Definition: matrix.hxx:74
CH_Matrix_Classes::Matrix preproc_fixedval
if fixed it gives the value the coordinate is fixed to, otherwise the value is zero ...
Definition: QPSolver.hxx:167
const CH_Matrix_Classes::Indexmatrix & get_ubindex() const
returns the indices of variable lower bounds < ConicBundle::CB_plus_infinity
Definition: QPSolver.hxx:385
Collects modifications for the linearly constrained LPGroundset for appending, deleting or reassignin...
Definition: LPGroundsetModification.hxx:32
QPSolver(CBout *cb=0, int cbinc=-1)
default constructor
Definition: QPSolver.hxx:273
const CH_Matrix_Classes::Matrix & QPget_rhslb() const
QP-sover-interface routine for constraint lower bounds.
Definition: QPSolver.hxx:234
std::ostream * out
not output at all if out==0, otherwise use this output stream
Definition: CBout.hxx:33
CH_Matrix_Classes::Matrix c
linear cost term for QP-subproblems
Definition: QPSolver.hxx:149
Matrix class of sparse matrices with real values of type Real
Definition: sparsmat.hxx:74
CH_Matrix_Classes::Sparsemat A
feasible set is lby<=y<=uby with rhslb<=Ay<=rhsub
Definition: QPSolver.hxx:135
CH_Matrix_Classes::Indexmatrix lbindex
indices i with y(i) lower bounded (sorted increasingly)
Definition: QPSolver.hxx:133
int QPset_parameters(QPSolverParametersObject *params)
check whether the parameters are QPSolverParameters and set them if so
Definition: QPSolver.hxx:282
std::map< MinorantPointer, MinorantPointer > preproc_bundle_projection
stores the transformed minorants of the bundle
Definition: QPSolver.hxx:170
const CH_Matrix_Classes::Sparsemat & get_A() const
returns the constraint matrix of the feasible set
Definition: QPSolver.hxx:388
const CH_Matrix_Classes::Indexmatrix & QPget_lbind() const
QP-solver-interface routine for indices of variable lower bounds > ConicBundle::CB_minus_infinity.
Definition: QPSolver.hxx:252
this class facilitates switching between original data and preprocessed data that removes fixed varia...
Definition: QPSolver.hxx:125
const CH_Matrix_Classes::Matrix & get_rhsub() const
returns the constraint upper bounds
Definition: QPSolver.hxx:394
CH_Matrix_Classes::Integer QPget_ydim() const
QP-solver-interface routine, returns primal dimension (length of y)
Definition: QPSolver.hxx:221
virtual CH_Matrix_Classes::Real QPget_dualval() const
after QPIsolve, retrieve the dual objective value (quadratic and dual variables)
Definition: QPSolverBasicStructures.hxx:481
Integer rowdim() const
returns the row dimension
Definition: indexmat.hxx:321
const CH_Matrix_Classes::Indexmatrix & QPget_ubind() const
QP-solver-interface routine for indices of variable upper < ConicBundle::CB_plus_infinity.
Definition: QPSolver.hxx:255
CH_Matrix_Classes::Matrix groundset_c
linear cost term of the groundset
Definition: QPSolver.hxx:152
CH_Matrix_Classes::Matrix uby
upper bounds on y, same dim as y
Definition: QPSolver.hxx:132
const CH_Matrix_Classes::Indexmatrix & get_lbindex() const
returns the indices of variable lower bounds > ConicBundle::CB_minus_infinity
Definition: QPSolver.hxx:382
int QPupdate(const CH_Matrix_Classes::Matrix ¢er_y, CH_Matrix_Classes::Real lower_bound, CH_Matrix_Classes::Real upper_bound, CH_Matrix_Classes::Real relprec, QPSolverProxObject *Hp, const MinorantPointer &gs_aggr, CH_Matrix_Classes::Indexmatrix *yfixed, const MinorantPointer &delta_gs_aggr, const CH_Matrix_Classes::Indexmatrix &delta_index)
solve the bundle subproblem for updated box multipliers so that precision requirements are met (see A...
const CH_Matrix_Classes::Matrix & QPget_rhsub() const
QP-sover-interface routine for constraint upper bounds.
Definition: QPSolver.hxx:237
Indexmatrix & genmult(const Indexmatrix &A, const Indexmatrix &B, Indexmatrix &C, Integer alpha=1, Integer beta=0, int atrans=0, int btrans=0)
returns C=beta*C+alpha*A*B, where A and B may be transposed; C must not be equal to A and B; if beta=...
Collects modifications for the unconstrained Groundset for appending, deleting or reassigning variabl...
Definition: GroundsetModification.hxx:32
const CH_Matrix_Classes::Matrix & get_rhslb() const
returns the constraint lower bounds
Definition: QPSolver.hxx:391
const CH_Matrix_Classes::Matrix & QPget_c() const
QP-sover-interface routine for linear cost term.
Definition: QPSolver.hxx:228
CH_Matrix_Classes::Real primal_infeasibility_eps
primal infeasibility termination parameter
Definition: QPSolver.hxx:190
QPProblemData preproc_data
collects the preprocessed problem data (some fixed variables may be eliminated) and the data describi...
Definition: QPSolver.hxx:164
CH_Matrix_Classes::Real groundset_gamma
constant offset of the groundset
Definition: QPSolver.hxx:153
int QPsolve(const CH_Matrix_Classes::Matrix ¢er_y, CH_Matrix_Classes::Real lower_bound, CH_Matrix_Classes::Real upper_bound, CH_Matrix_Classes::Real relprec, QPSolverProxObject *Hp, const MinorantPointer &gs_aggr, CH_Matrix_Classes::Indexmatrix *yfixed)
solve the current bundle subproblem so that precision requirements are met (see Abstract interface fo...
Integer rowdim() const
returns the row dimension
Definition: sparsmat.hxx:199
points to MinorantUseData that may be shared by many and allows computations with Minorants ...
Definition: MinorantPointer.hxx:34
CH_Matrix_Classes::Indexmatrix rhslbindex
indices i with (Gy)(i) lower bounded (sorted increasingly; used for slacks, equations are not listed)...
Definition: QPSolver.hxx:138
CH_Matrix_Classes::Matrix rhslb
right hand side lower bounds
Definition: QPSolver.hxx:136
CH_Matrix_Classes::Matrix & QPadd_Aty(const CH_Matrix_Classes::Matrix &yin, CH_Matrix_Classes::Matrix &outplusAty) const
QP-solver-interface routine for adding transposed constraint matrix times vector. ...
Definition: QPSolver.hxx:262
virtual void set_cbout(const CBout *cb, int incr=-1)
Specifies the output level relative to the given CBout class.
Header declaring the class ConicBundle::Groundset.
void QPclear()
(re)initialize to empty
in order to pass a ConicBundle::BundleProxObject, see Quadratic Proximal Terms, to a custzomized QPSo...
Definition: QPSolverObject.hxx:55
virtual bool QPsupports_updates()
return true iff the code supports QPupdate(), i.e., it supports external updates of the groundset agg...
Definition: QPSolver.hxx:296
CH_Matrix_Classes::Matrix & QPadd_Qx(const CH_Matrix_Classes::Matrix &xin, CH_Matrix_Classes::Matrix &outplusQx) const
QP-solver-interface routine for adding quadratic matrix times vector.
Definition: QPSolver.hxx:224