Skip to content

Commit e89db6a

Browse files
committed
reorg, tweak
1 parent a472227 commit e89db6a

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.11.4","generation_timestamp":"2025-04-03T11:05:25","documenter_version":"1.10.0"}}
1+
{"documenter":{"julia_version":"1.11.4","generation_timestamp":"2025-04-03T11:08:57","documenter_version":"1.10.0"}}

docs/build/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@
6767
Optimum value after 2 iterations = 32/5
6868
2-element Vector{Rational{BigInt}}:
6969
12//5
70-
8//5</code></pre><p>To supress the illustrative output and just present the solution, use <code>pivot_solve(T, false)</code>.</p><p>The alternative <code>pivot_solve!</code> performs the same operations as <code>pivot_solve</code> but modifies <code>T</code> as it goes.</p><h2 id="The-restore-function"><a class="docs-heading-anchor" href="#The-restore-function">The <code>restore</code> function</a><a id="The-restore-function-1"></a><a class="docs-heading-anchor-permalink" href="#The-restore-function" title="Permalink"></a></h2><p>As mentioned, the <code>pivot!</code> and <code>pivot_solve!</code> functions modify the <code>Tableau</code>. Use <code>restore</code> to return a <code>Tableau</code> to its original state like this: <code>T = restore(T)</code>. </p><pre><code class="nohighlight hljs">julia&gt; T
70+
8//5</code></pre><p>To supress the illustrative output and just present the solution, use <code>pivot_solve(T, false)</code>.</p><p>The alternative <code>pivot_solve!</code> performs the same operations as <code>pivot_solve</code> but modifies <code>T</code> as it goes.</p><h3 id="Solution-by-use-of-an-LP-solver"><a class="docs-heading-anchor" href="#Solution-by-use-of-an-LP-solver">Solution by use of an LP solver</a><a id="Solution-by-use-of-an-LP-solver-1"></a><a class="docs-heading-anchor-permalink" href="#Solution-by-use-of-an-LP-solver" title="Permalink"></a></h3><p>The function <code>lp_solve</code> also solves the LP, but uses a standard solver (by default, <a href="https://highs.dev/">HiGHS</a>):</p><pre><code class="nohighlight hljs">julia&gt; lp_solve(T)
71+
2-element Vector{Float64}:
72+
2.4000000000000004
73+
1.599999999999999</code></pre><h2 id="The-restore-function"><a class="docs-heading-anchor" href="#The-restore-function">The <code>restore</code> function</a><a id="The-restore-function-1"></a><a class="docs-heading-anchor-permalink" href="#The-restore-function" title="Permalink"></a></h2><p>As mentioned, the <code>pivot!</code> and <code>pivot_solve!</code> functions modify the <code>Tableau</code>. Use <code>restore</code> to return a <code>Tableau</code> to its original state like this: <code>T = restore(T)</code>. </p><pre><code class="nohighlight hljs">julia&gt; T
7174
4×7 DataFrame
7275
Row │ x1 x2 s1 s2 s3 val RHS
7376
│ Exact Exact Exact Exact Exact Exact Exact
@@ -97,7 +100,4 @@
97100
1 │ 8 3 1 0 0 0 24
98101
2 │ 1 1 0 1 0 0 4
99102
3 │ 1 4 0 0 1 0 12
100-
4 │ -2 -1 0 0 0 1 0</code></pre><h3 id="Solution-by-use-of-an-LP-solver"><a class="docs-heading-anchor" href="#Solution-by-use-of-an-LP-solver">Solution by use of an LP solver</a><a id="Solution-by-use-of-an-LP-solver-1"></a><a class="docs-heading-anchor-permalink" href="#Solution-by-use-of-an-LP-solver" title="Permalink"></a></h3><p>The function <code>lp_solve</code> also solves the LP, but uses a standard solver (HiGHS):</p><pre><code class="nohighlight hljs">julia&gt; lp_solve(T)
101-
2-element Vector{Float64}:
102-
2.4000000000000004
103-
1.599999999999999</code></pre><h2 id="Visualization"><a class="docs-heading-anchor" href="#Visualization">Visualization</a><a id="Visualization-1"></a><a class="docs-heading-anchor-permalink" href="#Visualization" title="Permalink"></a></h2><p>For LPs with exactly two variables, the <code>visualize</code> function creates a plot of the constraints as lines that bound the feasible region and the solution (as a dot).</p><pre><code class="nohighlight hljs">julia&gt; visualize(T)</code></pre><p><img src="visual.png" alt/></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.10.0 on <span class="colophon-date" title="Thursday 3 April 2025 11:05">Thursday 3 April 2025</span>. Using Julia version 1.11.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
103+
4 │ -2 -1 0 0 0 1 0</code></pre><h2 id="Visualization"><a class="docs-heading-anchor" href="#Visualization">Visualization</a><a id="Visualization-1"></a><a class="docs-heading-anchor-permalink" href="#Visualization" title="Permalink"></a></h2><p>For LPs with exactly two variables, the <code>visualize</code> function creates a plot of the constraints as lines that bound the feasible region and the solution (as a dot).</p><pre><code class="nohighlight hljs">julia&gt; visualize(T)</code></pre><p><img src="visual.png" alt/></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.10.0 on <span class="colophon-date" title="Thursday 3 April 2025 11:08">Thursday 3 April 2025</span>. Using Julia version 1.11.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)