Skip to content

Commit

Permalink
build based on a2e5964
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jul 24, 2024
1 parent fe734c1 commit df35855
Show file tree
Hide file tree
Showing 24 changed files with 454 additions and 320 deletions.
4 changes: 2 additions & 2 deletions dev/background/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/examples/DTMP_example1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
set_silent(model)</code></pre><p>First we need to create all of the variables in the upper and lower problems:</p><p>Upper level variables</p><pre><code class="language-julia">@variable(Upper(model), x, start = 1)</code></pre><p>$ x $</p><p>Lower level variables</p><pre><code class="language-julia">@variable(Lower(model), y, start = 6)</code></pre><p>$ y $</p><p>Then we can add the objective and constraints of the upper problem:</p><p>Upper level objecive function</p><pre><code class="language-julia">@objective(Upper(model), Min, 4y - x)</code></pre><p>$ 4 y - x $</p><p>Upper level constraints</p><pre><code class="language-julia">@constraint(Upper(model), y + 2x &lt;= 8)</code></pre><p class="math-container">\[ 2 x + y \leq 8 \]</p><p>Followed by the objective and constraints of the lower problem:</p><p>Lower objective function</p><pre><code class="language-julia">@objective(Lower(model), Min, - y -x )</code></pre><p>$ -y - x $</p><p>Lower constraints</p><pre><code class="language-julia">@constraint(Lower(model), - y &lt;= 0)
@constraint(Lower(model), y + x &lt;= 7)
@constraint(Lower(model), - x &lt;= 0)
@constraint(Lower(model), x &lt;= 4)</code></pre><p class="math-container">\[ x \leq 4 \]</p><p>Now we can solve the problem and verify the solution again that reported by book</p><pre><code class="language-julia">optimize!(model)</code></pre><p>Results</p><pre><code class="language-julia">value(x)</code></pre><pre class="documenter-example-output">1.0000100892122645</pre><pre><code class="language-julia">value(y)</code></pre><pre class="documenter-example-output">5.9999799010742905</pre><div class="admonition is-info"><header class="admonition-header">Info</header><div class="admonition-body"><p><a href="https://github.com/joaquimg/BilevelJuMP.jl/blob/master/docs/src/examples/DTMP_example1.jl">View this file on Github</a>.</p></div></div><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../FOBP_example5/">« Foundations of Bilevel Programming: Example Chapter 8.1, Page 255</a><a class="docs-footer-nextpage" href="../PHTP_example1/">Princeton Handbook of Test Problems: Test 9.3.2 »</a><div class="flexbox-break"></div><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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 19 December 2023 03:37">Tuesday 19 December 2023</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
@constraint(Lower(model), x &lt;= 4)</code></pre><p class="math-container">\[ x \leq 4 \]</p><p>Now we can solve the problem and verify the solution again that reported by book</p><pre><code class="language-julia">optimize!(model)</code></pre><p>Results</p><pre><code class="language-julia">value(x)</code></pre><pre class="documenter-example-output">1.000010089212264</pre><pre><code class="language-julia">value(y)</code></pre><pre class="documenter-example-output">5.999979901074291</pre><div class="admonition is-info"><header class="admonition-header">Info</header><div class="admonition-body"><p><a href="https://github.com/joaquimg/BilevelJuMP.jl/blob/master/docs/src/examples/DTMP_example1.jl">View this file on Github</a>.</p></div></div><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../FOBP_example5/">« Foundations of Bilevel Programming: Example Chapter 8.1, Page 255</a><a class="docs-footer-nextpage" href="../PHTP_example1/">Princeton Handbook of Test Problems: Test 9.3.2 »</a><div class="flexbox-break"></div><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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 24 July 2024 04:11">Wednesday 24 July 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
87 changes: 62 additions & 25 deletions dev/examples/FOBP_example2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,72 @@
19 6.1333413e+00 1.32e-07 1.12e+05 -1.0 5.27e-02 - 1.00e+00 1.00e+00h 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
20 6.1333412e+00 1.28e-07 2.35e+06 -1.0 2.43e-03 - 1.00e+00 1.38e-01f 2
21 6.1333372e+00 2.05e-08 4.84e+05 -1.0 1.44e-02 - 1.00e+00 1.00e+00h 1
22 6.1333345e+00 0.00e+00 3.66e+05 -1.0 7.66e-03 - 1.00e+00 1.00e+00h 1
21 6.1333372e+00 2.05e-08 4.83e+05 -1.0 1.44e-02 - 1.00e+00 1.00e+00h 1
22 6.1333345e+00 1.11e-16 3.62e+05 -1.0 7.68e-03 - 1.00e+00 1.00e+00h 1
23 6.1333351e+00 0.00e+00 2.36e+06 -1.0 3.69e-03 - 1.00e+00 5.00e-01f 2
24 6.1333347e+00 2.22e-16 1.24e+03 -1.0 9.02e-05 - 1.00e+00 1.00e+00h 1
25 6.1333346e+00 1.11e-16 1.48e+04 -2.5 1.68e-04 - 1.00e+00 1.00e+00h 1
26 6.1333345e+00 1.11e-16 3.58e+01 -2.5 2.20e-05 1.8 1.00e+00 1.00e+00f 1
Cannot call restoration phase at point that is almost feasible (violation 1.110223e-16).
Abort in line search due to no other fall back.
24 6.1333350e+00 0.00e+00 1.17e+07 -1.0 1.87e-01 - 2.19e-02 4.38e-04f 8
25 6.1333350e+00 0.00e+00 9.28e+06 -1.0 8.16e-03 - 1.00e+00 1.01e-02f 5
26 6.1333350e+00 1.11e-16 4.10e+04 -1.0 2.53e-03 - 1.00e+00 1.00e+00h 1
27 6.1333346e+00 2.22e-16 5.34e+03 -1.0 1.71e-03 - 1.00e+00 1.00e+00h 1
28 6.1333347e+00 2.22e-16 2.49e+05 -2.5 3.67e-05 2.7 9.86e-01 1.00e+00f 1
29 6.1333346e+00 0.00e+00 1.59e+02 -2.5 1.35e-04 - 1.00e+00 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
30 6.1333360e+00 0.00e+00 1.34e+03 -2.5 1.28e-02 - 1.00e+00 1.00e+00H 1
31 6.1333359e+00 3.68e-08 1.37e+03 -2.5 1.65e+00 - 2.51e-05 2.51e-05s 7
32 6.1333380e+00 0.00e+00 7.38e+02 -2.5 1.59e-03 - 1.00e+00 1.00e+00s 7
33 6.1333388e+00 1.48e-07 2.57e-01 -2.5 2.12e-04 3.1 1.00e+00 1.00e+00s 7
34 6.1333337e+00 1.36e-07 2.67e+03 -5.7 1.70e+00 - 7.12e-02 7.65e-02H 1
35 6.1333334e+00 1.60e-08 4.54e+04 -5.7 5.63e-02 - 9.00e-01 8.02e-01h 1
36 6.1333334e+00 1.57e-08 1.65e+06 -5.7 7.65e-01 - 1.56e-02 6.35e-02h 1
37 6.1333333e+00 1.34e-08 1.93e+06 -5.7 3.73e-01 - 1.97e-01 1.24e-01f 1
38 6.1333333e+00 1.34e-08 1.93e+06 -5.7 5.18e+00 - 3.43e-03 2.47e-04f 2
39 6.1333333e+00 1.34e-08 3.23e+06 -5.7 4.94e+01 - 2.93e-03 1.19e-05f 2
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
40 6.1333333e+00 1.34e-08 2.66e+06 -5.7 5.76e-01 - 2.72e-02 5.07e-03h 1
41 6.1333334e+00 1.50e-08 2.68e+06 -5.7 4.64e-01 - 1.00e+00 7.56e-01f 1
42 6.1333334e+00 2.22e-16 1.61e+09 -5.7 5.29e-03 2.6 9.73e-04 1.00e+00f 1
43 6.1333334e+00 2.22e-16 1.17e+04 -5.7 1.57e-07 5.7 9.95e-01 1.00e+00h 1
44 6.1333334e+00 0.00e+00 2.78e+02 -5.7 8.91e-02 - 1.00e+00 1.00e+00f 1
45 6.1333333e+00 0.00e+00 8.16e-03 -5.7 4.43e-08 5.3 1.00e+00 1.00e+00f 1
46 6.1333333e+00 8.88e-16 5.94e+02 -5.7 1.08e+00 - 5.49e-01 1.00e+00f 1
47 6.1333333e+00 0.00e+00 6.93e+02 -5.7 2.07e+00 - 7.05e-01 1.00e+00h 1
48 6.1333333e+00 8.88e-16 2.32e-03 -5.7 3.78e-08 4.8 1.00e+00 1.00e+00h 1
49 6.1333333e+00 1.78e-15 1.04e+03 -5.7 3.38e+00 - 1.00e+00 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
50 6.1333333e+00 0.00e+00 2.91e+02 -5.7 7.44e+00 - 1.00e+00 9.91e-01h 1
51 6.1333333e+00 0.00e+00 2.07e+02 -5.7 3.86e+00 - 1.00e+00 1.00e+00f 1
52 6.1333333e+00 0.00e+00 4.07e+00 -5.7 3.37e-01 - 1.00e+00 1.00e+00h 1
53 6.1333333e+00 0.00e+00 2.54e-03 -5.7 5.88e-03 - 1.00e+00 1.00e+00h 1
54 6.1333333e+00 0.00e+00 3.20e-10 -5.7 1.78e-06 - 1.00e+00 1.00e+00h 1
55 6.1333333e+00 0.00e+00 2.37e+00 -8.6 3.39e-04 - 9.93e-01 1.00e+00h 1
In iteration 55, 1 Slack too small, adjusting variable bound
56 6.1333333e+00 0.00e+00 1.15e-01 -8.6 7.44e-01 - 9.51e-01 9.77e-01h 1
57 6.1333333e+00 0.00e+00 1.19e-01 -8.6 1.46e+00 - 1.00e+00 1.00e+00h 1
58 6.1333333e+00 0.00e+00 2.36e-02 -8.6 8.45e-01 - 1.00e+00 1.00e+00h 1
59 6.1333333e+00 0.00e+00 1.62e-04 -8.6 1.39e-01 - 1.00e+00 1.00e+00h 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
60 6.1333333e+00 0.00e+00 1.54e-09 -8.6 3.89e-04 - 1.00e+00 1.00e+00h 1

