Skip to content

Commit

Permalink
updated star manhattan
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitish Bhupathi Raju authored and Nitish Bhupathi Raju committed Jan 20, 2025
1 parent 03c5a86 commit f48c60b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion verse/utils/star_manhattan.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ def star_manhattan_distance(center, basis, C, g):
constraints = LinearConstraint(A, bl, bu)
bounds = Bounds(lb = lower, ub = upper)
result = sop.milp(c=c, integrality=integrality, constraints=constraints, bounds=bounds)
return -1*result.fun
if result.status != 0:
print("diam_failed")
return 0, 0

return -1*result.fun, 1



Expand Down

0 comments on commit f48c60b

Please sign in to comment.