Send feedback
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.
Send feedback
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 2022-09-14 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?