Number of Iterations....: 26
Number of Iterations....: 60

(scaled) (unscaled)
Objective...............: 6.1333345125452912e+00 6.1333345125452912e+00
Dual infeasibility......: 3.5841188212015616e+01 3.5841188212015616e+01
Constraint violation....: 1.1102230246251565e-16 1.1102230246251565e-16
Variable bound violation: 4.3702289611215291e-09 4.3702289611215291e-09
Complementarity.........: 2.9671402126700249e-03 2.9671402126700249e-03
Overall NLP error.......: 3.7381382343713479e-02 3.5841188212015616e+01
Objective...............: 6.1333332742376614e+00 6.1333332742376614e+00
Dual infeasibility......: 1.5378925401466993e-09 1.5378925401466993e-09
Constraint violation....: 0.0000000000000000e+00 0.0000000000000000e+00
Variable bound violation: 4.3702290096584022e-09 4.3702290096584022e-09
Complementarity.........: 2.5059035689599364e-09 2.5059035689599364e-09
Overall NLP error.......: 2.5059035689599364e-09 2.5059035689599364e-09


Number of objective function evaluations = 51
Number of objective gradient evaluations = 28
Number of equality constraint evaluations = 51
Number of inequality constraint evaluations = 51
Number of equality constraint Jacobian evaluations = 28
Number of inequality constraint Jacobian evaluations = 28
Number of Lagrangian Hessian evaluations = 27
Total seconds in IPOPT = 0.047
Number of objective function evaluations = 95
Number of objective gradient evaluations = 61
Number of equality constraint evaluations = 95
Number of inequality constraint evaluations = 95
Number of equality constraint Jacobian evaluations = 61
Number of inequality constraint Jacobian evaluations = 61
Number of Lagrangian Hessian evaluations = 60
Total seconds in IPOPT = 0.024

