14#ifndef OR_TOOLS_SAT_SCHEDULING_CUTS_H_
15#define OR_TOOLS_SAT_SCHEDULING_CUTS_H_
22#include "absl/types/span.h"
49 const std::optional<AffineExpression>& makespan,
Model* model);
90 const std::optional<AffineExpression>& makespan,
Model* model);
161 std::vector<std::pair<IntegerValue, IntegerValue>>
profile_;
170 void Init(absl::Span<const CompletionTimeEvent> events,
Model* model);
173 absl::Span<const CompletionTimeEvent> events,
174 absl::Span<const int> permutation);
178 int max_task_index_ = 0;
179 std::vector<bool> visited_;
188template <
typename Sink>
192 sink.Append(
"FINISHED");
195 sink.Append(
"ABORTED");
198 sink.Append(
"NO_VALID_PERMUTATION");
212 absl::Span<const CompletionTimeEvent> events, IntegerValue capacity_max,
213 double unweighted_threshold,
double weighted_threshold,
214 CtExhaustiveHelper& helper,
double& min_sum_of_ends,
215 double& min_sum_of_weighted_ends,
bool& cut_use_precedences,
216 int& exploration_credit);
const CompactVectorVector< int > & predecessors() const
void Init(absl::Span< const CompletionTimeEvent > events, Model *model)
std::vector< IntegerValue > assigned_ends_
std::vector< std::pair< IntegerValue, IntegerValue > > profile_
Temporary data.
int max_task_index() const
bool PermutationIsCompatibleWithPrecedences(absl::Span< const CompletionTimeEvent > events, absl::Span< const int > permutation)
std::vector< CompletionTimeEvent > residual_events_
CtExhaustiveHelper()=default
DagTopologicalSortIterator valid_permutation_iterator_
std::vector< std::pair< IntegerValue, IntegerValue > > new_profile_
std::vector< int > task_to_index_
CutGenerator CreateCumulativeCompletionTimeCutGenerator(SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands_helper, const AffineExpression &capacity, Model *model)
CompletionTimeExplorationStatus ComputeMinSumOfWeightedEndMins(absl::Span< const CompletionTimeEvent > events, IntegerValue capacity_max, double unweighted_threshold, double weighted_threshold, CtExhaustiveHelper &helper, double &min_sum_of_ends, double &min_sum_of_weighted_ends, bool &cut_use_precedences, int &exploration_credit)
CutGenerator CreateCumulativePrecedenceCutGenerator(SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands_helper, const AffineExpression &capacity, Model *model)
CutGenerator CreateCumulativeEnergyCutGenerator(SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands_helper, const AffineExpression &capacity, const std::optional< AffineExpression > &makespan, Model *model)
CutGenerator CreateCumulativeTimeTableCutGenerator(SchedulingConstraintHelper *helper, SchedulingDemandHelper *demands_helper, const AffineExpression &capacity, Model *model)
CutGenerator CreateNoOverlapCompletionTimeCutGenerator(SchedulingConstraintHelper *helper, Model *model)
CutGenerator CreateNoOverlapEnergyCutGenerator(SchedulingConstraintHelper *helper, const std::optional< AffineExpression > &makespan, Model *model)
CutGenerator CreateNoOverlapPrecedenceCutGenerator(SchedulingConstraintHelper *helper, Model *model)
void AbslStringify(Sink &sink, EdgePosition e)
CompletionTimeExplorationStatus
In SWIG mode, we don't want anything besides these top-level includes.
std::vector< LiteralValueValue > decomposed_energy
AffineExpression start
Start and end affine expressions and lp value of the end of the interval.
IntegerValue energy_min
The energy min of this event.
CompletionTimeEvent(int t, SchedulingConstraintHelper *x_helper, SchedulingDemandHelper *demands_helper)
IntegerValue start_min
Cache of the bounds of the interval.
int task_index
The index of the task in the helper.
std::string DebugString() const
bool use_decomposed_energy_min
IntegerValue demand_min
Cache of the bounds of the demand.