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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["RelaxRandomConstraintsGenerator randomly selects a subset of constraints and relaxes their variables to explore different solutions."],["The relaxation process may not apply to all variables within the final constraint to meet specified difficulty levels."],["This generator currently operates on the entire problem, but future improvements aim to focus on individual connected components for enhanced efficiency."],["Users can customize the generation process using the `Generate` method with parameters like initial solution, difficulty, and random number generation."]]],["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"]]