42 #ifndef QP_SOLVER_RELAXED_H
43 #define QP_SOLVER_RELAXED_H
45 #include "ConstrainedOptPack_QPSolverStats.hpp"
48 namespace ConstrainedOptPack {
140 {
public:
Unbounded(
const std::string& what_arg) : std::logic_error(what_arg) {}};
144 {
public:
Infeasible(
const std::string& what_arg) : std::logic_error(what_arg) {}};
148 {
public:
InvalidInput(
const std::string& what_arg) : std::logic_error(what_arg) {}};
152 {
public:
TestFailed(
const std::string& what_arg) : std::logic_error(what_arg) {}};
157 PRINT_BASIC_INFO = 1,
158 PRINT_ITER_SUMMARY = 2,
159 PRINT_ITER_STEPS = 3,
160 PRINT_ITER_ACT_SET = 4,
161 PRINT_ITER_VECTORS = 5,
162 PRINT_EVERY_THING = 6
313 ,
const Vector& g,
const MatrixSymOp& G
315 ,
const Vector& dL,
const Vector& dU
317 ,
const Vector& eL,
const Vector& eU
320 ,value_type* eta, VectorMutable* d
322 ,VectorMutable* mu, VectorMutable* Ed
323 ,VectorMutable* lambda, VectorMutable* Fd
333 ,
const Vector& g,
const MatrixSymOp& G
335 ,
const Vector& dL,
const Vector& dU
337 ,
const Vector& eL,
const Vector& eU
339 ,value_type* eta, VectorMutable* d
341 ,VectorMutable* mu, VectorMutable* Ed
351 ,
const Vector& g,
const MatrixSymOp& G
353 ,
const Vector& dL,
const Vector& dU
356 ,value_type* eta, VectorMutable* d
358 ,VectorMutable* lambda, VectorMutable* Fd
370 ,
const Vector& g,
const MatrixSymOp& G
371 ,
const Vector& dL,
const Vector& dU
390 ,
const Vector& g,
const MatrixSymOp& G
392 ,
const Vector* dL,
const Vector* dU
394 ,
const Vector* eL,
const Vector* eU
397 ,value_type* eta, VectorMutable* d
399 ,VectorMutable* mu, VectorMutable* Ed
400 ,VectorMutable* lambda, VectorMutable* Fd
450 const value_type infinite_bound
451 ,
const Vector& g,
const MatrixSymOp& G
453 ,
const Vector* dL,
const Vector* dU
455 ,
const Vector* eL,
const Vector* eU
457 ,
const value_type* obj_d
458 ,
const value_type* eta,
const Vector* d
460 ,
const Vector* mu,
const Vector* Ed
461 ,
const Vector* lambda,
const Vector* Fd
480 const value_type infinite_bound
482 ,
const Vector& g,
const MatrixSymOp& G
484 ,
const Vector* dL,
const Vector* dU
486 ,
const Vector* eL,
const Vector* eU
488 ,value_type* eta, VectorMutable* d
491 ,VectorMutable* lambda
510 const value_type infinite_bound
512 ,
const value_type* obj_d
513 ,
const value_type* eta,
const Vector* d
515 ,
const Vector* mu,
const Vector* Ed
516 ,
const Vector* lambda,
const Vector* Fd
532 ,
const Vector& g,
const MatrixSymOp& G
534 ,
const Vector* dL,
const Vector* dU
536 ,
const Vector* eL,
const Vector* eU
539 ,value_type* eta, VectorMutable* d
541 ,VectorMutable* mu, VectorMutable* Ed
542 ,VectorMutable* lambda, VectorMutable* Fd
551 #endif // QP_SOLVER_RELAXED_H
ERunTests
Enumeration for if to run internal tests or not.
Solves Quadratic Programs (QPs) of several different forms while allowing a relaxation of the constra...
virtual QPSolverStats::ESolutionType imp_solve_qp(std::ostream *out, EOutputLevel olevel, ERunTests test_what, const Vector &g, const MatrixSymOp &G, value_type etaL, const Vector *dL, const Vector *dU, const MatrixOp *E, BLAS_Cpp::Transp trans_E, const Vector *b, const Vector *eL, const Vector *eU, const MatrixOp *F, BLAS_Cpp::Transp trans_F, const Vector *f, value_type *obj_d, value_type *eta, VectorMutable *d, VectorMutable *nu, VectorMutable *mu, VectorMutable *Ed, VectorMutable *lambda, VectorMutable *Fd)=0
Subclasses are to override this to implement the QP algorithm.
virtual ~QPSolverRelaxed()
static void print_qp_output(const value_type infinite_bound, std::ostream *out, EOutputLevel olevel, const value_type *obj_d, const value_type *eta, const Vector *d, const Vector *nu, const Vector *mu, const Vector *Ed, const Vector *lambda, const Vector *Fd)
Utility (static) function for printing the output input/output arguments after the QP solver is run...
static void print_qp_input(const value_type infinite_bound, std::ostream *out, EOutputLevel olevel, const Vector &g, const MatrixSymOp &G, value_type etaL, const Vector *dL, const Vector *dU, const MatrixOp *E, BLAS_Cpp::Transp trans_E, const Vector *b, const Vector *eL, const Vector *eU, const MatrixOp *F, BLAS_Cpp::Transp trans_F, const Vector *f, value_type *eta, VectorMutable *d, VectorMutable *nu, VectorMutable *mu, VectorMutable *lambda)
Utility (static) function for printing the input input/output arguments before the QP solver is run...
Thrown if the QP is unbounded.
Class for storing statistics about a run of a (active set?) QP solver.
virtual QPSolverStats::ESolutionType solve_qp(std::ostream *out, EOutputLevel olevel, ERunTests test_what, const Vector &g, const MatrixSymOp &G, value_type etaL, const Vector &dL, const Vector &dU, const MatrixOp &E, BLAS_Cpp::Transp trans_E, const Vector &b, const Vector &eL, const Vector &eU, const MatrixOp &F, BLAS_Cpp::Transp trans_F, const Vector &f, value_type *obj_d, value_type *eta, VectorMutable *d, VectorMutable *nu, VectorMutable *mu, VectorMutable *Ed, VectorMutable *lambda, VectorMutable *Fd)
Solve the QP.
static void validate_input(const value_type infinite_bound, const Vector &g, const MatrixSymOp &G, value_type etaL, const Vector *dL, const Vector *dU, const MatrixOp *E, BLAS_Cpp::Transp trans_E, const Vector *b, const Vector *eL, const Vector *eU, const MatrixOp *F, BLAS_Cpp::Transp trans_F, const Vector *f, const value_type *obj_d, const value_type *eta, const Vector *d, const Vector *nu, const Vector *mu, const Vector *Ed, const Vector *lambda, const Vector *Fd)
This is a (static) function that is used as a utility to validate the input arguments to solve_qp()...
EOutputLevel
Enumeration for the amount of output to create from solve_qp().
STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type, infinite_bound)
Set the scalar that will be used to identigy infinite bounds.
virtual QPSolverStats get_qp_stats() const =0
Get the statistics of the last QP solved.
ESolutionType
Enumeration for the type of point returned from solve_qp(...).
Thrown if the QP is infeasible.
virtual void release_memory()=0
Release any memory that is being used.