Opened 7 years ago

Last modified 3 years ago

#20570 new enhancement

InteractiveLPProblem: refactor plot method — at Version 2

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-wishlist
Component: linear programming Keywords:
Cc: Peijun Xiao, Andrey Novoseltsev Merged in:
Authors: Peijun Xiao Reviewers:
Report Upstream: N/A Work issues:
Branch: u/mkoeppe/interactivelpproblem__refactor_plot_method (Commits, GitHub, GitLab) Commit: aa3fa4bcfa7ede354fd4b214a6c3e8f9e4148a53
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

This is preparation for #18805 - Add didactical implementation of tableau cutting planes to interactive_simplex_method and in fact split out from the larger patch there.

While preparing this patch, I noticed that the code in current Sage is not able to plot some LPs with irrational data. This appears to be due to a bug in the Sage polyhedron code for RDF data (which InteractiveLP uses when the data are not rational).

            sage: poly = polytopes.regular_polygon(7)
            sage: lp, x = poly.to_linear_program(solver='InteractiveLP', return_variable=True)
            sage: lp.set_objective(x[0] + x[1])
            sage: b = lp.get_backend()
            sage: P = b.interactive_lp_problem()
            sage: p = P.plot()    ### ERROR

The code on this ticket does not fix this; it actually has a different failure mode for this example.

Change History (2)

comment:1 Changed 7 years ago by Matthias Köppe

Branch: u/mkoeppe/interactivelpproblem__refactor_plot_method

comment:2 Changed 7 years ago by Matthias Köppe

Cc: Peijun Xiao Andrey Novoseltsev added
Commit: aa3fa4bcfa7ede354fd4b214a6c3e8f9e4148a53
Description: modified (diff)

New commits:

2ac4760InteractiveLPProblem: Refactor plot using new methods get_plot_bounding_box and plot_objective_growth_and_solution
0416addMinor cleanup
aa3fa4bAdd testcase for plotting of irrational polygons
Note: See TracTickets for help on using tickets.