enums.h
Go to the documentation of this file.
1 /* Copyright 2020 CNRS-AIST JRL */
2 
3 #pragma once
4 
5 #include <jrl-qp/defs.h>
6 
7 namespace jrl::qp
8 {
14 enum class ActivationStatus
15 {
16  INACTIVE, // Constraint is inactive
17  LOWER, // Constraint is active at its lower bound
18  UPPER, // Constraint is active at its upper bound
19  EQUALITY, // Constraint is an equality constraint
20  LOWER_BOUND, // Constraint is a bound on variable constraint, active at its lower bound
21  UPPER_BOUND, // Constraint is a bound on variable constraint, active at its upper bound
22  FIXED // Constraint fixes the corresponding variable
23 };
24 
27 {
28  SUCCESS, // Operation was successful
29  INCONSISTENT_INPUT, // Inputs are not consistent with one another (e.g. mismatch of size, activation status, ...)
30  NON_POS_HESSIAN, // Quadratic matrix of the problem is expected to be positive definite, but is not.
31  INFEASIBLE, // Problem is infeasible
32  MAX_ITER_REACHED, // Maximum number of iteration was reached. You can increase this number by using the solver options.
33  LINEAR_DEPENDENCY_DETECTED, // Some active constraints are linearly dependent and the solver doesn't know how to
34  // handle this case.
35  OVERCONSTRAINED_PROBLEM, // Too many equality constraints and fixed variables
36  UNKNOWN, // Unknown status
37 };
38 
40 enum class LogFlags : std::uint32_t
41 {
42  NONE = 0,
43  INPUT = 1 << 0,
44  TERMINATION = 1 << 1,
45  ITERATION_BASIC_DETAILS = 1 << 2,
47  ACTIVE_SET = 1 << 4,
48  ACTIVE_SET_DETAILS = 1 << 5,
49  INIT = 1 << 6,
50  MISC = 1 << 30,
52 };
53 
54 inline std::uint32_t operator|(LogFlags a, LogFlags b)
55 {
56  return static_cast<std::uint32_t>(a) | static_cast<std::uint32_t>(b);
57 }
58 
59 inline std::uint32_t operator|(std::uint32_t a, LogFlags b)
60 {
61  return a | static_cast<std::uint32_t>(b);
62 }
63 
64 inline std::uint32_t operator|(LogFlags a, std::uint32_t b)
65 {
66  return static_cast<std::uint32_t>(a) | b;
67 }
68 } // namespace jrl::qp
constexpr std::uint32_t noIterationFlag
Definition: defs.h:22
Definition: blockArrowLLT.h:13
std::uint32_t operator|(LogFlags a, LogFlags b)
Definition: enums.h:54
TerminationStatus
Definition: enums.h:27
ActivationStatus
Definition: enums.h:15
LogFlags
Definition: enums.h:41