42 #ifndef COP_QP_SOLVER_STATS_H
43 #define COP_QP_SOLVER_STATS_H
45 #include "ConstrainedOptPack_Types.hpp"
47 namespace ConstrainedOptPack {
57 enum { NOT_KNOWN = -1 };
61 SOLUTION_TYPE_NOT_KNOWN =
static_cast<int>(NOT_KNOWN),
63 PRIMAL_FEASIBLE_POINT = 1,
64 DUAL_FEASIBLE_POINT = 2,
69 CONVEXITY_NOT_KNOWN =
static_cast<int>(NOT_KNOWN),
78 : solution_type_(SOLUTION_TYPE_NOT_KNOWN)
79 , convexity_(CONVEXITY_NOT_KNOWN)
80 , num_qp_iter_(NOT_KNOWN)
81 , num_adds_(NOT_KNOWN), num_drops_(NOT_KNOWN)
82 , warm_start_(false), infeasible_qp_(false)
94 num_drops_ = num_drops;
101 return solution_type_;
131 return infeasible_qp_;
148 switch(solution_type) {
149 case QPSolverStats::SOLUTION_TYPE_NOT_KNOWN:
150 return "SOLUTION_TYPE_NOT_KNOWN";
152 case QPSolverStats::OPTIMAL_SOLUTION:
153 return "OPTIMAL_SOLUTION";
155 case QPSolverStats::PRIMAL_FEASIBLE_POINT:
156 return "PRIMAL_FEASIBLE_POINT";
158 case QPSolverStats::DUAL_FEASIBLE_POINT:
159 return "DUAL_FEASIBLE_POINT";
161 case QPSolverStats::SUBOPTIMAL_POINT:
162 return "SUBOPTIMAL_POINT";
171 #endif // COP_QP_SOLVER_STATS_H
void set_stats(ESolutionType solution_type, EConvexity convexity, int num_qp_iter, int num_adds, int num_drops, bool warm_start, bool infeasible_qp)
Initialize the statistics.
EConvexity convexity() const
EConvexity
Enumeration for the type of projected QP on output.
QPSolverStats()
Construct all unknowns.
int infeasible_qp() const
TEUCHOSCORE_LIB_DLL_EXPORT std::string toString(const EVerbosityLevel verbLevel)
Class for storing statistics about a run of a (active set?) QP solver.
ESolutionType
Enumeration for the type of point returned from solve_qp(...).
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
ESolutionType solution_type() const