![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Specialized cumulative constraint.
This constraint allows adding fixed or variables demands to the cumulative constraint incrementally.
One cannot mix the AddDemand() and AddDemandWithEnergy() APIs in the same cumulative API. Either always supply energy info, or never.
Definition at line 715 of file cp_model.h.
#include <cp_model.h>
Public Member Functions | |
| *Adds a | pair (interval, demand) to the const raint. void AddDemand(IntervalVar interval |
| Public Member Functions inherited from operations_research::sat::Constraint | |
| Constraint | OnlyEnforceIf (absl::Span< const BoolVar > literals) |
| Constraint | OnlyEnforceIf (BoolVar literal) |
| See OnlyEnforceIf(absl::Span<const BoolVar> literals). | |
| Constraint | WithName (absl::string_view name) |
| Sets the name of the constraint. | |
| absl::string_view | Name () const |
| Returns the name of the constraint (or the empty string if not set). | |
| const ConstraintProto & | Proto () const |
| Returns the underlying protobuf object (useful for testing). | |
| ConstraintProto * | MutableProto () const |
| Returns the mutable underlying protobuf object (useful for model edition). | |
Public Attributes | |
| *Adds a LinearExpr | demand |
Friends | |
| class | CpModelBuilder |
Additional Inherited Members | |
| Protected Member Functions inherited from operations_research::sat::Constraint | |
| Constraint (ConstraintProto *proto) | |
| Protected Attributes inherited from operations_research::sat::Constraint | |
| ConstraintProto * | proto_ = nullptr |
| *Adds a operations_research::sat::CumulativeConstraint::pair | ( | interval | , |
| demand | ) const |
|
friend |
Definition at line 721 of file cp_model.h.
| *Adds a LinearExpr operations_research::sat::CumulativeConstraint::demand |
Definition at line 718 of file cp_model.h.