Skip to content

Commit

Permalink
Deployed 881c208 with MkDocs version: 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Aug 28, 2021
1 parent 825b777 commit a8beaf9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
13 changes: 8 additions & 5 deletions references/miom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span class=k>for</span> <span class=n>c</span> <span class=ow>in</span> <span class=n>constraints</span><span class=p>:</span>
<span class=bp>self</span><span class=o>.</span><span class=n>add_constraint</span><span class=p>(</span><span class=n>c</span><span class=p>)</span>
<span class=k>return</span> <span class=nb>len</span><span class=p>(</span><span class=n>constraints</span><span class=p>)</span> <span class=o>&gt;</span> <span class=mi>0</span>
</code></pre></div> </details> </div> </div> <div class="doc doc-object doc-method"> <h3 id=miom.miom.BaseModel.exclude class="doc doc-heading"> <code class="highlight language-python"><span class=n>exclude</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>indicator_values</span><span class=o>=</span><span class=kc>None</span><span class=p>)</span></code> </h3> <div class="doc doc-contents "> <p>Exclude a solution from the set of feasible solutions.</p> <p>If the problem is a subset selection problem, it adds a new constraint to exclude the given values (or the current values of the indicator variables) from the set of feasible solutions. This is useful to force the solver to find alternative solutions in a manual fashion. https://doi.org/10.1371/journal.pcbi.1008730</p> <p><strong>Parameters:</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> </thead> <tbody> <tr> <td><code>values</code></td> <td><code>list</code></td> <td><p>List of values for each indicator variable. Defaults to None.</p></td> <td><em>required</em></td> </tr> </tbody> </table> <p><strong>Returns:</strong></p> <table> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>BaseModel</code></td> <td><p>instance of BaseModel with the modifications applied.</p></td> </tr> </tbody> </table> <details class=quote> <summary>Source code in <code>miom/miom.py</code></summary> <div class=highlight><pre><span></span><code><span class=nd>@_composable</span>
</code></pre></div> </details> </div> </div> <div class="doc doc-object doc-method"> <h3 id=miom.miom.BaseModel.exclude class="doc doc-heading"> <code class="highlight language-python"><span class=n>exclude</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>indicator_values</span><span class=o>=</span><span class=kc>None</span><span class=p>)</span></code> </h3> <div class="doc doc-contents "> <p>Exclude a solution from the set of feasible solutions.</p> <p>If the problem is a subset selection problem, it adds a new constraint to exclude the given values (or the current values of the indicator variables) from the set of feasible solutions. This is useful to force the solver to find alternative solutions in a manual fashion. https://doi.org/10.1371/journal.pcbi.1008730</p> <p><strong>Parameters:</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> </thead> <tbody> <tr> <td><code>indicator_values</code></td> <td><code>list</code></td> <td><p>List of values for each indicator variable. Defaults to None.</p></td> <td><code>None</code></td> </tr> </tbody> </table> <p><strong>Returns:</strong></p> <table> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>BaseModel</code></td> <td><p>instance of BaseModel with the modifications applied.</p></td> </tr> </tbody> </table> <details class=quote> <summary>Source code in <code>miom/miom.py</code></summary> <div class=highlight><pre><span></span><code><span class=nd>@_composable</span>
<span class=k>def</span> <span class=nf>exclude</span><span class=p>(</span><span class=bp>self</span><span class=p>,</span> <span class=n>indicator_values</span><span class=o>=</span><span class=kc>None</span><span class=p>):</span>
<span class=sd>&quot;&quot;&quot;Exclude a solution from the set of feasible solutions.</span>

Expand All @@ -32,7 +32,7 @@


<span class=sd> Args:</span>
<span class=sd> values (list, optional): List of values for each indicator variable. Defaults to None.</span>
<span class=sd> indicator_values (list, optional): List of values for each indicator variable. Defaults to None.</span>

