![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
#include <capacity_invariant.h>
Public Member Functions | |
CapacityInvariant (CapacityModel *m, SetCoverModel *sc) | |
void | Clear () |
Clears the invariant. | |
bool | Select (SubsetIndex subset) |
bool | CanSelect (SubsetIndex subset) const |
bool | Deselect (SubsetIndex subset) |
bool | CanDeselect (SubsetIndex subset) const |
Definition at line 23 of file capacity_invariant.h.
|
inlineexplicit |
Constructs an empty capacity invariant state. The model may not change after the invariant was built.
Definition at line 27 of file capacity_invariant.h.
bool operations_research::CapacityInvariant::CanDeselect | ( | SubsetIndex | subset | ) | const |
Returns true when the constraint would not be violated by unselecting all of the items in the subset. Otherwise, returns false. The object never changes. (If the subset is already not selected, the behavior is undefined.)
Definition at line 114 of file capacity_invariant.cc.
bool operations_research::CapacityInvariant::CanSelect | ( | SubsetIndex | subset | ) | const |
Returns true when the constraint would not be violated by selecting all of the items in the subset. Otherwise, returns false. The object never changes. (If the subset is already selected, the behavior is undefined.)
Definition at line 87 of file capacity_invariant.cc.
void operations_research::CapacityInvariant::Clear | ( | ) |
Clears the invariant.
Definition at line 27 of file capacity_invariant.cc.
bool operations_research::CapacityInvariant::Deselect | ( | SubsetIndex | subset | ) |
Returns true when the constraint is not violated by unselecting all of the items in the subset and incrementally updates the invariant. Otherwise, returns false and does not change the object. (If the subset is already not selected, the behavior is undefined.)
Definition at line 97 of file capacity_invariant.cc.
bool operations_research::CapacityInvariant::Select | ( | SubsetIndex | subset | ) |
Returns true when the constraint is not violated by selecting all of the items in the subset and incrementally updates the invariant. Otherwise, returns false and does not change the object. (If the subset is already selected, the behavior is undefined.)
Definition at line 70 of file capacity_invariant.cc.