C++ Reference: class ConstraintGraphNeighborhoodGenerator
Note: This documentation is automatically generated.
Pick a random subset of constraint and relax all of their variables. We are a
bit smarter than this because after the first constraint is selected, we only
select constraints that share at least one variable with the already selected
constraints. The variable from the "last" constraint are selected randomly.
Method |
ConstraintGraphNeighborhoodGenerator | Return type: explicit Arguments:
NeighborhoodGeneratorHelper const* helper, const std::string& name |
Generate | Return type: Neighborhood Arguments: const CpSolverResponse& initial_solution,
double difficulty, absl::BitGenRef random |
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 ConstraintGraphNeighborhoodGenerator focuses on relaxing a subset of related constraints to explore different solutions in constraint programming."],["It intelligently selects constraints sharing variables, ensuring the relaxed variables are interconnected and potentially impactful."],["This generator offers a method for creating neighborhoods and another for generating specific neighborhoods based on a given solution and difficulty level."]]],[]]