OR-Tools  9.6
basis_status.h
Go to the documentation of this file.
1 // Copyright 2010-2022 Google LLC
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 // http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 // IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h"
15 // IWYU pragma: friend "ortools/math_opt/cpp/.*"
16 
17 #ifndef OR_TOOLS_MATH_OPT_CPP_BASIS_STATUS_H_
18 #define OR_TOOLS_MATH_OPT_CPP_BASIS_STATUS_H_
19 
20 #include <cstdint>
21 #include <optional>
22 
23 #include "absl/types/span.h"
24 #include "ortools/math_opt/cpp/enums.h" // IWYU pragma: export
25 #include "ortools/math_opt/solution.pb.h"
26 
28 
29 // Status of a variable/constraint in a LP basis.
30 enum class BasisStatus : int8_t {
31  // The variable/constraint is free (it has no finite bounds).
32  kFree = BASIS_STATUS_FREE,
33 
34  // The variable/constraint is at its lower bound (which must be finite).
35  kAtLowerBound = BASIS_STATUS_AT_LOWER_BOUND,
36 
37  // The variable/constraint is at its upper bound (which must be finite).
38  kAtUpperBound = BASIS_STATUS_AT_UPPER_BOUND,
39 
40  // The variable/constraint has identical finite lower and upper bounds.
41  kFixedValue = BASIS_STATUS_FIXED_VALUE,
42 
43  // The variable/constraint is basic.
44  kBasic = BASIS_STATUS_BASIC,
45 };
46 
47 MATH_OPT_DEFINE_ENUM(BasisStatus, BASIS_STATUS_UNSPECIFIED);
48 
49 } // namespace operations_research::math_opt
50 
51 #endif // OR_TOOLS_MATH_OPT_CPP_BASIS_STATUS_H_
MATH_OPT_DEFINE_ENUM(BasisStatus, BASIS_STATUS_UNSPECIFIED)