From 7a570606685251fabb4220bfb67f290774a8c9e3 Mon Sep 17 00:00:00 2001 From: grande Date: Tue, 20 Aug 2024 10:36:37 +0000 Subject: [PATCH] Solutions to the integer linear program for fixing faulty cocyle lifts are now allowed to take negative values. --- dreimac/complexprojectivecoords.py | 3 +++ dreimac/toroidalcoords.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dreimac/complexprojectivecoords.py b/dreimac/complexprojectivecoords.py index 27f0f0d..936fa83 100644 --- a/dreimac/complexprojectivecoords.py +++ b/dreimac/complexprojectivecoords.py @@ -132,10 +132,13 @@ def get_coordinates( n_edges = delta2.shape[1] objective = np.zeros((n_edges), dtype=int) integrality = np.ones((n_edges), dtype=int) + bounds = scipy.optimize.Bounds() # empty bounds + optimizer_solution = milp( objective, integrality=integrality, constraints=constraints, + bounds=bounds, ) if not optimizer_solution["success"]: diff --git a/dreimac/toroidalcoords.py b/dreimac/toroidalcoords.py index f875baa..77e7438 100644 --- a/dreimac/toroidalcoords.py +++ b/dreimac/toroidalcoords.py @@ -148,11 +148,13 @@ def get_coordinates( n_edges = delta1.shape[1] objective = np.zeros((n_edges)) integrality = np.ones((n_edges)) + bounds = scipy.optimize.Bounds() # empty bounds optimizer_solution = milp( objective, integrality=integrality, constraints=constraints, + bounds=bounds, ) if not optimizer_solution["success"]: