2 #ifndef CONICBUNDLE_QPSOLVERBASICSTRUCTURES_HXX 3 #define CONICBUNDLE_QPSOLVERBASICSTRUCTURES_HXX 18 #include "SOCIPProxBlock.hxx" 245 x(ix),y(iy),s(is),zlb(izlb),zub(izub),rhszlb(irhszlb),rhszub(irhszub),mu(imu){}
383 int QPcompute_values(
bool init);
448 {assert(params);
if(params!=0){
delete paramsp;paramsp=params;}
return 0;}
464 {assert(startzlb.
dim()==
QPget_xdim()); zlb=startzlb;
return 0;}
468 {assert(startzub.
dim()==
QPget_xdim()); zub=startzub;
return 0;}
472 {mu=startmu;
return 0;}
CH_Matrix_Classes::Matrix soly
last solution to the KKT system (dual Newton step)
Definition: QPSolverBasicStructures.hxx:367
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
CH_Matrix_Classes::Matrix zlb
dual variables to the lower bounds on the primal variables
Definition: QPSolverBasicStructures.hxx:312
abstract interface for a QPSolver
Definition: QPSolverObject.hxx:105
virtual CH_Matrix_Classes::Integer QPget_ydim() const =0
dimension of the dual variables to the linear constraints (number of rows of A)
CH_Matrix_Classes::Real last_alpha
step size of the previous step
Definition: QPSolverBasicStructures.hxx:325
parameters for steering the termination criteria and solution method of the solver ...
Definition: QPSolverParameters.hxx:26
CH_Matrix_Classes::Matrix old_rhszlb
old dual variables to the lower bounds on the constraints
Definition: QPSolverBasicStructures.hxx:374
CH_Matrix_Classes::Real last_mu
barrier parameter of the previous step
Definition: QPSolverBasicStructures.hxx:319
CH_Matrix_Classes::Real old_mu
old barrier parameter
Definition: QPSolverBasicStructures.hxx:376
virtual CH_Matrix_Classes::Real QPget_mu() const
return the current value of the barrier parameter mu
Definition: QPSolverBasicStructures.hxx:522
virtual int QPset_startzub(const CH_Matrix_Classes::Matrix &startub)=0
set a starting value for the dual variables of the upper bounds on the quadratic variables ...
CH_Matrix_Classes::Matrix shortzub
ub duals condensed on indices with finite variable bounds
Definition: QPSolverBasicStructures.hxx:347
virtual CH_Matrix_Classes::Real QPget_primalval() const =0
after QPIsolve, retrieve the primal objective value (of the quadratic variables)
CH_Matrix_Classes::Matrix old_s
old slack variables to the affine constraints
Definition: QPSolverBasicStructures.hxx:371
CH_Matrix_Classes::Matrix rhszlb
dual variables to the lower bounds on the constraints
Definition: QPSolverBasicStructures.hxx:314
virtual const CH_Matrix_Classes::Matrix & QPget_rhslb() const =0
returns rhslb of rhslb <= Ax
CH_Matrix_Classes::Matrix rhszlb
dual to lower bound on constraints
Definition: QPSolverBasicStructures.hxx:205
virtual int QPset_startzlb(const CH_Matrix_Classes::Matrix &startzlb)
set a starting value for the dual variables of the lower bounds on the quadratic variables ...
Definition: QPSolverBasicStructures.hxx:463
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
virtual void QPIclear()=0
reset all values of the internal basic structures and variables
QPCentralPathPoint & operator=(const QPCentralPathPoint &ppp)
assignment operator
Definition: QPSolverBasicStructures.hxx:214
virtual const CH_Matrix_Classes::Matrix & QPget_zub() const
return the current value of the dual variables to the upper bounds of the quadratic variables (after ...
Definition: QPSolverBasicStructures.hxx:500
CH_Matrix_Classes::Matrix x
quadratic variable
Definition: QPSolverBasicStructures.hxx:190
CH_Matrix_Classes::Matrix old_y
old dual variables to the affine constraints
Definition: QPSolverBasicStructures.hxx:370
virtual const CH_Matrix_Classes::Matrix & QPget_y() const
return the current value of the dual variables to the constraints (after a successful QPIsolve the op...
Definition: QPSolverBasicStructures.hxx:494
virtual const CH_Matrix_Classes::Matrix & QPget_rhsub() const =0
returns rhsub of Ax <= rhsub
CH_Matrix_Classes::Matrix dshortzub
step for shortzub
Definition: QPSolverBasicStructures.hxx:357
CH_Matrix_Classes::Matrix x
quadratic (primal) variables
Definition: QPSolverBasicStructures.hxx:309
CH_Tools::Microseconds QPcurrentprecprep_time
time spent in preparing the preconditioner
Definition: QPSolverBasicStructures.hxx:429
virtual CH_Matrix_Classes::Matrix & QPadd_Aty(const CH_Matrix_Classes::Matrix &yin, CH_Matrix_Classes::Matrix &outplusAty) const =0
outplusAty += transpose(A) * yin
Matrix class for integral values of type Integer
Definition: indexmat.hxx:195
virtual int QPset_startmu(CH_Matrix_Classes::Real startmu)
set a starting value for the barrier parameter mu
Definition: QPSolverBasicStructures.hxx:471
CH_Matrix_Classes::Matrix dshortzlb
step for shortslb
Definition: QPSolverBasicStructures.hxx:356
void dim(Integer &_nr, Integer &_nc) const
returns the number of rows in _nr and the number of columns in _nc
Definition: matrix.hxx:209
CH_Matrix_Classes::Matrix dslackub
step for dslackub
Definition: QPSolverBasicStructures.hxx:359
virtual const CH_Matrix_Classes::Matrix & QPget_s() const =0
return the current value of the slack variables of the constraints (after a successful QPIsolve the o...
CH_Matrix_Classes::Matrix drhsslacklb
step for rhsslacklb
Definition: QPSolverBasicStructures.hxx:363
virtual int QPset_startx(const CH_Matrix_Classes::Matrix &startx)
set a starting value for the quadratic variables
Definition: QPSolverBasicStructures.hxx:451
virtual const CH_Matrix_Classes::Matrix & QPget_rhszlb() const =0
return the current value of the dual variables to the lower bounds of the constraints (after a succes...
virtual ~QPSolverBasicInterface()
virtual destructor
currently not in use, storing the points of the central path might help to restart faster if only the...
Definition: QPSolverBasicStructures.hxx:186
virtual QPSolverParameters * QPget_parameters() const
return the current parameters for potential modification (do not delete!)
Definition: QPSolverBasicStructures.hxx:484
CH_Tools::Microseconds QP_time
time spent in preparing the preconditioner
Definition: QPSolverBasicStructures.hxx:434
CH_Matrix_Classes::Matrix zub
dual variables to the upper bounds on the primal variables
Definition: QPSolverBasicStructures.hxx:313
virtual const CH_Matrix_Classes::Indexmatrix & QPget_lbind() const =0
returns the indices where lb is not minus infinity (sorted increasingly)
CH_Matrix_Classes::Integer iter
counts the number of iterations/steps
Definition: QPSolverBasicStructures.hxx:329
CH_Matrix_Classes::Real primalval
primal objective value (if feasible)
Definition: QPSolverBasicStructures.hxx:334
CH_Tools::Microseconds QPprecprepmodel_time
time spent in preparing the preconditioner
Definition: QPSolverBasicStructures.hxx:431
virtual const CH_Matrix_Classes::Indexmatrix & QPget_rhslbind() const =0
returns the indices where rhslb is not minus infinity (sorted increasingly)
CH_Tools::Microseconds QPprecprep_time
time spent in preparing the preconditioner
Definition: QPSolverBasicStructures.hxx:430
CH_Matrix_Classes::Matrix y
dual variable
Definition: QPSolverBasicStructures.hxx:193
CH_Matrix_Classes::Matrix shortrhszlb
lb duals condensed on indices with finite constraint bounds
Definition: QPSolverBasicStructures.hxx:351
CH_Matrix_Classes::Matrix rhsslackub
slack to constraint upper bounds
Definition: QPSolverBasicStructures.hxx:354
QPCentralPathPoint(const CH_Matrix_Classes::Matrix &ix, const CH_Matrix_Classes::Matrix &iy, const CH_Matrix_Classes::Matrix &is, const CH_Matrix_Classes::Matrix &izlb, const CH_Matrix_Classes::Matrix &izub, const CH_Matrix_Classes::Matrix &irhszlb, const CH_Matrix_Classes::Matrix &irhszub, const CH_Matrix_Classes::Real imu)
initialization constructor
Definition: QPSolverBasicStructures.hxx:235
virtual const CH_Matrix_Classes::Matrix & QPget_c() const =0
returns the linear cost vector for the quadratic variable x
provides the basic variables and implements basic routines for the primal dual interior point solver ...
Definition: QPSolverBasicStructures.hxx:304
virtual CH_Matrix_Classes::Real QPget_mu() const =0
return the current value of the barrier parameter mu
virtual int QPset_startmu(CH_Matrix_Classes::Real startmu)=0
set a starting value for the barrier parameter mu
virtual const CH_Matrix_Classes::Matrix & QPget_rhszub() const =0
return the current value of the dual variables to the upper bounds of the constraints (after a succes...
conic bundle method solver for sum of convex functions. See the ConicBundle_Manual for a quick introd...
Definition: CBSolver.hxx:22
virtual const CH_Matrix_Classes::Matrix & QPget_rhszub() const
return the current value of the dual variables to the upper bounds of the constraints (after a succes...
Definition: QPSolverBasicStructures.hxx:513
defines the abstract interface for QPSolverBasicStructures that the basic routines there need to acce...
Definition: QPSolverBasicStructures.hxx:57
base class for uniform use of WARNINGS and ERRORS (at some point in time)
Definition: CBout.hxx:30
CH_Tools::Microseconds QPpredictor_time
time spent in computing predictor
Definition: QPSolverBasicStructures.hxx:426
virtual int QPset_starts(const CH_Matrix_Classes::Matrix &starts)=0
set a starting value for the slack variables of the constraints
CH_Matrix_Classes::Real mu
barrier parameter
Definition: QPSolverBasicStructures.hxx:211
CH_Tools::Microseconds QPprecsolve_time
time spent in preconditioning solves
Definition: QPSolverBasicStructures.hxx:432
CH_Matrix_Classes::Matrix dshortrhszlb
step for shortrhszlb
Definition: QPSolverBasicStructures.hxx:361
CH_Matrix_Classes::Real n2yviol
Euclidean norm of yviol.
Definition: QPSolverBasicStructures.hxx:344
virtual CH_Matrix_Classes::Integer QPget_large_predictor_cnt() const
return the number of iterations where predictor promises large progress but the barrier parameter is ...
Definition: QPSolverBasicStructures.hxx:525
CH_Matrix_Classes::Matrix old_zub
old dual variables to the upper bounds on the primal variables
Definition: QPSolverBasicStructures.hxx:373
virtual const CH_Matrix_Classes::Matrix & QPget_zlb() const =0
return the current value of the dual variables to the lower bounds of the quadratic variables (after ...
virtual SOCIPProxBlock & QPset_socqp()
give access to the second order cone data which models the quadratic part in case the paramaeters hol...
Definition: QPSolverBasicStructures.hxx:519
virtual const CH_Matrix_Classes::Matrix & QPget_zlb() const
return the current value of the dual variables to the lower bounds of the quadratic variables (after ...
Definition: QPSolverBasicStructures.hxx:497
CH_Matrix_Classes::Matrix zub
dual to quadratic variable upper bound
Definition: QPSolverBasicStructures.hxx:202
SOCIPProxBlock socqp
holds the second order cone model of the quadratic term if this is to be used according to the parame...
Definition: QPSolverBasicStructures.hxx:380
CH_Matrix_Classes::Real next_theta
neighborhood parameter computed for the next step if use_predictor_corrector==false ...
Definition: QPSolverBasicStructures.hxx:323
virtual int QPIsolve(bool reinitialize=true, CH_Matrix_Classes::Real skip_factor=-1.)=0
solve the problem to the precision specified by the parameters; if the problem is resolved for slight...
virtual CH_Matrix_Classes::Integer QPget_iter() const
return the number of iterations until termination
Definition: QPSolverBasicStructures.hxx:528
virtual int QPset_starty(const CH_Matrix_Classes::Matrix &starty)=0
set a starting value for the dual variables of the constraints
CH_Tools::Microseconds QPmatmult_time
time spent in matrix vector multiplications
Definition: QPSolverBasicStructures.hxx:433
QPCentralPathPoint(const QPCentralPathPoint &ppp)
copy constructor
Definition: QPSolverBasicStructures.hxx:231
QPSolverParameters * paramsp
parameters giving termination bounds etc
Definition: QPSolverBasicStructures.hxx:307
virtual int QPset_startzub(const CH_Matrix_Classes::Matrix &startzub)
set a starting value for the dual variables of the upper bounds on the quadratic variables ...
Definition: QPSolverBasicStructures.hxx:467
CH_Matrix_Classes::Real mu
barrier parameter
Definition: QPSolverBasicStructures.hxx:317
CH_Matrix_Classes::Matrix slackub
slack to variable upper bounds
Definition: QPSolverBasicStructures.hxx:349
CH_Matrix_Classes::Real dualval
dual objective value (if feasible)
Definition: QPSolverBasicStructures.hxx:335
CH_Matrix_Classes::Matrix old_zlb
old dual variables to the lower bounds on the primal variables
Definition: QPSolverBasicStructures.hxx:372
CH_Tools::Microseconds QPinitKKT_time
time spent initializing the KKT system
Definition: QPSolverBasicStructures.hxx:425
CH_Tools::Microseconds QPcorrector_time
time spent in computing predictor
Definition: QPSolverBasicStructures.hxx:427
CH_Matrix_Classes::Real n2dualviol
Euclidean norm of dual violation.
Definition: QPSolverBasicStructures.hxx:341
CH_Matrix_Classes::Matrix y
dual variables to the affine constraints
Definition: QPSolverBasicStructures.hxx:310
virtual const CH_Matrix_Classes::Matrix & QPget_x() const
return the current value of the quadratic variables (after a successful QPIsolve the optimal solution...
Definition: QPSolverBasicStructures.hxx:487
CH_Matrix_Classes::Matrix s
constraint slacks
Definition: QPSolverBasicStructures.hxx:196
CH_Tools::Microseconds QPcoeff_time
time spent in computing the QP coefficients
Definition: QPSolverBasicStructures.hxx:423
virtual QPSolverParameters * QPget_parameters() const =0
return the current parameters for potential modification (do not delete!)
CH_Matrix_Classes::Real n2primalviol
Euclidean norm of primal violation.
Definition: QPSolverBasicStructures.hxx:340
virtual const CH_Matrix_Classes::Indexmatrix & QPget_ubind() const =0
returns the indices where ub is not plus infinity (sorted increasingly)
virtual const CH_Matrix_Classes::Matrix & QPget_zub() const =0
return the current value of the dual variables to the upper bounds of the quadratic variables (after ...
Matrix class for real values of type Real
Definition: matrix.hxx:74
CH_Matrix_Classes::Matrix dualviol
dual violation vector
Definition: QPSolverBasicStructures.hxx:338
virtual const SOCIPProxBlock & QPget_socqp() const
return the second order cone data which models the quadratic part in case the paramaeters hold use_so...
Definition: QPSolverBasicStructures.hxx:516
virtual const CH_Matrix_Classes::Matrix & QPget_rhszlb() const
return the current value of the dual variables to the lower bounds of the constraints (after a succes...
Definition: QPSolverBasicStructures.hxx:510
virtual int QPset_starts(const CH_Matrix_Classes::Matrix &starts)
set a starting value for the slack variables of the constraints
Definition: QPSolverBasicStructures.hxx:455
CH_Matrix_Classes::Integer large_predictor_cnt
increased if predictor promises a good step but mu is only decreased by a little
Definition: QPSolverBasicStructures.hxx:330
virtual const CH_Matrix_Classes::Matrix & QPget_ub() const =0
returns ub of x <= ub
virtual CH_Matrix_Classes::Integer QPget_xdim() const =0
dimension of the quadratic variable x
CH_Tools::Microseconds QPlinesearch_time
time spent in the line searches
Definition: QPSolverBasicStructures.hxx:428
CH_Matrix_Classes::Matrix dslacklb
step for dslacklb
Definition: QPSolverBasicStructures.hxx:358
virtual int QPset_startzlb(const CH_Matrix_Classes::Matrix &startlb)=0
set a starting value for the dual variables of the lower bounds on the quadratic variables ...
virtual int QPset_solver_parameters(QPSolverParameters *params)=0
pass on new parameters, ownership is tranferred to this, will be deleted here
CH_Tools::Microseconds QPsolve_time
time spent in solving the QP
Definition: QPSolverBasicStructures.hxx:424
CH_Matrix_Classes::Matrix old_x
old quadratic (primal) variables
Definition: QPSolverBasicStructures.hxx:369
Header declaring the classes ConicBundle::QPSolverParameters.
CH_Matrix_Classes::Matrix primalviol
primal violation vector
Definition: QPSolverBasicStructures.hxx:337
virtual const CH_Matrix_Classes::Matrix & QPget_lb() const =0
returns lb of lb <= x
CH_Matrix_Classes::Matrix drhsslackub
step for rhsslackub
Definition: QPSolverBasicStructures.hxx:364
CH_Matrix_Classes::Matrix old_rhszub
old dual variables to the upper bounds on the constraints
Definition: QPSolverBasicStructures.hxx:375
virtual CH_Matrix_Classes::Real QPget_dualval() const =0
after QPIsolve, retrieve the dual objective value (quadratic and dual variables)
CH_Matrix_Classes::Matrix rhszub
dual to upper bound on constraints
Definition: QPSolverBasicStructures.hxx:208
virtual CH_Matrix_Classes::Real QPget_dualval() const
after QPIsolve, retrieve the dual objective value (quadratic and dual variables)
Definition: QPSolverBasicStructures.hxx:481
virtual CH_Matrix_Classes::Real QPget_primalval() const
after QPIsolve, retrieve the primal objective value (of the quadratic variables)
Definition: QPSolverBasicStructures.hxx:478
CH_Matrix_Classes::Real last_theta
neighborhood parameter of the previous step
Definition: QPSolverBasicStructures.hxx:322
CH_Matrix_Classes::Real sigma
current reduction factor used for mu
Definition: QPSolverBasicStructures.hxx:327
CH_Matrix_Classes::Real next_mu
barrier parameter computed for the next step if use_predictor_corrector==false
Definition: QPSolverBasicStructures.hxx:320
std::vector< QPCentralPathPoint > central_path
stores the sequence of points, potentially useful for restarting
Definition: QPSolverBasicStructures.hxx:332
virtual CH_Matrix_Classes::Matrix & QPadd_Qx(const CH_Matrix_Classes::Matrix &vecin, CH_Matrix_Classes::Matrix &vecout) const =0
vecout += quadratic term * vecin
virtual const CH_Matrix_Classes::Indexmatrix & QPget_rhsubind() const =0
returns the indices where rhsub is not plus infinity (sorted increasingly)
CH_Matrix_Classes::Real n2modelprimalviol
Euclidean norm of primal violation of the bundle model.
Definition: QPSolverBasicStructures.hxx:342
Header declaring the classes ConicBundle::QPModelBlock, ConicBundle::QPModelPointer.
CH_Matrix_Classes::Real n2modeldualviol
Euclidean norm of dual violation of the bundel model.
Definition: QPSolverBasicStructures.hxx:343
CH_Matrix_Classes::Matrix yviol
violation between dual varialbes and duals to constraint bounds
Definition: QPSolverBasicStructures.hxx:339
Implementation of the QPModelDataPointer Interface for BundelModel for generating the correct type of...
Definition: QPModelBlock.hxx:448
CH_Matrix_Classes::Matrix shortrhszub
ub duals condensed on indices with finite constraint bounds
Definition: QPSolverBasicStructures.hxx:352
virtual int QPset_starty(const CH_Matrix_Classes::Matrix &starty)
set a starting value for the dual variables of the constraints
Definition: QPSolverBasicStructures.hxx:459
CH_Matrix_Classes::Matrix shortzlb
lb duals condensed on indices with finite variable bounds
Definition: QPSolverBasicStructures.hxx:346
Header declaring and (inline) implementing the classes CH_Tools::Microseconds and CH_Tools::Clock as ...
CH_Matrix_Classes::Matrix slacklb
slack to variable lower bounds
Definition: QPSolverBasicStructures.hxx:348
virtual ~QPSolverBasicStructures()
virtual destructor, deletes the parameters
Definition: QPSolverBasicStructures.hxx:440
virtual const CH_Matrix_Classes::Matrix & QPget_x() const =0
return the current value of the quadratic variables (after a successful QPIsolve the optimal solution...
virtual CH_Matrix_Classes::Matrix & QPadd_Ax(const CH_Matrix_Classes::Matrix &xin, CH_Matrix_Classes::Matrix &outplusAx) const =0
outplusAx += A * xin
CH_Matrix_Classes::Matrix dshortrhszub
step for shortrhszub
Definition: QPSolverBasicStructures.hxx:362
CH_Tools::Clock clock
for timing purposes
Definition: QPSolverBasicStructures.hxx:422
QPCentralPathPoint()
default constructor
Definition: QPSolverBasicStructures.hxx:228
virtual const CH_Matrix_Classes::Matrix & QPget_s() const
return the current value of the slack variables of the constraints (after a successful QPIsolve the o...
Definition: QPSolverBasicStructures.hxx:503
virtual const CH_Matrix_Classes::Matrix & QPget_y() const =0
return the current value of the dual variables to the constraints (after a successful QPIsolve the op...
CH_Matrix_Classes::Matrix s
slack variables to the affine constraints
Definition: QPSolverBasicStructures.hxx:311
virtual int QPset_startx(const CH_Matrix_Classes::Matrix &startx)=0
set a starting value for the quadratic variables
virtual CH_Matrix_Classes::Real QPget_gamma() const =0
returns a potential constant offset of the cost function
CH_Matrix_Classes::Matrix rhsslacklb
slack to constraint lower bounds
Definition: QPSolverBasicStructures.hxx:353
CH_Matrix_Classes::Matrix solx
last solution to the KKT system (primal Newton step)
Definition: QPSolverBasicStructures.hxx:366
CH_Matrix_Classes::Matrix rhszub
dual variables to the upper bounds on the constraints
Definition: QPSolverBasicStructures.hxx:315
CH_Matrix_Classes::Matrix zlb
dual to quadratic variable lower bound
Definition: QPSolverBasicStructures.hxx:199