I have a set of points in the 2D plane with float coordinates (x, y) and I want to snap them to a grid of points with integer coordinates (X, Y). Two points cannot share the same grid point.
I am trying to solve for the minimal displacement with L1 norm, i.e.
min sum_i ( | Xi - xi | + |Yi - yi | ) s.t. (Xi, Yi) != (Xj, Yj) when i !=j.
Is there a good way to code that in Gurobi API (preferentially C++)?
Please sign in to leave a comment.