Skip to content

Commit 25c193a

Browse files
author
Matthias Koeppe
committed
src/sage/numerical/interactive_simplex_method.py: Replace .all import, add # optional - sage.plot
1 parent d7f8a5d commit 25c193a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/sage/numerical/interactive_simplex_method.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
6565
Since it has only two variables, we can solve it graphically::
6666
67-
sage: P.plot()
67+
sage: P.plot() # optional - sage.plot
6868
Graphics object consisting of 19 graphics primitives
6969
7070
@@ -182,7 +182,7 @@
182182
from copy import copy
183183

184184
from sage.misc.abstract_method import abstract_method
185-
from sage.geometry.all import Polyhedron
185+
from sage.geometry.polyhedron.constructor import Polyhedron
186186
from sage.matrix.special import column_matrix
187187
from sage.matrix.special import identity_matrix
188188
from sage.matrix.constructor import Matrix as matrix
@@ -1534,19 +1534,19 @@ def plot(self, *args, **kwds):
15341534
sage: b = (1000, 1500)
15351535
sage: c = (10, 5)
15361536
sage: P = InteractiveLPProblem(A, b, c, ["C", "B"], variable_type=">=")
1537-
sage: p = P.plot()
1538-
sage: p.show()
1537+
sage: p = P.plot() # optional - sage.plot
1538+
sage: p.show() # optional - sage.plot
15391539
15401540
In this case the plot works better with the following axes ranges::
15411541
1542-
sage: p = P.plot(0, 1000, 0, 1500)
1543-
sage: p.show()
1542+
sage: p = P.plot(0, 1000, 0, 1500) # optional - sage.plot
1543+
sage: p.show() # optional - sage.plot
15441544
15451545
TESTS:
15461546
15471547
We check that zero objective can be dealt with::
15481548
1549-
sage: InteractiveLPProblem(A, b, (0, 0), ["C", "B"], variable_type=">=").plot()
1549+
sage: InteractiveLPProblem(A, b, (0, 0), ["C", "B"], variable_type=">=").plot() # optional - sage.plot
15501550
Graphics object consisting of 8 graphics primitives
15511551
"""
15521552
FP = self.plot_feasible_set(*args, **kwds)
@@ -1611,13 +1611,13 @@ def plot_feasible_set(self, xmin=None, xmax=None, ymin=None, ymax=None,
16111611
sage: b = (1000, 1500)
16121612
sage: c = (10, 5)
16131613
sage: P = InteractiveLPProblem(A, b, c, ["C", "B"], variable_type=">=")
1614-
sage: p = P.plot_feasible_set()
1615-
sage: p.show()
1614+
sage: p = P.plot_feasible_set() # optional - sage.plot
1615+
sage: p.show() # optional - sage.plot
16161616
16171617
In this case the plot works better with the following axes ranges::
16181618
1619-
sage: p = P.plot_feasible_set(0, 1000, 0, 1500)
1620-
sage: p.show()
1619+
sage: p = P.plot_feasible_set(0, 1000, 0, 1500) # optional - sage.plot
1620+
sage: p.show() # optional - sage.plot
16211621
"""
16221622
if self.n() != 2:
16231623
raise ValueError("only problems with 2 variables can be plotted")

0 commit comments

Comments
 (0)