Opened 5 years ago

Last modified 5 years ago

## #24154 closed defect

# Fix equation handling of Polyhedron.to_linear_program() and thus integral_points_count(preprocess=True) — at Version 1

Reported by: | Matthias Köppe | Owned by: | |
---|---|---|---|

Priority: | critical | Milestone: | sage-8.1 |

Component: | geometry | Keywords: | |

Cc: | Simon King, Vincent Delecroix, Jean-Philippe Labbé | Merged in: | |

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description (last modified by )

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]]

**Note:**See TracTickets for help on using tickets.