mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Update docs
This commit is contained in:
@@ -14,14 +14,16 @@
|
||||
<title>Usage - MIPLearn</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/v4-shims.css">
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack.min.css">
|
||||
<link href='//fonts.googleapis.com/css?family=PT+Sans:400,400italic,700,700italic&subset=latin-ext,latin' rel='stylesheet' type='text/css'>
|
||||
<link href='//rsms.me/inter/inter.css' rel='stylesheet' type='text/css'>
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin' rel='stylesheet' type='text/css'>
|
||||
<link href="../css/bootstrap-custom.min.css" rel="stylesheet">
|
||||
<link href="../css/base.min.css" rel="stylesheet">
|
||||
<link href="../css/cinder.min.css" rel="stylesheet">
|
||||
<link href="../css/highlight.min.css" rel="stylesheet">
|
||||
|
||||
|
||||
<link href="../css/custom.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
@@ -30,15 +32,6 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
||||
<script>
|
||||
WebFont.load({
|
||||
google: {
|
||||
families: ['Open Sans', 'PT Sans']
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -125,7 +118,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/ANL-CEEESA/MIPLearn/edit/master/docs-src/usage.md"><i class="fab fa-github"></i> Edit on GitHub</a>
|
||||
<a href="https://github.com/ANL-CEEESA/MIPLearn/edit/master/src/docs/usage.md"><i class="fab fa-github"></i> Edit on GitHub</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -158,11 +151,24 @@
|
||||
|
||||
<h1 id="usage">Usage</h1>
|
||||
<h3 id="installation">Installation</h3>
|
||||
<p>The package is currently available for Python and Pyomo. It can be installed as follows:</p>
|
||||
<pre><code class="bash">pip install git+ssh://git@github.com/ANL-CEEESA/MIPLearn.git
|
||||
<p>MIPLearn is mainly written in Python, with some components written in Julia. For this
|
||||
reason, both Python 3.6+ and Julia 1.3+ are required. A mixed-integer solver is also required, and
|
||||
its Python bindings must be properly installed. Currently supported solvers include CPLEX and
|
||||
Gurobi. To install MIPLearn, run the following commands: </p>
|
||||
<pre><code class="bash">git clone https://github.com/ANL-CEEESA/MIPLearn.git
|
||||
cd MIPLearn
|
||||
make install
|
||||
</code></pre>
|
||||
|
||||
<p>A Julia + JuMP version of the package is planned.</p>
|
||||
<p>After installation, the package <code>miplearn</code> should become available to Python. It can be imported
|
||||
as follows:</p>
|
||||
<pre><code class="python">import miplearn
|
||||
</code></pre>
|
||||
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p>To install MIPLearn in another Python environment, switch to that enviroment before running <code>make install</code>. To install the package in development mode, run <code>make develop</code> instead.</p>
|
||||
</div>
|
||||
<h3 id="using-learningsolver">Using <code>LearningSolver</code></h3>
|
||||
<p>The main class provided by this package is <code>LearningSolver</code>, a reference learning-enhanced MIP solver which automatically extracts information from previous runs to accelerate the solution of new instances. Assuming we already have a list of instances to solve, <code>LearningSolver</code> can be used as follows:</p>
|
||||
<pre><code class="python">from miplearn import LearningSolver
|
||||
@@ -243,17 +249,17 @@ solver.solve(test_instance)
|
||||
|
||||
<hr>
|
||||
<p>
|
||||
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.<br></small>
|
||||
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
|
||||
|
||||
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</p></small>
|
||||
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</footer>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="../js/bootstrap-3.0.3.min.js"></script>
|
||||
<script src="../js/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<script>var base_url = ".."</script>
|
||||
|
||||
<script src="../js/base.js"></script>
|
||||
@@ -265,8 +271,11 @@ solver.solve(test_instance)
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="searchModalLabel">Search</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user