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."],[[["\u003cp\u003eRelaxRandomConstraintsGenerator randomly selects a subset of constraints and relaxes their variables to explore different solutions.\u003c/p\u003e\n"],["\u003cp\u003eThe relaxation process may not apply to all variables within the final constraint to meet specified difficulty levels.\u003c/p\u003e\n"],["\u003cp\u003eThis generator currently operates on the entire problem, but future improvements aim to focus on individual connected components for enhanced efficiency.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the generation process using the \u003ccode\u003eGenerate\u003c/code\u003e method with parameters like initial solution, difficulty, and random number generation.\u003c/p\u003e\n"]]],["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"],null,["# RelaxRandomConstraintsGenerator\n\nC++ Reference: class RelaxRandomConstraintsGenerator\n====================================================\n\n\nNote: This documentation is automatically generated.\nPick 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. \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#L492) | Return type: `Neighborhood ` Arguments: `const CpSolverResponse& initial_solution, double difficulty, absl::BitGenRef random` \u003cbr /\u003e |\n| [`RelaxRandomConstraintsGenerator`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_lns.h#L489) | Return type: `explicit ` Arguments: ` NeighborhoodGeneratorHelper const* helper, const std::string& name` \u003cbr /\u003e |"]]