Update 0.1 docs

docs
Alinson S. Xavier 5 years ago
parent 100c4267e4
commit b7d9e2a7ab

@ -59,7 +59,9 @@
<!-- Main title -->
<a class="navbar-brand" href="/.">UnitCommitment.jl</a>
<a class="navbar-brand" href="/.">UnitCommitment.jl</a>
</div>
<!-- Expanded navigation -->
@ -85,6 +87,12 @@
</li>
<li >
<a href="/instances/">Instances</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
@ -115,18 +123,22 @@
</div>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
</footer>
</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>

@ -1,12 +1,9 @@
body {
padding-top: 70px;
html {
scroll-padding-top: 70px;
}
h1[id]:before, h2[id]:before, h3[id]:before, h4[id]:before, h5[id]:before, h6[id]:before {
content: "";
display: block;
margin-top: -75px;
height: 75px;
body {
padding-top: 70px;
}
p > img {
@ -103,7 +100,8 @@ div.source-links {
.bs-sidebar.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 80px;
max-height: calc(100% - 90px);
max-height: calc(100% - 180px);
overflow-y: auto;
}
.bs-sidebar.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
@ -228,6 +226,16 @@ div.source-links {
}
/* End Bootstrap Callouts CSS Source by Chris Pratt */
/* Headerlinks */
.headerlink {
display: none;
padding-left: .5em;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink {
display: inline-block;
}
/* Admonitions */
.admonition {
padding: 20px;

@ -1 +1 @@
body{padding-top:70px}h1[id]:before,h2[id]:before,h3[id]:before,h4[id]:before,h5[id]:before,h6[id]:before{content:"";display:block;margin-top:-75px;height:75px}p>img{max-width:100%;height:auto}ul.nav li.first-level{font-weight:bold}ul.nav li.third-level{padding-left:12px}div.col-md-3{padding-left:0}div.col-md-9{padding-bottom:100px}div.source-links{float:right}.bs-sidebar.affix{position:static}.bs-sidebar.well{padding:0}.bs-sidenav{margin-top:30px;margin-bottom:30px;padding-top:10px;padding-bottom:10px;border-radius:5px}.bs-sidebar .nav>li>a{display:block;padding:5px 20px;z-index:1}.bs-sidebar .nav>li>a:hover,.bs-sidebar .nav>li>a:focus{text-decoration:none;border-right:1px solid}.bs-sidebar .nav>.active>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active:focus>a{font-weight:bold;background-color:transparent;border-right:1px solid}.bs-sidebar .nav .nav{display:none;margin-bottom:8px}.bs-sidebar .nav .nav>li>a{padding-top:3px;padding-bottom:3px;padding-left:30px;font-size:90%}@media(min-width:992px){.bs-sidebar .nav>.active>ul{display:block}.bs-sidebar.affix,.bs-sidebar.affix-bottom{width:213px}.bs-sidebar.affix{position:fixed;top:80px;max-height:calc(100% - 90px)}.bs-sidebar.affix-bottom{position:absolute}.bs-sidebar.affix-bottom .bs-sidenav,.bs-sidebar.affix .bs-sidenav{margin-top:0;margin-bottom:0}}@media(min-width:1200px){.bs-sidebar.affix-bottom,.bs-sidebar.affix{width:263px}}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:0;margin-left:0}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:00px}.bs-callout{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.bs-callout h4{font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{border-radius:3px}.bs-callout+.bs-callout{margin-top:-5px}.bs-callout-default{border-left-color:#fa023c}.bs-callout-default h4{color:#fa023c}.bs-callout-primary{border-left-color:#428bca}.bs-callout-primary h4{color:#428bca}.bs-callout-success{border-left-color:#5cb85c}.bs-callout-success h4{color:#5cb85c}.bs-callout-danger{border-left-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{border-left-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{border-left-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.admonition{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.admonition p:last-child{margin-bottom:0}.admonition code{border-radius:3px}.admonition+.admonition{margin-top:-5px}.admonition.note{border-left-color:#428bca}.admonition.warning{border-left-color:#f0ad4e}.admonition.danger{border-left-color:#d9534f}.admonition-title{font-size:19px;font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.admonition.note>.admonition-title{color:#428bca}.admonition.warning>.admonition-title{color:#f0ad4e}.admonition.danger>.admonition-title{color:#d9534f}
html{scroll-padding-top:70px}body{padding-top:70px}p>img{max-width:100%;height:auto}ul.nav li.first-level{font-weight:bold}ul.nav li.third-level{padding-left:12px}div.col-md-3{padding-left:0}div.col-md-9{padding-bottom:100px}div.source-links{float:right}.bs-sidebar.affix{position:static}.bs-sidebar.well{padding:0}.bs-sidenav{margin-top:30px;margin-bottom:30px;padding-top:10px;padding-bottom:10px;border-radius:5px}.bs-sidebar .nav>li>a{display:block;padding:5px 20px;z-index:1}.bs-sidebar .nav>li>a:hover,.bs-sidebar .nav>li>a:focus{text-decoration:none;border-right:1px solid}.bs-sidebar .nav>.active>a,.bs-sidebar .nav>.active:hover>a,.bs-sidebar .nav>.active:focus>a{font-weight:bold;background-color:transparent;border-right:1px solid}.bs-sidebar .nav .nav{display:none;margin-bottom:8px}.bs-sidebar .nav .nav>li>a{padding-top:3px;padding-bottom:3px;padding-left:30px;font-size:90%}@media(min-width:992px){.bs-sidebar .nav>.active>ul{display:block}.bs-sidebar.affix,.bs-sidebar.affix-bottom{width:213px}.bs-sidebar.affix{position:fixed;top:80px;max-height:calc(100% - 180px);overflow-y:auto}.bs-sidebar.affix-bottom{position:absolute}.bs-sidebar.affix-bottom .bs-sidenav,.bs-sidebar.affix .bs-sidenav{margin-top:0;margin-bottom:0}}@media(min-width:1200px){.bs-sidebar.affix-bottom,.bs-sidebar.affix{width:263px}}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:0;margin-left:0}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#ccc;margin-top:5px;margin-right:-10px}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:00px}.bs-callout{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.bs-callout h4{font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{border-radius:3px}.bs-callout+.bs-callout{margin-top:-5px}.bs-callout-default{border-left-color:#fa023c}.bs-callout-default h4{color:#fa023c}.bs-callout-primary{border-left-color:#428bca}.bs-callout-primary h4{color:#428bca}.bs-callout-success{border-left-color:#5cb85c}.bs-callout-success h4{color:#5cb85c}.bs-callout-danger{border-left-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{border-left-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{border-left-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.headerlink{display:none;padding-left:.5em}h1:hover .headerlink,h2:hover .headerlink,h3:hover .headerlink,h4:hover .headerlink,h5:hover .headerlink,h6:hover .headerlink{display:inline-block}.admonition{padding:20px;margin:20px 0;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color:#fcfdff}.admonition p:last-child{margin-bottom:0}.admonition code{border-radius:3px}.admonition+.admonition{margin-top:-5px}.admonition.note{border-left-color:#428bca}.admonition.warning{border-left-color:#f0ad4e}.admonition.danger{border-left-color:#d9534f}.admonition-title{font-size:19px;font-style:normal;font-weight:400;margin-top:0;margin-bottom:5px}.admonition.note>.admonition-title{color:#428bca}.admonition.warning>.admonition-title{color:#f0ad4e}.admonition.danger>.admonition-title{color:#d9534f}

@ -59,7 +59,9 @@
<!-- Main title -->
<a class="navbar-brand" href="..">UnitCommitment.jl</a>
<a class="navbar-brand" href="..">UnitCommitment.jl</a>
</div>
<!-- Expanded navigation -->
@ -85,6 +87,12 @@
</li>
<li >
<a href="../instances/">Instances</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
@ -98,8 +106,8 @@
<i class="fas fa-arrow-left"></i> Previous
</a>
</li>
<li class="disabled">
<a rel="next" >
<li >
<a rel="next" href="../instances/">
Next <i class="fas fa-arrow-right"></i>
</a>
</li>
@ -173,14 +181,13 @@
</tbody>
</table>
<h4 id="example">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Parameters&quot;: {
&quot;Time (h)&quot;: 4,
&quot;Power balance penalty ($/MW)&quot;: 1000.0
}
}
</code></pre>
<h3 id="12-buses">1.2 Buses</h3>
<p>This section describes the characteristics of each bus in the system. </p>
<table>
@ -202,7 +209,7 @@
</tbody>
</table>
<h4 id="example_1">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Buses&quot;: {
&quot;b1&quot;: {
&quot;Load (MW)&quot;: 0.0
@ -218,7 +225,6 @@
}
}
</code></pre>
<h3 id="13-generators">1.3 Generators</h3>
<p>This section describes all generators in the system, including thermal units, renewable units and virtual units.</p>
<table>
@ -327,7 +333,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
<li>Production cost curves must be convex.</li>
</ul>
<h4 id="example_2">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Generators&quot;: {
&quot;gen1&quot;: {
&quot;Bus&quot;: &quot;b1&quot;,
@ -354,7 +360,6 @@ Note that this curve also specifies the production limits. Specifically, the fir
}
}
</code></pre>
<h3 id="14-price-sensitive-loads">1.4 Price-sensitive loads</h3>
<p>This section describes components in the system which may increase or reduce their energy consumption according to the energy prices. Fixed loads (as described in the <code>buses</code> section) are always served, regardless of the price, unless there is significant congestion in the system or insufficient production capacity. Price-sensitive loads, on the other hand, are only served if it is economical to do so. </p>
<table>
@ -388,7 +393,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
</tbody>
</table>
<h4 id="example_3">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Price-sensitive loads&quot;: {
&quot;p1&quot;: {
&quot;Bus&quot;: &quot;b3&quot;,
@ -398,7 +403,6 @@ Note that this curve also specifies the production limits. Specifically, the fir
}
}
</code></pre>
<h3 id="15-transmission-lines">1.5 Transmission Lines</h3>
<p>This section describes the characteristics of transmission system, such as its topology and the susceptance of each transmission line.</p>
<table>
@ -456,7 +460,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
</tbody>
</table>
<h4 id="example_4">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Transmission lines&quot;: {
&quot;l1&quot;: {
&quot;Source bus&quot;: &quot;b1&quot;,
@ -470,7 +474,6 @@ Note that this curve also specifies the production limits. Specifically, the fir
}
}
</code></pre>
<h3 id="16-reserves">1.6 Reserves</h3>
<p>This section describes the hourly amount of operating reserves required.</p>
<table>
@ -492,7 +495,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
</tbody>
</table>
<h4 id="example_5">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Reserves&quot;: {
&quot;Spinning (MW)&quot;: [
57.30552,
@ -503,7 +506,6 @@ Note that this curve also specifies the production limits. Specifically, the fir
}
}
</code></pre>
<h3 id="17-contingencies">1.7 Contingencies</h3>
<p>This section describes credible contingency scenarios in the optimization, such as the loss of a transmission line or generator.</p>
<table>
@ -528,7 +530,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
</tbody>
</table>
<h4 id="example_6">Example</h4>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Contingencies&quot;: {
&quot;c1&quot;: {
&quot;Affected lines&quot;: [&quot;l1&quot;, &quot;l2&quot;, &quot;l3&quot;],
@ -540,16 +542,14 @@ Note that this curve also specifies the production limits. Specifically, the fir
}
}
</code></pre>
<h3 id="18-additional-remarks">1.8 Additional remarks</h3>
<h4 id="time-series-parameters">Time series parameters</h4>
<p>Many numerical properties in the JSON file can be specified either as a single floating point number if they are time-independent, or as an array containing exactly <code>T</code> elements, where <code>T</code> is the length of the planning horizon, if they are time-dependent. For example, both formats below are valid when <code>T=3</code>:</p>
<pre><code class="json">{
<pre><code class="language-json">{
&quot;Load (MW)&quot;: 800.0,
&quot;Load (MW)&quot;: [800.0, 850.0, 730.0]
}
</code></pre>
<h4 id="current-limitations">Current limitations</h4>
<ul>
<li>All reserves are system-wide (no zonal reserves)</li>
@ -563,18 +563,22 @@ Note that this curve also specifies the production limits. Specifically, the fir
</div>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
</footer>
</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>

@ -59,7 +59,9 @@
<!-- Main title -->
<a class="navbar-brand" href=".">UnitCommitment.jl</a>
<a class="navbar-brand" href=".">UnitCommitment.jl</a>
</div>
<!-- Expanded navigation -->
@ -85,6 +87,12 @@
</li>
<li >
<a href="instances/">Instances</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
@ -127,6 +135,8 @@
<li class="second-level"><a href="#acknowledgments">Acknowledgments</a></li>
<li class="second-level"><a href="#citing">Citing</a></li>
<li class="second-level"><a href="#license">License</a></li>
</ul>
@ -146,6 +156,7 @@
<ul>
<li><a href="usage/">Usage</a></li>
<li><a href="format/">Data Format</a></li>
<li><a href="instances/">Instances</a></li>
</ul>
<h3 id="source-code">Source code</h3>
<ul>
@ -165,24 +176,34 @@
<p>Based upon work supported by <strong>Laboratory Directed Research and Development</strong> (LDRD) funding from Argonne National Laboratory, provided by the Director, Office of Science, of the U.S. Department of Energy under Contract No. DE-AC02-06CH11357.</p>
</li>
</ul>
<h3 id="citing">Citing</h3>
<p>If you use UnitCommitment.jl in your research, we request that you cite the package as follows:</p>
<ul>
<li>Alinson S. Xavier, Feng Qiu, "UnitCommitment.jl: A Julia/JuMP Optimization Package for Security-Constrained Unit Commitment". Zenodo (2020). <a href="https://doi.org/10.5281/zenodo.4269874">DOI: 10.5281/zenodo.4269874</a>.</li>
</ul>
<p>If you make use of the provided instances files, we request that you additionally cite the original sources, as described in the <a href="instances/">instances page</a>.</p>
<h3 id="license">License</h3>
<p>Released under the modified BSD license. See <code>LICENSE.md</code> for more details.</p></div>
</div>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
</footer>
</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>
@ -273,5 +294,5 @@
<!--
MkDocs version : 1.1.2
Build Date UTC : 2020-11-06 19:44:10.310639+00:00
Build Date UTC : 2020-11-13 17:20:05.182767+00:00
-->

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,15 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>None</loc>
<lastmod>2020-11-06</lastmod>
<lastmod>2020-11-13</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2020-11-06</lastmod>
<lastmod>2020-11-13</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2020-11-06</lastmod>
<lastmod>2020-11-13</lastmod>
<changefreq>daily</changefreq>
</url><url>
<loc>None</loc>
<lastmod>2020-11-13</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

@ -59,7 +59,9 @@
<!-- Main title -->
<a class="navbar-brand" href="..">UnitCommitment.jl</a>
<a class="navbar-brand" href="..">UnitCommitment.jl</a>
</div>
<!-- Expanded navigation -->
@ -85,6 +87,12 @@
</li>
<li >
<a href="../instances/">Instances</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
@ -135,19 +143,17 @@
<h1 id="usage">Usage</h1>
<h2 id="1-installation">1. Installation</h2>
<p>UnitCommitment.jl was tested and developed with <a href="https://julialang.org/">Julia 1.5</a>. To install Julia, please follow the <a href="https://julialang.org/downloads/platform.html">installation guide on the official Julia website</a>. To install UnitCommitment.jl, run the Julia interpreter, type <code>]</code> to open the package manager, then type:</p>
<pre><code class="text">pkg&gt; add https://github.com/ANL-CEEESA/UnitCommitment.jl.git
<pre><code class="language-text">pkg&gt; add https://github.com/ANL-CEEESA/UnitCommitment.jl.git
</code></pre>
<p>To test that the package has been correctly installed, run:</p>
<pre><code class="text">pkg&gt; test UnitCommitment
<pre><code class="language-text">pkg&gt; test UnitCommitment
</code></pre>
<p>If all tests pass, the package should now be ready to be used by any Julia script on the machine.</p>
<p>To solve the optimization models, a mixed-integer linear programming (MILP) solver is also required. Please see the <a href="https://jump.dev/JuMP.jl/stable/installation/">JuMP installation guide</a> for more instructions on installing a solver. Typical open-source choices are <a href="https://github.com/JuliaOpt/Cbc.jl">Cbc</a> and <a href="https://github.com/JuliaOpt/GLPK.jl">GLPK</a>. In the instructions below, Cbc will be used, but any other MILP solver listed in JuMP installation guide should also be compatible.</p>
<h2 id="2-typical-usage">2. Typical Usage</h2>
<h3 id="21-solving-user-provided-instances">2.1 Solving user-provided instances</h3>
<p>The first step to use UC.jl is to construct a JSON file describing your unit commitment instance. See the <a href="">data format page</a> for a complete description of the data format UC.jl expects. The next steps, as shown below, are to read the instance from file, construct the optimization model, run the optimization and extract the optimal solution.</p>
<pre><code class="julia">using Cbc
<pre><code class="language-julia">using Cbc
using UnitCommitment
# Read instance
@ -165,20 +171,18 @@ open(&quot;/path/to/output.json&quot;, &quot;w&quot;) do file
JSON.print(file, solution, 2)
end
</code></pre>
<h3 id="22-solving-benchmark-instances">2.2 Solving benchmark instances</h3>
<p>As described in the <a href="">instances page</a>, UnitCommitment.jl contains a number of benchmark instances collected from the literature. To solve one of these instances individually, instead of constructing your own, the function <code>read_benchmark</code> can be used:</p>
<pre><code class="julia">using UnitCommitment
<p>As described in the <a href="../instances/">Instances page</a>, UnitCommitment.jl contains a number of benchmark instances collected from the literature. To solve one of these instances individually, instead of constructing your own, the function <code>read_benchmark</code> can be used:</p>
<pre><code class="language-julia">using UnitCommitment
instance = UnitCommitment.read_benchmark(&quot;matpower/case3375wp/2017-01-01&quot;)
</code></pre>
<h2 id="3-advanced-usage">3. Advanced usage</h2>
<h3 id="31-modifying-the-formulation">3.1 Modifying the formulation</h3>
<p>For the time being, the recommended way of modifying the MILP formulation used by UC.jl is to create a local copy of our git repository and directly modify the source code of the package. In a future version, it will be possible to switch between multiple formulations, or to simply add/remove constraints after the model has been generated.</p>
<h3 id="32-generating-initial-conditions">3.2 Generating initial conditions</h3>
<p>When creating random unit commitment instances for benchmark purposes, it is often hard to compute, in advance, sensible initial conditions for all generators. Setting initial conditions naively (for example, making all generators initially off and producing no power) can easily cause the instance to become infeasible due to excessive ramping. Initial conditions can also make it hard to modify existing instances. For example, increasing the system load without carefully modifying the initial conditions may make the problem infeasible or unrealistically challenging to solve.</p>
<p>To help with this issue, UC.jl provides a utility function which can generate feasible initial conditions by solving a single-period optimization problem, as shown below:</p>
<pre><code class="julia">using Cbc
<pre><code class="language-julia">using Cbc
using UnitCommitment
# Read original instance
@ -191,14 +195,13 @@ UnitCommitment.generate_initial_conditions!(instance, Cbc.Optimizer)
model = UnitCommitment.build_model(instance, Cbc.Optimizer)
UnitCommitment.optimize!(model)
</code></pre>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The function <code>generate_initial_conditions!</code> may return different initial conditions after each call, even if the same instance and the same optimizer is provided. The particular algorithm may also change in a future version of UC.jl. For these reasons, it is recommended that you generate initial conditions exactly once for each instance and store them for later use.</p>
</div>
<h3 id="33-verifying-solutions">3.3 Verifying solutions</h3>
<p>When developing new formulations, it is very easy to introduce subtle errors in the model that result in incorrect solutions. To help with this, UC.jl includes a utility function that verifies if a given solution is feasible, and, if not, prints all the validation errors it found. The implementation of this function is completely independent from the implementation of the optimization model, and therefore can be used to validate it. The function can also be used to verify solutions produced by other optimization packages, as long as they follow the <a href="../format/">UC.jl data format</a>.</p>
<pre><code class="julia">using JSON
<pre><code class="language-julia">using JSON
using UnitCommitment
# Read instance
@ -214,18 +217,22 @@ UnitCommitment.validate(instance, solution)
</div>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
<footer class="col-md-12 text-center">
<hr>
<p>
<small>Copyright © 2020, UChicago Argonne, LLC. All Rights Reserved.</small><br>
<small>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.</small>
</p>
</footer>
</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>

Loading…
Cancel
Save