14#ifndef OR_TOOLS_SAT_CUMULATIVE_ENERGY_H_
15#define OR_TOOLS_SAT_CUMULATIVE_ENERGY_H_
22#include "absl/types/span.h"
48 SchedulingConstraintHelper* helper,
49 SchedulingDemandHelper* demands,
55 SchedulingConstraintHelper* helper,
56 SchedulingDemandHelper* demands,
78 std::vector<int> task_to_start_event_;
81 std::vector<TaskTime> start_event_task_time_;
82 std::vector<bool> start_event_is_present_;
95 const std::vector<int>& subtasks,
96 absl::Span<const IntegerValue> offsets,
105 const IntegerVariable var_to_push_;
107 const std::vector<int> subtasks_;
110 std::vector<bool> is_in_subtasks_;
111 std::vector<IntegerValue> task_offsets_;
115 std::vector<std::pair<IntegerValue, IntegerValue>> energy_changes_;
136 bool FindAndPropagateConflict(IntegerValue window_start,
137 IntegerValue window_end);
150 std::vector<int> task_to_start_event_;
153 std::vector<TaskTime> start_event_task_time_;
155 int64_t num_calls_ = 0;
156 int64_t num_conflicts_ = 0;
157 int64_t num_no_potential_window_ = 0;
Implementation of AddCumulativeOverloadCheckerDff().
void RegisterWith(GenericLiteralWatcher *watcher)
CumulativeDualFeasibleEnergyConstraint(AffineExpression capacity, SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands, Model *model)
~CumulativeDualFeasibleEnergyConstraint() override
Implementation of AddCumulativeOverloadChecker().
void RegisterWith(GenericLiteralWatcher *watcher)
CumulativeEnergyConstraint(AffineExpression capacity, SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands, Model *model)
CumulativeIsAfterSubsetConstraint(IntegerVariable var, AffineExpression capacity, const std::vector< int > &subtasks, absl::Span< const IntegerValue > offsets, SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands, Model *model)
void RegisterWith(GenericLiteralWatcher *watcher)
Base class for CP like propagators.
Simple class to add statistics by name and print them at the end.
void AddCumulativeOverloadCheckerDff(AffineExpression capacity, SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands, Model *model)
void AddCumulativeOverloadChecker(AffineExpression capacity, SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands, Model *model)
In SWIG mode, we don't want anything besides these top-level includes.