mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Update 0.2 docs
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
||||
<meta name="generator" content="pdoc 0.7.0" />
|
||||
<meta name="generator" content="pdoc 0.7.5" />
|
||||
<title>miplearn.solvers.tests.test_learning_solver API documentation</title>
|
||||
<meta name="description" content="" />
|
||||
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
|
||||
@@ -155,7 +155,17 @@ def test_simulate_perfect():
|
||||
simulate_perfect=True,
|
||||
)
|
||||
stats = solver.solve(tmp.name)
|
||||
assert stats["Lower bound"] == stats["Predicted LB"]</code></pre>
|
||||
assert stats["Lower bound"] == stats["Predicted LB"]
|
||||
|
||||
|
||||
def test_gap():
|
||||
assert LearningSolver._compute_gap(ub=0.0, lb=0.0) == 0.0
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=0.5) == 0.5
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=1.0) == 0.0
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=-1.0) is None
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=None) is None
|
||||
assert LearningSolver._compute_gap(ub=None, lb=1.0) is None
|
||||
assert LearningSolver._compute_gap(ub=None, lb=None) is None</code></pre>
|
||||
</details>
|
||||
</section>
|
||||
<section>
|
||||
@@ -165,6 +175,25 @@ def test_simulate_perfect():
|
||||
<section>
|
||||
<h2 class="section-title" id="header-functions">Functions</h2>
|
||||
<dl>
|
||||
<dt id="miplearn.solvers.tests.test_learning_solver.test_gap"><code class="name flex">
|
||||
<span>def <span class="ident">test_gap</span></span>(<span>)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<section class="desc"></section>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">def test_gap():
|
||||
assert LearningSolver._compute_gap(ub=0.0, lb=0.0) == 0.0
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=0.5) == 0.5
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=1.0) == 0.0
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=-1.0) is None
|
||||
assert LearningSolver._compute_gap(ub=1.0, lb=None) is None
|
||||
assert LearningSolver._compute_gap(ub=None, lb=1.0) is None
|
||||
assert LearningSolver._compute_gap(ub=None, lb=None) is None</code></pre>
|
||||
</details>
|
||||
</dd>
|
||||
<dt id="miplearn.solvers.tests.test_learning_solver.test_learning_solver"><code class="name flex">
|
||||
<span>def <span class="ident">test_learning_solver</span></span>(<span>)</span>
|
||||
</code></dt>
|
||||
@@ -346,6 +375,7 @@ def test_simulate_perfect():
|
||||
</li>
|
||||
<li><h3><a href="#header-functions">Functions</a></h3>
|
||||
<ul class="">
|
||||
<li><code><a title="miplearn.solvers.tests.test_learning_solver.test_gap" href="#miplearn.solvers.tests.test_learning_solver.test_gap">test_gap</a></code></li>
|
||||
<li><code><a title="miplearn.solvers.tests.test_learning_solver.test_learning_solver" href="#miplearn.solvers.tests.test_learning_solver.test_learning_solver">test_learning_solver</a></code></li>
|
||||
<li><code><a title="miplearn.solvers.tests.test_learning_solver.test_parallel_solve" href="#miplearn.solvers.tests.test_learning_solver.test_parallel_solve">test_parallel_solve</a></code></li>
|
||||
<li><code><a title="miplearn.solvers.tests.test_learning_solver.test_simulate_perfect" href="#miplearn.solvers.tests.test_learning_solver.test_simulate_perfect">test_simulate_perfect</a></code></li>
|
||||
@@ -357,7 +387,7 @@ def test_simulate_perfect():
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.0</a>.</p>
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.5</a>.</p>
|
||||
</footer>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad()</script>
|
||||
|
||||
Reference in New Issue
Block a user