Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polyhedron.integral_points() fails for non-rational polytopes #21037

Closed
mkoeppe opened this issue Jul 17, 2016 · 14 comments
Closed

Polyhedron.integral_points() fails for non-rational polytopes #21037

mkoeppe opened this issue Jul 17, 2016 · 14 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jul 17, 2016

    sage: P = Polyhedron(vertices=((0, 0), (17,3))) + 1/1000*polytopes.regular_polygon(5)
    sage: P.integral_points()
    TypeError: int() argument must be a string or a number, not 'AlgebraicReal'

(This is an irrational polytope with a small bounding box. Sage should be able to enumerate it easily using the rectangular_box_points method.)

CC: @tscrim @novoselt @dimpase @videlec @vbraun @jdemeyer

Component: geometry

Author: Travis Scrimshaw

Branch/Commit: 35eca5a

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/21037

@mkoeppe mkoeppe added this to the sage-7.3 milestone Jul 17, 2016
@tscrim
Copy link
Collaborator

tscrim commented Jul 17, 2016

Author: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Jul 17, 2016

Commit: b09bea7

@tscrim
Copy link
Collaborator

tscrim commented Jul 17, 2016

@tscrim
Copy link
Collaborator

tscrim commented Jul 17, 2016

comment:1

Just not enough error catching.


New commits:

b09bea7Fixing integral points for non-rational points.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 17, 2016

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

35eca5aFixing integral points for non-rational points.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 17, 2016

Changed commit from b09bea7 to 35eca5a

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 17, 2016

Reviewer: Matthias Koeppe

@mkoeppe
Copy link
Member Author

mkoeppe commented Jul 17, 2016

comment:4

Thanks for fixing this!
I've moved the other item to #21041.

@vbraun
Copy link
Member

vbraun commented Jul 18, 2016

comment:5
sage -t --long src/sage/geometry/integral_points.pyx
**********************************************************************
File "src/sage/geometry/integral_points.pyx", line 539, in sage.geometry.integral_points.?
Failed example:
    alarm(0.5); P.integral_points()
Expected:
    Traceback (most recent call last):
    ...
    AlarmInterrupt
Got:
    Exception cysignals.signals.AlarmInterrupt: AlarmInterrupt() in 'sage.geometry.integral_points.InequalityCollection.are_satisfied' ignored
    ((-5, -8, -10, -15, -12, -9, -6, -3),
     (-3, -5, -6, -9, -7, -5, -3, -1),
     (-1, -3, -3, -5, -4, -3, -2, -1),
     (-1, -2, -2, -3, -2, -1, 0, 0))
**********************************************************************
1 item had failures:
   1 of  51 in sage.geometry.integral_points.?
    [170 tests, 1 failure, 51.33 s]

@tscrim
Copy link
Collaborator

tscrim commented Jul 18, 2016

comment:6

IIRC, I also got that error sporadically when I was testing #18029 as well, but I don't seem to get that on develop. Jeroen, any ideas?

@vbraun
Copy link
Member

vbraun commented Jul 19, 2016

comment:7

yes, the error is coming from #18029

@vbraun
Copy link
Member

vbraun commented Jul 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants