Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Neighborhood returned by Neighborhood generators. More...
#include <cp_model_lns.h>
Public Attributes | |
bool | is_generated = false |
True if neighborhood generator was able to generate a neighborhood. | |
bool | is_reduced = false |
bool | is_simple = false |
True if this neighborhood was just obtained by fixing some variables. | |
CpModelProto | delta |
int64_t | id = 0 |
std::string | source_info = "" |
Overwrites the name of the neighborhood generator in the logs. | |
int | num_relaxed_variables = 0 |
Statistic, only filled when is_simple is true. | |
int | num_relaxed_variables_in_objective = 0 |
std::vector< int > | variables_that_can_be_fixed_to_local_optimum |
Neighborhood returned by Neighborhood generators.
Definition at line 46 of file cp_model_lns.h.
CpModelProto operations_research::sat::Neighborhood::delta |
Specification of the delta between the initial model and the lns fragment. The delta will contains all variables from the initial model, potentially with updated domains. It can contains new variables and new constraints, and solution hinting.
Definition at line 61 of file cp_model_lns.h.
int64_t operations_research::sat::Neighborhood::id = 0 |
Neighborhood Id. Used to identify the neighborhood by a generator. Currently only used by WeightedRandomRelaxationNeighborhoodGenerator.
Definition at line 67 of file cp_model_lns.h.
bool operations_research::sat::Neighborhood::is_generated = false |
True if neighborhood generator was able to generate a neighborhood.
Definition at line 48 of file cp_model_lns.h.
bool operations_research::sat::Neighborhood::is_reduced = false |
True if an optimal solution to the neighborhood is also an optimal solution to the original model.
Definition at line 52 of file cp_model_lns.h.
bool operations_research::sat::Neighborhood::is_simple = false |
True if this neighborhood was just obtained by fixing some variables.
Definition at line 55 of file cp_model_lns.h.
int operations_research::sat::Neighborhood::num_relaxed_variables = 0 |
Statistic, only filled when is_simple is true.
Definition at line 73 of file cp_model_lns.h.
int operations_research::sat::Neighborhood::num_relaxed_variables_in_objective = 0 |
Definition at line 74 of file cp_model_lns.h.
std::string operations_research::sat::Neighborhood::source_info = "" |
Overwrites the name of the neighborhood generator in the logs.
Definition at line 70 of file cp_model_lns.h.
std::vector<int> operations_research::sat::Neighborhood::variables_that_can_be_fixed_to_local_optimum |
Only filled when is_simple is true. If we solve the fragment to optimality, then we can just fix the variable listed here to that optimal solution.
This can happen if the neighborhood fully cover some part that are completely independent from the rest of the model. Like for instance an unused but not yet fixed variable.
Definition at line 85 of file cp_model_lns.h.