Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::CapacityInvariant Class Reference

#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

Detailed Description

Definition at line 23 of file capacity_invariant.h.

Constructor & Destructor Documentation

◆ CapacityInvariant()

operations_research::CapacityInvariant::CapacityInvariant ( CapacityModel * m,
SetCoverModel * sc )
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.

Member Function Documentation

◆ CanDeselect()

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.

◆ CanSelect()

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.

◆ Clear()

void operations_research::CapacityInvariant::Clear ( )

Clears the invariant.

Definition at line 27 of file capacity_invariant.cc.

◆ Deselect()

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.

◆ Select()

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.


The documentation for this class was generated from the following files: