Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class ModelCopy
Note: This documentation is automatically generated.
This helper class perform copy with simplification from a model and a
partial assignment to another model. The purpose is to miminize the size of
the copied model, as well as to reduce the pressure on the memory sub-system.
It is currently used by the LNS part, but could be used with any other scheme
that generates partial assignments.
Copies all constraints from in_model to working model of the context.
During the process, it will read variable domains from the context, and
simplify constraints to minimize the size of the copied model.
Thus it is important that the context->working_model already have the
variables part copied.
It returns false iff the model is proven infeasible.
It does not clear the constraints part of the working model of the context.
Note(user): If first_copy is true, we will reorder the scheduling
constraint so that they only use reference to previously defined intervals.
This allow to be more efficient later in a few preprocessing steps.
Copy variables from the in_model to the working model.
It reads the 'ignore_names' parameters from the context, and keeps or
deletes names accordingly.
[[["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 `ModelCopy` class helps efficiently copy and simplify models in the OR-Tools Constraint Programming solver."],["It minimizes the copied model's size and reduces memory usage by simplifying constraints and leveraging partial assignments."],["`ModelCopy` is particularly useful for the Large Neighborhood Search (LNS) but can be applied to other constraint programming techniques."],["It includes methods to import and simplify constraints and variables, like `ImportAndSimplifyConstraints` and `ImportVariablesAndMaybeIgnoreNames`."],["The `ImportAndSimplifyConstraints` method also has an option to reorder scheduling constraints for better preprocessing efficiency."]]],[]]