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

#include <pb_constraint.h>

Public Member Functions

 VariableWithSameReasonIdentifier (const Trail &trail)
 
 VariableWithSameReasonIdentifier (const VariableWithSameReasonIdentifier &)=delete
 This type is neither copyable nor movable.
 
VariableWithSameReasonIdentifieroperator= (const VariableWithSameReasonIdentifier &)=delete
 
void Resize (int num_variables)
 
void Clear ()
 Clears the cache. Call this before each conflict analysis.
 
BooleanVariable FirstVariableWithSameReason (BooleanVariable var)
 

Detailed Description

Boolean linear constraints can propagate a lot of literals at the same time. As a result, all these literals will have exactly the same reason. It is important to take advantage of that during the conflict computation/minimization. On some problem, this can have a huge impact.

Todo
(user): With the new SAME_REASON_AS mechanism, this is more general so move out of pb_constraint.

Definition at line 704 of file pb_constraint.h.

Constructor & Destructor Documentation

◆ VariableWithSameReasonIdentifier() [1/2]

operations_research::sat::VariableWithSameReasonIdentifier::VariableWithSameReasonIdentifier ( const Trail & trail)
inlineexplicit

Definition at line 706 of file pb_constraint.h.

◆ VariableWithSameReasonIdentifier() [2/2]

operations_research::sat::VariableWithSameReasonIdentifier::VariableWithSameReasonIdentifier ( const VariableWithSameReasonIdentifier & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ Clear()

void operations_research::sat::VariableWithSameReasonIdentifier::Clear ( )
inline

Clears the cache. Call this before each conflict analysis.

Definition at line 721 of file pb_constraint.h.

◆ FirstVariableWithSameReason()

BooleanVariable operations_research::sat::VariableWithSameReasonIdentifier::FirstVariableWithSameReason ( BooleanVariable var)
inline

Returns the first variable with exactly the same reason as 'var' on which this function was called since the last Clear(). Note that if no variable had the same reason, then var is returned.

Definition at line 726 of file pb_constraint.h.

◆ operator=()

VariableWithSameReasonIdentifier & operations_research::sat::VariableWithSameReasonIdentifier::operator= ( const VariableWithSameReasonIdentifier & )
delete

◆ Resize()

void operations_research::sat::VariableWithSameReasonIdentifier::Resize ( int num_variables)
inline

Definition at line 715 of file pb_constraint.h.


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