tulip-control / polytope

Geometric operations on polytopes of any dimension
https://pypi.org/project/polytope
Other
73 stars 19 forks source link

Removing the least constraining hyperplane #66

Closed krooken closed 2 years ago

krooken commented 3 years ago

Currently, the check for linearly independent rows in reduce() picks the row to remove arbitrarily. This is not a problem as long as the hyperplanes are linearly independent. However, because of abs_tol, rows might be removed that are not exactly independent. In those cases, it is better to remove the hyperplane that constrains the least.

Dependent rows have all parameters equal after they have been normed. The value in the b vector may be included when calculating the norm. However, the tolerance for the comparison is no longer absolute when b is included in the calculation of the norm. Therefore, the check for dependent rows should first look for (nearly) parallel hyperplanes and then remove the least constraining one.

murrayrm commented 3 years ago

@krooken Can you rebase against master and fix up the conflicts?

krooken commented 3 years ago

This is ready for review now.

slivingston commented 2 years ago

@krooken Excellent!

slivingston commented 2 years ago

@krooken Thanks for your work here and in other pull requests. My reviews are arriving much later than I would have wanted.