<span class=sd> Returns:</span>
<span class=sd> BaseModel: instance of BaseModel with the modifications applied.</span>
Expand Down Expand Up @@ -427,7 +427,10 @@
<span class=n>comparator</span><span class=o>=</span><span class=n>Comparator</span><span class=o>.</span><span class=n>LESS_OR_EQUAL</span><span class=p>,</span>
<span class=n>value</span><span class=o>=</span><span class=mf>0.5</span>
<span class=p>)</span><span class=o>.</span><span class=n>network</span>
</code></pre></div></p></td> </tr> </tbody> </table> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-class"> <h2 id=miom.miom.Solvers class="doc doc-heading"> <code>Solvers</code> </h2> <div class="doc doc-contents "> <p>Solvers supported by the miom module.</p> <p>Please refer to https://picos-api.gitlab.io/picos/introduction.html to see the list of supported solvers using the PICOS backend. The Python-MIP backend only supports the GUROBI and CBC solvers.</p> <p>Note that in some cases, the Python-MIP backend (GUROBI/CBC) might be faster setting up the problem than the PICOS backend since it has less overhead.</p> <p><strong>Attributes:</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>GUROBI_PYMIP</code></td> <td><code>str</code></td> <td><p>Recommended solver for most problems (LP, MIP). It uses the Python-MIP backend. Note that GUROBI is a commercial software which require a license. Free academic licenses are also available at https://gurobi.com/free/.</p></td> </tr> <tr> <td><code>GUROBI</code></td> <td><code>str</code></td> <td><p>For using GUROBI with the PICOS backend instead of Python-MIP.</p></td> </tr> <tr> <td><code>COIN_OR_CBC</code></td> <td><code>str</code></td> <td><p>Free LP/MIP solver with good performance, provided with Python-MIP.</p></td> </tr> <tr> <td><code>CPLEX</code></td> <td><code>str</code></td> <td><p>Commercial solver with a performance similar to GUROBI. Only supported by the PICOS backend.</p></td> </tr> <tr> <td><code>SCIP</code></td> <td><code>str</code></td> <td><p>Free academic solver, supported by the PICOS backend.</p></td> </tr> <tr> <td><code>GLPK</code></td> <td><code>str</code></td> <td><p>Open source solver, supported by the PICOS backend.</p></td> </tr> <tr> <td><code>MOSEK</code></td> <td><code>str</code></td> <td><p>Commercial solver, supported by the PICOS backend.</p></td> </tr> </tbody> </table> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-class"> <h2 id=miom.miom.Status class="doc doc-heading"> <code>Status</code> </h2> <div class="doc doc-contents "> <p>An enumeration.</p> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-function"> <h2 id=miom.miom.load class="doc doc-heading"> <code class="highlight language-python"><span class=n>load</span><span class=p>(</span><span class=n>network</span><span class=p>,</span> <span class=n>solver</span><span class=o>=</span><span class=kc>None</span><span class=p>)</span></code> </h2> <div class="doc doc-contents "> <p>Create a MIOM optimization model for a given solver. If the solver is Coin-OR CBC, an instance of PythonMipModel is used (which uses the Python-MIP lib as the backend). Otherwise, a PicosModel is created (which uses PICOS as the backend).</p> <p><strong>Examples:</strong></p> <p>Example of how to perform FBA to maximize flux through the <code>BIOMASS_reaction</code> in the iMM1865 model:</p> <div class=highlight><pre><span></span><code><span class=o>&gt;&gt;&gt;</span> <span class=kn>import</span> <span class=nn>miom</span>
</code></pre></div></p></td> </tr> </tbody> </table> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-class"> <h2 id=miom.miom.Solvers class="doc doc-heading"> <code>Solvers</code> </h2> <div class="doc doc-contents "> <p>Solvers supported by the miom module.</p> <p>Please refer to https://picos-api.gitlab.io/picos/introduction.html to see the list of supported solvers using the PICOS backend. The Python-MIP backend only supports the GUROBI and CBC solvers.</p> <p>Note that in some cases, the Python-MIP backend (GUROBI/CBC) might be faster setting up the problem than the PICOS backend since it has less overhead.</p> <p><strong>Attributes:</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>GUROBI_PYMIP</code></td> <td><code>str</code></td> <td><p>Recommended solver for most problems (LP, MIP). It uses the Python-MIP backend. Note that GUROBI is a commercial software which require a license. Free academic licenses are also available at https://gurobi.com/free/.</p></td> </tr> <tr> <td><code>GUROBI</code></td> <td><code>str</code></td> <td><p>For using GUROBI with the PICOS backend instead of Python-MIP.</p></td> </tr> <tr> <td><code>COIN_OR_CBC</code></td> <td><code>str</code></td> <td><p>Free LP/MIP solver with good performance, provided with Python-MIP.</p></td> </tr> <tr> <td><code>CPLEX</code></td> <td><code>str</code></td> <td><p>Commercial solver with a performance similar to GUROBI. Only supported by the PICOS backend.</p></td> </tr> <tr> <td><code>SCIP</code></td> <td><code>str</code></td> <td><p>Free academic solver, supported by the PICOS backend.</p></td> </tr> <tr> <td><code>GLPK</code></td> <td><code>str</code></td> <td><p>Open source solver, supported by the PICOS backend.</p></td> </tr> <tr> <td><code>MOSEK</code></td> <td><code>str</code></td> <td><p>Commercial solver, supported by the PICOS backend.</p></td> </tr> </tbody> </table> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-class"> <h2 id=miom.miom.Status class="doc doc-heading"> <code>Status</code> </h2> <div class="doc doc-contents "> <p>Subset of PICOS solver status codes.</p> <p>This subset of states offers compatibility between Python-MIP and PICOS. Status codes can be obtained after solving an optimization problem with the property <code>status</code>. For example:</p> <div class=highlight><pre><span></span><code><span class=o>&gt;&gt;&gt;</span> <span class=kn>import</span> <span class=nn>miom</span>
<span class=o>&gt;&gt;&gt;</span> <span class=n>miom</span><span class=o>.</span><span class=n>load</span><span class=p>(</span><span class=s1>&#39;@iMM1865&#39;</span><span class=p>)</span><span class=o>.</span><span class=n>steady_state</span><span class=p>()</span><span class=o>.</span><span class=n>set_rxn_objective</span><span class=p>(</span><span class=s1>&#39;BIOMASS_reaction&#39;</span><span class=p>)</span><span class=o>.</span><span class=n>solve</span><span class=p>()</span><span class=o>.</span><span class=n>status</span>
<span class=p>{</span><span class=s1>&#39;status&#39;</span><span class=p>:</span> <span class=s1>&#39;optimal&#39;</span><span class=p>,</span> <span class=s1>&#39;objective_value&#39;</span><span class=p>:</span> <span class=mf>798.811</span><span class=p>,</span> <span class=s1>&#39;elapsed_seconds&#39;</span><span class=p>:</span> <span class=mf>0.479</span><span class=p>}</span>
</code></pre></div> <div class="doc doc-children"> </div> </div> </div> <div class="doc doc-object doc-function"> <h2 id=miom.miom.load class="doc doc-heading"> <code class="highlight language-python"><span class=n>load</span><span class=p>(</span><span class=n>network</span><span class=p>,</span> <span class=n>solver</span><span class=o>=</span><span class=kc>None</span><span class=p>)</span></code> </h2> <div class="doc doc-contents "> <p>Create a MIOM optimization model for a given solver. If the solver is Coin-OR CBC, an instance of PythonMipModel is used (which uses the Python-MIP lib as the backend). Otherwise, a PicosModel is created (which uses PICOS as the backend).</p> <p><strong>Examples:</strong></p> <p>Example of how to perform FBA to maximize flux through the <code>BIOMASS_reaction</code> in the iMM1865 model:</p> <div class=highlight><pre><span></span><code><span class=o>&gt;&gt;&gt;</span> <span class=kn>import</span> <span class=nn>miom</span>
<span class=o>&gt;&gt;&gt;</span> <span class=n>network</span> <span class=o>=</span> <span class=n>miom</span><span class=o>.</span><span class=n>load_gem</span><span class=p>(</span><span class=s2>&quot;@iMM1865&quot;</span><span class=p>)</span>
<span class=o>&gt;&gt;&gt;</span> <span class=n>flx</span> <span class=o>=</span> <span class=p>(</span><span class=n>miom</span>
<span class=o>.</span><span class=n>load</span><span class=p>(</span><span class=n>network</span><span class=p>)</span>
Expand Down Expand Up @@ -468,7 +471,7 @@
<span class=sd> &quot;&quot;&quot;</span>
<span class=k>if</span> <span class=n>solver</span> <span class=ow>is</span> <span class=kc>None</span><span class=p>:</span>
<span class=n>solver</span> <span class=o>=</span> <span class=n>Solvers</span><span class=o>.</span><span class=n>COIN_OR_CBC</span>
<span class=k>if</span> <span class=n>_PICOS_AVAILABLE</span><span class=p>:</span>
<span class=k>if</span> <span class=n>_picos_backend_available</span><span class=p>:</span>
<span class=n>solvers</span> <span class=o>=</span> <span class=n>pc</span><span class=o>.</span><span class=n>solvers</span><span class=o>.</span><span class=n>available_solvers</span><span class=p>()</span>
<span class=k>if</span> <span class=s2>&quot;gurobi&quot;</span> <span class=ow>in</span> <span class=n>solvers</span><span class=p>:</span>
<span class=n>solver</span> <span class=o>=</span> <span class=n>Solvers</span><span class=o>.</span><span class=n>GUROBI</span>
Expand All @@ -482,7 +485,7 @@
<span class=k>return</span> <span class=n>PythonMipModel</span><span class=p>(</span><span class=n>miom_network</span><span class=o>=</span><span class=n>network</span><span class=p>,</span> <span class=n>solver_name</span><span class=o>=</span><span class=n>solver</span><span class=p>)</span>
<span class=k>if</span> <span class=n>solver</span> <span class=o>==</span> <span class=s1>&#39;gurobi_pymip&#39;</span><span class=p>:</span>
<span class=k>return</span> <span class=n>PythonMipModel</span><span class=p>(</span><span class=n>miom_network</span><span class=o>=</span><span class=n>network</span><span class=p>,</span> <span class=n>solver_name</span><span class=o>=</span><span class=s1>&#39;gurobi&#39;</span><span class=p>)</span>
<span class=k>if</span> <span class=n>_PICOS_AVAILABLE</span><span class=p>:</span>
<span class=k>if</span> <span class=n>_picos_backend_available</span><span class=p>:</span>
<span class=k>return</span> <span class=n>PicosModel</span><span class=p>(</span><span class=n>miom_network</span><span class=o>=</span><span class=n>network</span><span class=p>,</span> <span class=n>solver_name</span><span class=o>=</span><span class=n>solver</span><span class=p>)</span>
<span class=k>else</span><span class=p>:</span>
<span class=k>raise</span> <span class=ne>Exception</span><span class=p>(</span><span class=s2>&quot;&quot;&quot;PICOS is not installed. Please install it with pip, </span>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://metexplore.github.io/miom/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/examples/fastcore/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/examples/fba/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/examples/imat/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/examples/sparse_fba/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/references/mio/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://metexplore.github.io/miom/references/miom/</loc>
<lastmod>2021-08-27</lastmod>
<lastmod>2021-08-28</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit a8beaf9

Please sign in to comment.