C++ Reference: class SharedBoundsManager

Note: This documentation is automatically generated.

This class manages a pool of lower and upper bounds on a set of variables in a parallel context.
Method
FixVariablesFromPartialSolution

Return type: void

Arguments: const std::vector<int64_t>& solution, const std::vector<int>& variables_to_fix

If we solved a small independent component of the full problem, then we can in most situation fix the solution on this subspace. Note that because there can be more than one optimal solution on an independent subproblem, it is important to do that in a locked fashion, and reject future incompatible fixing.

GetChangedBounds

Return type: void

Arguments: int id, std::vector<int>* variables, std::vector<int64_t>* new_lower_bounds, std::vector<int64_t>* new_upper_bounds

When called, returns the set of bounds improvements since the last time this method was called with the same id.

LogStatistics

Return type: void

Arguments: SolverLogger* logger

NumBoundsExported

Return type: int

Arguments: const std::string& worker_name

RegisterNewId

Return type: int

Returns a new id to be used in GetChangedBounds(). This is just an ever increasing sequence starting from zero. Note that the class is not designed to have too many of these.

ReportPotentialNewBounds

Return type: void

Arguments: const CpModelProto& model_proto, const std::string& worker_name, const std::vector<int>& variables, const std::vector<int64_t>& new_lower_bounds, const std::vector<int64_t>& new_upper_bounds

Reports a set of locally improved variable bounds to the shared bounds manager. The manager will compare these bounds changes against its global state, and incorporate the improving ones.

SharedBoundsManager

Return type: explicit

Arguments: const CpModelProto& model_proto

Synchronize

Return type: void

Publishes any new bounds so that GetChangedBounds() will reflect the latest state.