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

#include <storage.h>

Public Types

using IdType = IndicatorConstraintId
 
using ProtoType = IndicatorConstraintProto
 
using UpdatesProtoType = IndicatorConstraintUpdatesProto
 

Public Member Functions

ProtoType Proto () const
 
std::vector< VariableId > RelatedVariables () const
 
void DeleteVariable (VariableId var)
 

Static Public Member Functions

static IndicatorConstraintData FromProto (const ProtoType &in_proto)
 

Public Attributes

double lower_bound = -std::numeric_limits<double>::infinity()
 
double upper_bound = std::numeric_limits<double>::infinity()
 
SparseCoefficientMap linear_terms
 
std::optional< VariableId > indicator
 
bool activate_on_zero = false
 
std::string name
 

Detailed Description

Internal storage representation for a single indicator constraint.

Implements the interface specified for the ConstraintData parameter of AtomicConstraintStorage.

Definition at line 33 of file storage.h.

Member Typedef Documentation

◆ IdType

Definition at line 34 of file storage.h.

◆ ProtoType

Definition at line 35 of file storage.h.

◆ UpdatesProtoType

Definition at line 36 of file storage.h.

Member Function Documentation

◆ DeleteVariable()

void operations_research::math_opt::IndicatorConstraintData::DeleteVariable ( VariableId var)

Definition at line 74 of file storage.cc.

◆ FromProto()

IndicatorConstraintData operations_research::math_opt::IndicatorConstraintData::FromProto ( const ProtoType & in_proto)
static

The in_proto must be in a valid state; see the inline comments on IndicatorConstraintProto for details.

Definition at line 29 of file storage.cc.

◆ Proto()

IndicatorConstraintData::ProtoType operations_research::math_opt::IndicatorConstraintData::Proto ( ) const

Definition at line 46 of file storage.cc.

◆ RelatedVariables()

std::vector< VariableId > operations_research::math_opt::IndicatorConstraintData::RelatedVariables ( ) const

Definition at line 63 of file storage.cc.

Member Data Documentation

◆ activate_on_zero

bool operations_research::math_opt::IndicatorConstraintData::activate_on_zero = false

Definition at line 51 of file storage.h.

◆ indicator

std::optional<VariableId> operations_research::math_opt::IndicatorConstraintData::indicator

The indicator variable may be unset, in which case the constraint is ignored.

Definition at line 50 of file storage.h.

◆ linear_terms

SparseCoefficientMap operations_research::math_opt::IndicatorConstraintData::linear_terms

Definition at line 47 of file storage.h.

◆ lower_bound

double operations_research::math_opt::IndicatorConstraintData::lower_bound = -std::numeric_limits<double>::infinity()

Definition at line 45 of file storage.h.

◆ name

std::string operations_research::math_opt::IndicatorConstraintData::name

Definition at line 52 of file storage.h.

◆ upper_bound

double operations_research::math_opt::IndicatorConstraintData::upper_bound = std::numeric_limits<double>::infinity()

Definition at line 46 of file storage.h.


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