Skip to content

Fix equation handling of Polyhedron.to_linear_program() and thus integral_points_count(preprocess=True) #24154

@mkoeppe

Description

@mkoeppe

As reported in https://groups.google.com/d/msg/sage-devel/TuF0CidR-JI/8-zpcu-MCgAJ, the preprocessing code in integral_points_count sometimes fails. This is ultimately because Polyhedron.to_linear_program does not handle equations correctly.

sage: P = Polyhedron(vertices=[[19]])
sage: P.to_linear_program().show()
Maximization:
  

Constraints:
  constraint_0: -19 <= x_0 <= -19
Variables:
  x_0 is a continuous variable (min=-oo, max=+oo)
sage: P.to_linear_program().polyhedron().vertices_list()
[[-19]]

CC: @simon-king-jena @videlec @jplab

Component: geometry

Author: Matthias Koeppe

Branch/Commit: 6ad4bf7

Reviewer: Dima Pasechnik

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions