Repair
repair
¶
Components for repairing solutions in the context of LNS.
repair_assumptions(solver: Solver, solver_config: SolverConfig, fixed_atoms: set[Symbol]) -> Optional[Model]
¶
Repair solution by assuming fixed atoms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solver
|
Solver
|
Solver instance. |
required |
solver_config
|
SolverConfig
|
Solver configuration. |
required |
fixed_atoms
|
set[Symbol]
|
Set of fixed atoms. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Model]
|
New model if found, otherwise None. |
repair_heuristics(*, solver: Solver, solver_config: SolverConfig, fixed_atoms_heuristics: set[Symbol], prev_fixed_atoms_heuristics: set[Symbol], step: int, logger: LNSLogger) -> Optional[Model]
¶
Repair solution by prioritizing fixed atoms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solver
|
Solver
|
Solver instance. |
required |
solver_config
|
SolverConfig
|
Solver configuration. |
required |
fixed_atoms_heuristics
|
set[Symbol]
|
Set of fixed atoms for heuristics. |
required |
prev_fixed_atoms_heuristics
|
set[Symbol]
|
Set of previously fixed atoms for heuristics. |
required |
step
|
int
|
Current step number. |
required |
logger
|
LNSLogger
|
Logger instance. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Model]
|
New model if found, otherwise None. |