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

#include <cp_model_mapping.h>

Public Member Functions

double ScaleIntegerObjective (IntegerValue value) const
 
double ScaleObjective (double value) const
 

Public Attributes

double scaling_factor = 1.0
 
double offset = 0.0
 
IntegerVariable objective_var = kNoIntegerVariable
 
std::vector< IntegerVariable > vars
 
std::vector< IntegerValue > coeffs
 
absl::flat_hash_set< IntegerVariable > objective_impacting_variables
 

Detailed Description

For an optimization problem, this contains the internal integer objective to minimize and information on how to display it correctly in the logs.

Definition at line 42 of file cp_model_mapping.h.

Member Function Documentation

◆ ScaleIntegerObjective()

double operations_research::sat::ObjectiveDefinition::ScaleIntegerObjective ( IntegerValue value) const
inline

Definition at line 59 of file cp_model_mapping.h.

◆ ScaleObjective()

double operations_research::sat::ObjectiveDefinition::ScaleObjective ( double value) const
inline

Definition at line 63 of file cp_model_mapping.h.

Member Data Documentation

◆ coeffs

std::vector<IntegerValue> operations_research::sat::ObjectiveDefinition::coeffs

Definition at line 52 of file cp_model_mapping.h.

◆ objective_impacting_variables

absl::flat_hash_set<IntegerVariable> operations_research::sat::ObjectiveDefinition::objective_impacting_variables

List of variable that when set to their lower bound should help getting a better objective. This is used by some search heuristic to preferably assign any of the variable here to their lower bound first.

Definition at line 57 of file cp_model_mapping.h.

◆ objective_var

IntegerVariable operations_research::sat::ObjectiveDefinition::objective_var = kNoIntegerVariable

Definition at line 45 of file cp_model_mapping.h.

◆ offset

double operations_research::sat::ObjectiveDefinition::offset = 0.0

Definition at line 44 of file cp_model_mapping.h.

◆ scaling_factor

double operations_research::sat::ObjectiveDefinition::scaling_factor = 1.0

Definition at line 43 of file cp_model_mapping.h.

◆ vars

std::vector<IntegerVariable> operations_research::sat::ObjectiveDefinition::vars

The objective linear expression that should be equal to objective_var. If not all proto variable have an IntegerVariable view, then some vars will be set to kNoIntegerVariable. In practice, when this is used, we make sure there is a view though.

Definition at line 51 of file cp_model_mapping.h.


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