Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::CombinedDisjunctive< time_direction > Class Template Reference

#include <disjunctive.h>

Inheritance diagram for operations_research::sat::CombinedDisjunctive< time_direction >:
operations_research::sat::PropagatorInterface

Public Member Functions

 CombinedDisjunctive (Model *model)
 
void AddNoOverlap (absl::Span< const IntervalVariable > var)
 
bool Propagate () final
 
- Public Member Functions inherited from operations_research::sat::PropagatorInterface
 PropagatorInterface ()=default
 
virtual ~PropagatorInterface ()=default
 
virtual bool IncrementalPropagate (const std::vector< int > &)
 

Detailed Description

template<bool time_direction>
class operations_research::sat::CombinedDisjunctive< time_direction >

This propagates the same things as DisjunctiveDetectablePrecedences, except that it only sort the full set of intervals once and then work on a combined set of disjunctives.

Definition at line 271 of file disjunctive.h.

Constructor & Destructor Documentation

◆ CombinedDisjunctive()

template<bool time_direction>
operations_research::sat::CombinedDisjunctive< time_direction >::CombinedDisjunctive ( Model * model)
explicit

Definition at line 321 of file disjunctive.cc.

Member Function Documentation

◆ AddNoOverlap()

template<bool time_direction>
void operations_research::sat::CombinedDisjunctive< time_direction >::AddNoOverlap ( absl::Span< const IntervalVariable > var)

After creation, this must be called for all the disjunctive constraints in the model.

Definition at line 332 of file disjunctive.cc.

◆ Propagate()

template<bool time_direction>
bool operations_research::sat::CombinedDisjunctive< time_direction >::Propagate ( )
finalvirtual

This will be called after one or more literals that are watched by this propagator changed. It will also always be called on the first propagation cycle after registration.

Update all task sets.

Todo
(user): AddEntry() and ComputeEndMin() could be combined.

Find out amongst the disjunctives in which t appear, the one with the largest end_min, ignoring t itself. This will be the new start min for t.

If the task t was not added, then there is no task to ignore and end_mins_[d_index] is up to date.

Do we push something?

Same reason as DisjunctiveDetectablePrecedences.

Todo
(user): Maybe factor out the code? It does require a function with a lot of arguments though.

We need to reorder t inside task_set_. Note that if t is in the set, it means that the task is present and that IncreaseStartMin() did push its start (by opposition to an optional interval where the push might not happen if its start is not optional).

Todo
(user): Refactor the code to use the same algo as in DisjunctiveDetectablePrecedences, it is superior and do not need this function.

Implements operations_research::sat::PropagatorInterface.

Definition at line 343 of file disjunctive.cc.


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