Instance Modifiers¶
Modifiers wrap any instance generator and post-process the model before it reaches the environment.
EmbedObjective¶
EmbedObjective
¶
Bases: InstanceGenerator
This class is a instance generator modifier. It embeds an objective function into the generated instances. It modifies the instance generator to include a variable representing the objective function, and adds a constraint that ensures the new variable is equal to the old objective function. It then modifies the objective to be the new variable, effectively embedding the objective into the instance.
Source code in gyozas/instances/modifiers/embed_objective.py
__init__(instance_generator, replace_fobj=False)
¶
Initializes the EmbedObjective with an instance generator.
:param instance_generator: The instance generator to be embedded in the system.
Source code in gyozas/instances/modifiers/embed_objective.py
generate_instance(*args, **kwargs)
¶
Generates an instance using the embedded instance generator.
:param args: Positional arguments for the instance generator. :param kwargs: Keyword arguments for the instance generator. :return: The generated instance.
Source code in gyozas/instances/modifiers/embed_objective.py
SetParameters¶
SetParameters
¶
Bases: InstanceGenerator
This class is a instance generator modifier. It sets SCIP solver parameters into the generated instances.
Source code in gyozas/instances/modifiers/set_parameters.py
__init__(instance_generator, parameters)
¶
Initializes the SetParameters with an instance generator and the parameters dictionnary.
:param instance_generator: The instance generator. :param parameters: The parameters to be set in the SCIP solver.
Source code in gyozas/instances/modifiers/set_parameters.py
generate_instance(*args, **kwargs)
¶
Generates an instance and set parameters in the SCIP solver.
:param args: Positional arguments for the instance generator. :param kwargs: Keyword arguments for the instance generator. :return: The generated instance.
Source code in gyozas/instances/modifiers/set_parameters.py
Convenience Presets¶
Pre-built SetParameters instances for common configurations:
| Name | Effect |
|---|---|
SetNoCuts |
Disables all cutting plane separators |
SetNoHeuristics |
Disables all primal heuristics |
SetNoDisplay |
Silences SCIP solver output |
SetDFSNodeSelection |
Forces depth-first node selection |
SetBFSNodeSelection |
Forces breadth-first node selection |