Skip to content

Commit

Permalink
Solutions to the integer linear program for fixing faulty cocyle lift…
Browse files Browse the repository at this point in the history
…s are now allowed to take negative values.
  • Loading branch information
vincent-grande committed Aug 20, 2024
1 parent 5ba27e5 commit 7a57060
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 7a57060

Please sign in to comment.