Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class RelaxRandomConstraintsGenerator
Note: This documentation is automatically generated.
Pick a random subset of constraints and relax all the variables of these
constraints. Note that to satisfy the difficulty, we might not relax all the
variable of the "last" constraint.
TODO(user): In the presence of connected components, this should just work
on one of them.
Method |
Generate | Return type: Neighborhood Arguments: const CpSolverResponse& initial_solution,
double difficulty, absl::BitGenRef random |
RelaxRandomConstraintsGenerator | Return type: explicit Arguments:
NeighborhoodGeneratorHelper const* helper, const std::string& name |
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 `RelaxRandomConstraintsGenerator` class in C++ randomly selects a subset of constraints and relaxes their variables. The `Generate` method, taking the initial solution, a difficulty parameter, and a random number generator as input, produces a `Neighborhood`. The `RelaxRandomConstraintsGenerator` constructor takes a `NeighborhoodGeneratorHelper` and a name. It might not relax all variables in the \"last\" constraint, to ensure a given difficulty is met. In connected components, it operates on one of them.\n"]]