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

#include <constraint_solver.h>

Inheritance diagram for operations_research::CastConstraint:
operations_research::Constraint operations_research::PropagationBaseObject operations_research::BaseObject operations_research::IfThenElseCt

Public Member Functions

 CastConstraint (Solver *const solver, IntVar *const target_var)
 
 ~CastConstraint () override
 
IntVartarget_var () const
 
- 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

IntVar *const target_var_
 

Detailed Description

Cast constraints are special channeling constraints designed to keep a variable in sync with an expression. They are created internally when Var() is called on a subclass of IntExpr.

Definition at line 3886 of file constraint_solver.h.

Constructor & Destructor Documentation

◆ CastConstraint()

operations_research::CastConstraint::CastConstraint ( Solver *const solver,
IntVar *const target_var )
inline

Definition at line 3888 of file constraint_solver.h.

◆ ~CastConstraint()

operations_research::CastConstraint::~CastConstraint ( )
inlineoverride

Definition at line 3892 of file constraint_solver.h.

Member Function Documentation

◆ target_var()

IntVar * operations_research::CastConstraint::target_var ( ) const
inline

Definition at line 3894 of file constraint_solver.h.

Member Data Documentation

◆ target_var_

IntVar* const operations_research::CastConstraint::target_var_
protected

Definition at line 3897 of file constraint_solver.h.


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