EXIT: Error in step computation!</pre><pre><code class="language-julia">objective_value(model)</code></pre><pre class="documenter-example-output">6.133334512545291</pre><pre><code class="language-julia">objective_value(Lower(model))</code></pre><pre class="documenter-example-output">-1.866667025303046</pre><pre><code class="language-julia">value(x)</code></pre><pre class="documenter-example-output">1.866667025303046</pre><pre><code class="language-julia">value(y)</code></pre><pre class="documenter-example-output">0.5333334366361542</pre><pre><code class="language-julia">value(u1)</code></pre><pre class="documenter-example-output">1.866667025303046</pre><pre><code class="language-julia">value(l1)</code></pre><pre class="documenter-example-output">2.4000004619392</pre><pre><code class="language-julia">dual(l1)</code></pre><pre class="documenter-example-output">1-element Vector{Float64}:
4.017857069584776e-9</pre><pre><code class="language-julia">dual(l3)</code></pre><pre class="documenter-example-output">1-element Vector{Float64}:
4.370228961121529e-9</pre><div class="admonition is-info"><header class="admonition-header">Info</header><div class="admonition-body"><p><a href="https://github.com/joaquimg/BilevelJuMP.jl/blob/master/docs/src/examples/FOBP_example2.jl">View this file on Github</a>.</p></div></div><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tutorials/quad_to_bin/">« Using QuadraticToBinary</a><a class="docs-footer-nextpage" href="../FOBP_example3/">Foundations of Bilevel Programming: Chapter 3.7, Page 59 »</a><div class="flexbox-break"></div><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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Tuesday 19 December 2023 03:37">Tuesday 19 December 2023</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
EXIT: Optimal Solution Found.</pre><pre><code class="language-julia">objective_value(model)</code></pre><pre class="documenter-example-output">6.133333274237661</pre><pre><code class="language-julia">objective_value(Lower(model))</code></pre><pre class="documenter-example-output">-1.866666648886298</pre><pre><code class="language-julia">value(x)</code></pre><pre class="documenter-example-output">1.866666648886298</pre><pre><code class="language-julia">value(y)</code></pre><pre class="documenter-example-output">0.5333333275787672</pre><pre><code class="language-julia">value(u1)</code></pre><pre class="documenter-example-output">1.866666648886298</pre><pre><code class="language-julia">value(l1)</code></pre><pre class="documenter-example-output">2.399999976465065</pre><pre><code class="language-julia">dual(l1)</code></pre><pre class="documenter-example-output">1-element Vector{Float64}:
4.017857147042123e-9</pre><pre><code class="language-julia">dual(l3)</code></pre><pre class="documenter-example-output">1-element Vector{Float64}:
4.370229009658402e-9</pre><div class="admonition is-info"><header class="admonition-header">Info</header><div class="admonition-body"><p><a href="https://github.com/joaquimg/BilevelJuMP.jl/blob/master/docs/src/examples/FOBP_example2.jl">View this file on Github</a>.</p></div></div><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tutorials/quad_to_bin/">« Using QuadraticToBinary</a><a class="docs-footer-nextpage" href="../FOBP_example3/">Foundations of Bilevel Programming: Chapter 3.7, Page 59 »</a><div class="flexbox-break"></div><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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> on <span class="colophon-date" title="Wednesday 24 July 2024 04:11">Wednesday 24 July 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit df35855

Please sign in to comment.