OR-Tools  8.2
PrecedencesPropagator

Detailed Description

Definition at line 51 of file precedences.h.

Classes

struct  IntegerPrecedences
 

Public Member Functions

 PrecedencesPropagator (Model *model)
 
bool Propagate () final
 
bool Propagate (Trail *trail) final
 
void Untrail (const Trail &trail, int trail_index) final
 
bool PropagateOutgoingArcs (IntegerVariable var)
 
void AddPrecedence (IntegerVariable i1, IntegerVariable i2)
 
void AddPrecedenceWithOffset (IntegerVariable i1, IntegerVariable i2, IntegerValue offset)
 
void AddPrecedenceWithVariableOffset (IntegerVariable i1, IntegerVariable i2, IntegerVariable offset_var)
 
void AddConditionalPrecedence (IntegerVariable i1, IntegerVariable i2, Literal l)
 
void AddConditionalPrecedenceWithOffset (IntegerVariable i1, IntegerVariable i2, IntegerValue offset, Literal l)
 
void AddPrecedenceWithAllOptions (IntegerVariable i1, IntegerVariable i2, IntegerValue offset, IntegerVariable offset_var, absl::Span< const Literal > presence_literals)
 
void ComputePrecedences (const std::vector< IntegerVariable > &vars, std::vector< IntegerPrecedences > *output)
 
void AddPrecedenceReason (int arc_index, IntegerValue min_offset, std::vector< Literal > *literal_reason, std::vector< IntegerLiteral > *integer_reason) const
 
int AddGreaterThanAtLeastOneOfConstraints (Model *model)
 
void SetPropagatorId (int id)
 
int PropagatorId () const
 
virtual absl::Span< const LiteralReason (const Trail &trail, int trail_index) const
 
bool PropagatePreconditionsAreSatisfied (const Trail &trail) const
 
bool PropagationIsDone (const Trail &trail) const
 

Protected Attributes

const std::string name_
 
int propagator_id_
 
int propagation_trail_index_
 

Constructor & Destructor Documentation

◆ PrecedencesPropagator()

PrecedencesPropagator ( Model model)
inlineexplicit

Definition at line 53 of file precedences.h.

Member Function Documentation

◆ AddConditionalPrecedence()

void AddConditionalPrecedence ( IntegerVariable  i1,
IntegerVariable  i2,
Literal  l 
)
inline

Definition at line 306 of file precedences.h.

◆ AddConditionalPrecedenceWithOffset()

void AddConditionalPrecedenceWithOffset ( IntegerVariable  i1,
IntegerVariable  i2,
IntegerValue  offset,
Literal  l 
)
inline

Definition at line 313 of file precedences.h.

◆ AddGreaterThanAtLeastOneOfConstraints()

int AddGreaterThanAtLeastOneOfConstraints ( Model model)

Definition at line 895 of file precedences.cc.

◆ AddPrecedence()

void AddPrecedence ( IntegerVariable  i1,
IntegerVariable  i2 
)
inline

Definition at line 295 of file precedences.h.

◆ AddPrecedenceReason()

void AddPrecedenceReason ( int  arc_index,
IntegerValue  min_offset,
std::vector< Literal > *  literal_reason,
std::vector< IntegerLiteral > *  integer_reason 
) const

Definition at line 212 of file precedences.cc.

◆ AddPrecedenceWithAllOptions()

void AddPrecedenceWithAllOptions ( IntegerVariable  i1,
IntegerVariable  i2,
IntegerValue  offset,
IntegerVariable  offset_var,
absl::Span< const Literal presence_literals 
)
inline

Definition at line 323 of file precedences.h.

◆ AddPrecedenceWithOffset()

void AddPrecedenceWithOffset ( IntegerVariable  i1,
IntegerVariable  i2,
IntegerValue  offset 
)
inline

Definition at line 301 of file precedences.h.

◆ AddPrecedenceWithVariableOffset()

void AddPrecedenceWithVariableOffset ( IntegerVariable  i1,
IntegerVariable  i2,
IntegerVariable  offset_var 
)
inline

Definition at line 318 of file precedences.h.

◆ ComputePrecedences()

void ComputePrecedences ( const std::vector< IntegerVariable > &  vars,
std::vector< IntegerPrecedences > *  output 
)

Definition at line 135 of file precedences.cc.

◆ Propagate() [1/2]

bool Propagate ( )
finalvirtual

Implements PropagatorInterface.

Definition at line 43 of file precedences.cc.

◆ Propagate() [2/2]

bool Propagate ( Trail trail)
finalvirtual

Implements SatPropagator.

Definition at line 41 of file precedences.cc.

◆ PropagateOutgoingArcs()

bool PropagateOutgoingArcs ( IntegerVariable  var)

Definition at line 96 of file precedences.cc.

◆ PropagatePreconditionsAreSatisfied()

bool PropagatePreconditionsAreSatisfied ( const Trail trail) const
inlineinherited

Definition at line 517 of file sat_base.h.

◆ PropagationIsDone()

bool PropagationIsDone ( const Trail trail) const
inlineinherited

Definition at line 500 of file sat_base.h.

◆ PropagatorId()

int PropagatorId ( ) const
inlineinherited

Definition at line 453 of file sat_base.h.

◆ Reason()

virtual absl::Span<const Literal> Reason ( const Trail trail,
int  trail_index 
) const
inlinevirtualinherited

Reimplemented in SymmetryPropagator, PbConstraints, IntegerTrail, BinaryImplicationGraph, and LiteralWatchers.

Definition at line 489 of file sat_base.h.

◆ SetPropagatorId()

void SetPropagatorId ( int  id)
inlineinherited

Definition at line 452 of file sat_base.h.

◆ Untrail()

void Untrail ( const Trail trail,
int  trail_index 
)
finalvirtual

Reimplemented from SatPropagator.

Definition at line 111 of file precedences.cc.

Member Data Documentation

◆ name_

const std::string name_
protectedinherited

Definition at line 505 of file sat_base.h.

◆ propagation_trail_index_

int propagation_trail_index_
protectedinherited

Definition at line 507 of file sat_base.h.

◆ propagator_id_

int propagator_id_
protectedinherited

Definition at line 506 of file sat_base.h.


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