speed up sat scheduling code

This commit is contained in:
Laurent Perron
2023-10-25 17:05:22 +02:00
parent fb7aa1b853
commit 044bc5ebce
7 changed files with 70 additions and 57 deletions

View File

@@ -688,7 +688,7 @@ std::optional<AffineExpression> DetectMakespanFromPrecedences(
const SchedulingConstraintHelper& helper, Model* model) {
if (helper.NumTasks() == 0) return {};
const std::vector<AffineExpression>& ends = helper.Ends();
const absl::Span<const AffineExpression> ends = helper.Ends();
std::vector<IntegerVariable> end_vars;
for (const AffineExpression& end : ends) {
// TODO(user): Deal with constant end.