Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::ConstraintScaler Struct Reference

Detailed Description

Definition at line 84 of file lp_utils.h.

#include <lp_utils.h>

Public Member Functions

absl::Status ScaleAndAddConstraint (absl::Span< const int > vars, absl::Span< const double > coeffs, double lower_bound, double upper_bound, absl::string_view name, absl::Span< const IntegerVariableProto *const > var_domains, ConstraintProto *constraint)
absl::Status ScaleAndAddConstraint (const MPConstraintProto &mp_constraint, CpModelProto *cp_model)

Public Attributes

double max_relative_coeff_error = 0.0
double max_absolute_rhs_error = 0.0
double max_scaling_factor = 0.0
double min_scaling_factor = std::numeric_limits<double>::infinity()
bool keep_names = false
double wanted_precision = 1e-6
int64_t scaling_target = int64_t{1} << 50
std::vector< int > var_indices
std::vector< double > coefficients
std::vector< double > lower_bounds
std::vector< double > upper_bounds

Member Function Documentation

◆ ScaleAndAddConstraint() [1/2]

absl::Status operations_research::sat::ConstraintScaler::ScaleAndAddConstraint ( absl::Span< const int > vars,
absl::Span< const double > coeffs,
double lower_bound,
double upper_bound,
absl::string_view name,
absl::Span< const IntegerVariableProto *const > var_domains,
ConstraintProto * constraint )

Definition at line 747 of file lp_utils.cc.

◆ ScaleAndAddConstraint() [2/2]

absl::Status operations_research::sat::ConstraintScaler::ScaleAndAddConstraint ( const MPConstraintProto & mp_constraint,
CpModelProto * cp_model )

Definition at line 730 of file lp_utils.cc.

Member Data Documentation

◆ coefficients

std::vector<double> operations_research::sat::ConstraintScaler::coefficients

Definition at line 128 of file lp_utils.h.

◆ keep_names

bool operations_research::sat::ConstraintScaler::keep_names = false

Definition at line 119 of file lp_utils.h.

◆ lower_bounds

std::vector<double> operations_research::sat::ConstraintScaler::lower_bounds

Definition at line 129 of file lp_utils.h.

◆ max_absolute_rhs_error

double operations_research::sat::ConstraintScaler::max_absolute_rhs_error = 0.0

Definition at line 114 of file lp_utils.h.

◆ max_relative_coeff_error

double operations_research::sat::ConstraintScaler::max_relative_coeff_error = 0.0

Definition at line 113 of file lp_utils.h.

◆ max_scaling_factor

double operations_research::sat::ConstraintScaler::max_scaling_factor = 0.0

Definition at line 115 of file lp_utils.h.

◆ min_scaling_factor

double operations_research::sat::ConstraintScaler::min_scaling_factor = std::numeric_limits<double>::infinity()

Definition at line 116 of file lp_utils.h.

◆ scaling_target

int64_t operations_research::sat::ConstraintScaler::scaling_target = int64_t{1} << 50

Definition at line 124 of file lp_utils.h.

◆ upper_bounds

std::vector<double> operations_research::sat::ConstraintScaler::upper_bounds

Definition at line 130 of file lp_utils.h.

◆ var_indices

std::vector<int> operations_research::sat::ConstraintScaler::var_indices

Definition at line 127 of file lp_utils.h.

◆ wanted_precision

double operations_research::sat::ConstraintScaler::wanted_precision = 1e-6

Definition at line 123 of file lp_utils.h.


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