Skip to content

Commit

Permalink
fix: Solutions to the integer linear program for fixing faulty cocyle…
Browse files Browse the repository at this point in the history
… lifts are now allowed to take negative values. (#17)
  • Loading branch information
vincent-grande authored Aug 20, 2024
1 parent 1bbb8b8 commit 39f2074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dreimac/complexprojectivecoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down
2 changes: 2 additions & 0 deletions dreimac/toroidalcoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 39f2074

Please sign in to comment.