Opened 6 years ago

Closed 6 years ago

#20415 closed enhancement (fixed)

Polyhedron.to_linear_program should select solver by base_ring

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.2
Component: geometry Keywords: lp
Cc: dimpase, vdelecroix, novoselt Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 7b7aa5e (Commits, GitHub, GitLab) Commit: 7b7aa5e78ce749805681e252e402f9c08feedbd9
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

This is a follow-up on #20301. #20296 provides a way to select a suitable solver by its base_ring.

Polyhedron.to_linear_program should do that.

Note, for exact polyhedra, this will change the behavior of to_linear_program from inexact computation to exact computation, which will be much slower (but note, speed is irrelevant for this method, because when the Polyhedron was set up, already the double description has been computed eagerly.)

To restore the old behavior, the user would need to pass an explicit base_ring=RDF or solver=... argument to to_linear_program. (The patch adds many examples that illustrate this.)

Change History (5)

comment:1 Changed 6 years ago by mkoeppe

  • Branch set to u/mkoeppe/polyhedron_to_linear_program_should_select_solver_by_base_ring

comment:2 Changed 6 years ago by mkoeppe

  • Commit set to 7b7aa5e78ce749805681e252e402f9c08feedbd9
  • Description modified (diff)
  • Status changed from new to needs_review

New commits:

20d6c5aget_backend: Pass base_ring to PPLBackend, raise an error if not QQ
4b42d4aget_solver: Take base_ring's fraction field
7b7aa5eto_linear_program: Select solver according to base_ring, which can be overriden by keyword argument

comment:3 Changed 6 years ago by mkoeppe

  • Description modified (diff)

comment:4 Changed 6 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

looks good to me.

comment:5 Changed 6 years ago by vbraun

  • Branch changed from u/mkoeppe/polyhedron_to_linear_program_should_select_solver_by_base_ring to 7b7aa5e78ce749805681e252e402f9c08feedbd9
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.