Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class RelaxRandomVariablesGenerator
Note: This documentation is automatically generated.
Pick a random subset of variables.
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 |
RelaxRandomVariablesGenerator | 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."],[[["\u003cp\u003eThe RelaxRandomVariablesGenerator is a class within the or-tools library, specifically designed to randomly select a subset of variables for use in local search algorithms.\u003c/p\u003e\n"],["\u003cp\u003eIt aims to simplify the problem by relaxing constraints on these selected variables to explore a wider solution space, but currently lacks handling for connected components and may need refinement in that aspect.\u003c/p\u003e\n"],["\u003cp\u003eTwo primary methods are associated with this class: 'Generate', which produces a neighborhood for local search based on a given solution, difficulty level and random number generator; and 'RelaxRandomVariablesGenerator' itself, which acts as a constructor initializing the generator using a helper object and a descriptive name.\u003c/p\u003e\n"]]],["The `RelaxRandomVariablesGenerator` class in C++ randomly selects a subset of variables. Its core functionality is provided by two methods: `RelaxRandomVariablesGenerator`, the constructor, which takes a `NeighborhoodGeneratorHelper` and a name; and `Generate`, which takes an initial solution, a difficulty level, and a random number generator, then it returns a `Neighborhood`. The documentation also mentions a TODO item about handling connected components.\n"],null,["# RelaxRandomVariablesGenerator\n\nC++ Reference: class RelaxRandomVariablesGenerator\n==================================================\n\n\nNote: This documentation is automatically generated.\nPick a random subset of variables. \n\nTODO(user): In the presence of connected components, this should just work on one of them.\n\n| Method ||\n|-----------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [`Generate`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_lns.h#L477) | Return type: `Neighborhood ` Arguments: `const CpSolverResponse& initial_solution, double difficulty, absl::BitGenRef random` \u003cbr /\u003e |\n| [`RelaxRandomVariablesGenerator`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_lns.h#L474) | Return type: `explicit ` Arguments: ` NeighborhoodGeneratorHelper const* helper, const std::string& name` \u003cbr /\u003e |"]]