QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.repair.BinaryMILPRepair Class Reference

Minimize Hamming distance under linear equalities and inequalities. More...

Public Member Functions

 feasible (self, genome)
 Check the actual linear residuals of a rounded binary assignment.
 repair (self, proposal)
 Solve for the closest feasible point, or report an unresolved repair.

Detailed Description

Minimize Hamming distance under linear equalities and inequalities.

Use SciPy/HiGHS to repair a binary genome.

:param dimension: Number of binary decision variables.
:param constraints: A scipy.optimize.LinearConstraint or a sequence of them.
:param time_limit: Optional positive limit per solver call, in seconds.
:param node_limit: Optional positive limit on explored solver nodes.
:param accept_incumbent: Use a verified feasible incumbent when status denotes a limit.

Definition at line 42 of file repair.py.

Member Function Documentation

◆ feasible()

qdpy.algorithms.repair.BinaryMILPRepair.feasible ( self,
genome )

Check the actual linear residuals of a rounded binary assignment.

Use a fixed absolute tolerance of 1e-7 for solver residuals.

Definition at line 70 of file repair.py.

◆ repair()

qdpy.algorithms.repair.BinaryMILPRepair.repair ( self,
proposal )

Solve for the closest feasible point, or report an unresolved repair.

Call HiGHS even for a feasible input and verify its returned assignment.

Definition at line 80 of file repair.py.


The documentation for this class was generated from the following file: