Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <compute_infeasible_subsystem_result.h>
Classes | |
struct | Bounds |
Public Member Functions | |
ModelSubsetProto | Proto () const |
absl::Status | CheckModelStorage (const ModelStorage *expected_storage) const |
bool | empty () const |
True if this object corresponds to the empty subset. | |
std::string | ToString () const |
Static Public Member Functions | |
static absl::StatusOr< ModelSubset > | FromProto (const ModelStorage *model, const ModelSubsetProto &proto) |
Public Attributes | |
absl::flat_hash_map< Variable, Bounds > | variable_bounds |
absl::flat_hash_set< Variable > | variable_integrality |
absl::flat_hash_map< LinearConstraint, Bounds > | linear_constraints |
absl::flat_hash_map< QuadraticConstraint, Bounds > | quadratic_constraints |
absl::flat_hash_set< SecondOrderConeConstraint > | second_order_cone_constraints |
absl::flat_hash_set< Sos1Constraint > | sos1_constraints |
absl::flat_hash_set< Sos2Constraint > | sos2_constraints |
absl::flat_hash_set< IndicatorConstraint > | indicator_constraints |
Represents a subset of the constraints (including variable bounds and integrality) of a Model
.
The fields contain Variable
and Constraint objects which retain pointers back to their associated Model
. Therefore, a ModelSubset
should not outlive the Model
it is in reference to.
Definition at line 45 of file compute_infeasible_subsystem_result.h.
absl::Status operations_research::math_opt::ModelSubset::CheckModelStorage | ( | const ModelStorage * | expected_storage | ) | const |
Returns a failure if the Variable
and Constraints contained in the fields do not belong to the input expected_storage (which must not be nullptr).
Definition at line 184 of file compute_infeasible_subsystem_result.cc.
bool operations_research::math_opt::ModelSubset::empty | ( | ) | const |
True if this object corresponds to the empty subset.
Definition at line 222 of file compute_infeasible_subsystem_result.cc.
|
static |
Returns the ModelSubset
equivalent to proto
.
Returns an error when model
does not contain a variable or constraint associated with an index present in proto
.
Definition at line 134 of file compute_infeasible_subsystem_result.cc.
ModelSubsetProto operations_research::math_opt::ModelSubset::Proto | ( | ) | const |
Returns the proto equivalent of this object.
The caller should use CheckModelStorage() as this function does not check internal consistency of the referenced variables and constraints.
Definition at line 167 of file compute_infeasible_subsystem_result.cc.
std::string operations_research::math_opt::ModelSubset::ToString | ( | ) | const |
Returns a detailed string description of the contents of the model subset. (not the component names, use <<
for that instead).
We only want to only print the bounds appearing in the subset. The << operator for BoundedQuadraticExpression
s will ignore -/+inf bound values for the lower/upper bounds, respectively (assuming that at least one is finite, otherwise it chooses to print one bound arbitrarily). So, to suppress bounds not in the subset, it suffices to set their value to the appropriate infinity.
Definition at line 229 of file compute_infeasible_subsystem_result.cc.
absl::flat_hash_set<IndicatorConstraint> operations_research::math_opt::ModelSubset::indicator_constraints |
Definition at line 94 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_map<LinearConstraint, Bounds> operations_research::math_opt::ModelSubset::linear_constraints |
Definition at line 89 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_map<QuadraticConstraint, Bounds> operations_research::math_opt::ModelSubset::quadratic_constraints |
Definition at line 90 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_set<SecondOrderConeConstraint> operations_research::math_opt::ModelSubset::second_order_cone_constraints |
Definition at line 91 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_set<Sos1Constraint> operations_research::math_opt::ModelSubset::sos1_constraints |
Definition at line 92 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_set<Sos2Constraint> operations_research::math_opt::ModelSubset::sos2_constraints |
Definition at line 93 of file compute_infeasible_subsystem_result.h.
Definition at line 87 of file compute_infeasible_subsystem_result.h.
absl::flat_hash_set<Variable> operations_research::math_opt::ModelSubset::variable_integrality |
Definition at line 88 of file compute_infeasible_subsystem_result.h.