Stay organized with collections
Save and categorize content based on your preferences.
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["The `SharedBoundsManager` class manages variable bounds in a parallel context. Key actions include: `ReportPotentialNewBounds` to share improved bounds; `GetChangedBounds` to retrieve updated bounds using a unique ID obtained from `RegisterNewId`; `FixVariablesFromPartialSolution` to fix variables based on a partial solution; and `Synchronize` to update and publish bounds. It tracks bounds improvements against its global state, logs statistics, and counts the number of bounds exported for each worker.\n"],null,[]]