Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::DisjunctiveConstraint Class Referenceabstract

#include <constraint_solver.h>

Inheritance diagram for operations_research::DisjunctiveConstraint:
operations_research::Constraint operations_research::PropagationBaseObject operations_research::BaseObject

Public Member Functions

 DisjunctiveConstraint (Solver *s, const std::vector< IntervalVar * > &intervals, const std::string &name)
 Sequence Constraint.
 
 DisjunctiveConstraint (const DisjunctiveConstraint &)=delete
 This type is neither copyable nor movable.
 
DisjunctiveConstraintoperator= (const DisjunctiveConstraint &)=delete
 
 ~DisjunctiveConstraint () override
 
virtual SequenceVarMakeSequenceVar ()=0
 Creates a sequence variable from the constraint.
 
void SetTransitionTime (Solver::IndexEvaluator2 transition_time)
 
int64_t TransitionTime (int before_index, int after_index)
 
virtual const std::vector< IntVar * > & nexts () const =0
 
virtual const std::vector< IntVar * > & actives () const =0
 
virtual const std::vector< IntVar * > & time_cumuls () const =0
 
virtual const std::vector< IntVar * > & time_slacks () const =0
 
- Public Member Functions inherited from operations_research::Constraint
 Constraint (Solver *const solver)
 
 Constraint (const Constraint &)=delete
 This type is neither copyable nor movable.
 
Constraintoperator= (const Constraint &)=delete
 
 ~Constraint () override
 
virtual void Post ()=0
 
virtual void InitialPropagate ()=0
 
std::string DebugString () const override
 --------------— Constraint class ----------------—
 
void PostAndPropagate ()
 
virtual void Accept (ModelVisitor *visitor) const
 Accepts the given visitor.
 
bool IsCastConstraint () const
 Is the constraint created by a cast from expression to integer variable?
 
virtual IntVarVar ()
 
- Public Member Functions inherited from operations_research::PropagationBaseObject
 PropagationBaseObject (Solver *const s)
 
 PropagationBaseObject (const PropagationBaseObject &)=delete
 This type is neither copyable nor movable.
 
PropagationBaseObjectoperator= (const PropagationBaseObject &)=delete
 
 ~PropagationBaseObject () override
 
std::string DebugString () const override
 
Solversolver () const
 
void FreezeQueue ()
 
void UnfreezeQueue ()
 
void EnqueueDelayedDemon (Demon *const d)
 
void EnqueueVar (Demon *const d)
 
void ExecuteAll (const SimpleRevFIFO< Demon * > &demons)
 
void EnqueueAll (const SimpleRevFIFO< Demon * > &demons)
 
void set_action_on_fail (Solver::Action a)
 
void reset_action_on_fail ()
 This method clears the failure callback.
 
void set_variable_to_clean_on_fail (IntVar *v)
 Shortcut for variable cleaner.
 
virtual std::string name () const
 Object naming.
 
void set_name (absl::string_view name)
 
bool HasName () const
 Returns whether the object has been named or not.
 
virtual std::string BaseName () const
 Returns a base name for automatic naming.
 
- Public Member Functions inherited from operations_research::BaseObject
 BaseObject ()
 
 BaseObject (const BaseObject &)=delete
 This type is neither copyable nor movable.
 
BaseObjectoperator= (const BaseObject &)=delete
 
virtual ~BaseObject ()
 

Protected Attributes

const std::vector< IntervalVar * > intervals_
 
Solver::IndexEvaluator2 transition_time_
 

Detailed Description

Definition at line 5811 of file constraint_solver.h.

Constructor & Destructor Documentation

◆ DisjunctiveConstraint() [1/2]

operations_research::DisjunctiveConstraint::DisjunctiveConstraint ( Solver * s,
const std::vector< IntervalVar * > & intervals,
const std::string & name )

Sequence Constraint.

--— Public class --—

Definition at line 2585 of file resource.cc.

◆ DisjunctiveConstraint() [2/2]

operations_research::DisjunctiveConstraint::DisjunctiveConstraint ( const DisjunctiveConstraint & )
delete

This type is neither copyable nor movable.

◆ ~DisjunctiveConstraint()

operations_research::DisjunctiveConstraint::~DisjunctiveConstraint ( )
override

Definition at line 2595 of file resource.cc.

Member Function Documentation

◆ actives()

virtual const std::vector< IntVar * > & operations_research::DisjunctiveConstraint::actives ( ) const
pure virtual

◆ MakeSequenceVar()

virtual SequenceVar * operations_research::DisjunctiveConstraint::MakeSequenceVar ( )
pure virtual

Creates a sequence variable from the constraint.

◆ nexts()

virtual const std::vector< IntVar * > & operations_research::DisjunctiveConstraint::nexts ( ) const
pure virtual

◆ operator=()

DisjunctiveConstraint & operations_research::DisjunctiveConstraint::operator= ( const DisjunctiveConstraint & )
delete

◆ SetTransitionTime()

void operations_research::DisjunctiveConstraint::SetTransitionTime ( Solver::IndexEvaluator2 transition_time)

Add a transition time between intervals. It forces the distance between the end of interval a and start of interval b that follows it to be at least transition_time(a, b). This function must always return a positive or null value.

Definition at line 2597 of file resource.cc.

◆ time_cumuls()

virtual const std::vector< IntVar * > & operations_research::DisjunctiveConstraint::time_cumuls ( ) const
pure virtual

◆ time_slacks()

virtual const std::vector< IntVar * > & operations_research::DisjunctiveConstraint::time_slacks ( ) const
pure virtual

◆ TransitionTime()

int64_t operations_research::DisjunctiveConstraint::TransitionTime ( int before_index,
int after_index )
inline

Definition at line 5833 of file constraint_solver.h.

Member Data Documentation

◆ intervals_

const std::vector<IntervalVar*> operations_research::DisjunctiveConstraint::intervals_
protected

Definition at line 5846 of file constraint_solver.h.

◆ transition_time_

Solver::IndexEvaluator2 operations_research::DisjunctiveConstraint::transition_time_
protected

Definition at line 5847 of file constraint_solver.h.


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