Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ModelRandomGenerator
Note: This documentation is automatically generated.
The model "singleton" random engine used in the solver.
In test, we usually set use_absl_random() so that the sequence is changed at
each invocation. This way, clients do not relly on the wrong assumption that
a particular optimal solution will be returned if they are many equivalent
ones.
This is just used to display ABSL_RANDOM_SALT_OVERRIDE in the log so that
it is possible to reproduce a failure more easily while looking at a solver
log.
TODO(user): I didn't find a cleaner way to log this.
We seed the strategy at creation only. This should be enough for our use
case since the SatParameters is set first before the solver is created. We
also never really need to change the seed afterwards, it is just used to
diversify solves with identical parameters on different Model objects.
[[["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."],[[["The `ModelRandomGenerator` is a singleton random engine used within the solver, primarily for diversification of solutions."],["In testing environments, `use_absl_random()` is typically employed to alter the random sequence with each invocation, preventing reliance on specific optimal solutions when multiple equivalents exist."],["The random seed is established during the creation of the `ModelRandomGenerator` and remains constant thereafter, serving to differentiate solutions across distinct `Model` objects with identical parameters."],["`LogSalt` aids in reproducibility of solver failures by logging the `ABSL_RANDOM_SALT_OVERRIDE` value."]]],[]]