mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
Update 0.2 docs
This commit is contained in:
@@ -48,9 +48,9 @@ Name | Symbol | Description | Unit
|
||||
`flow[l,t]` | $f_l(t)$ | Power flow on line `l` at time `t`. | MW
|
||||
`overflow[l,t]` | $f^+_l(t)$ | Amount of flow above the limit for line `l` at time `t`. | MW
|
||||
|
||||
```{danger}
|
||||
```{warning}
|
||||
|
||||
Since transmission and N-1 security constraints are enforced in a lazy way, most of the variables `flow[l,t]` and `overflow[l,t]` are never added to the model. Accessing `model[:flow][l,t]`, for example, without first checking that the variable exists will likely generate an error.
|
||||
Since transmission and N-1 security constraints are enforced in a lazy way, most of the `flow[l,t]` variables are never added to the model. Accessing `model[:flow][l,t]` without first checking that the variable exists will likely generate an error.
|
||||
```
|
||||
|
||||
Objective function
|
||||
|
||||
@@ -52,11 +52,11 @@ model = UnitCommitment.build_model(
|
||||
# Solve model
|
||||
UnitCommitment.optimize!(model)
|
||||
|
||||
# Extract solution and write it to a file
|
||||
# Extract solution
|
||||
solution = UnitCommitment.solution(model)
|
||||
open("/path/to/output.json", "w") do file
|
||||
JSON.print(file, solution, 2)
|
||||
end
|
||||
|
||||
# Write solution to a file
|
||||
UnitCommitment.write("/path/to/output.json", solution)
|
||||
```
|
||||
|
||||
### Solving benchmark instances
|
||||
|
||||
@@ -383,9 +383,9 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="admonition danger">
|
||||
<p class="admonition-title">Danger</p>
|
||||
<p>Since transmission and N-1 security constraints are enforced in a lazy way, most of the variables <code class="docutils literal notranslate"><span class="pre">flow[l,t]</span></code> and <code class="docutils literal notranslate"><span class="pre">overflow[l,t]</span></code> are never added to the model. Accessing <code class="docutils literal notranslate"><span class="pre">model[:flow][l,t]</span></code>, for example, without first checking that the variable exists will likely generate an error.</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>Since transmission and N-1 security constraints are enforced in a lazy way, most of the <code class="docutils literal notranslate"><span class="pre">flow[l,t]</span></code> variables are never added to the model. Accessing <code class="docutils literal notranslate"><span class="pre">model[:flow][l,t]</span></code> without first checking that the variable exists will likely generate an error.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -277,11 +277,11 @@
|
||||
<span class="c"># Solve model</span>
|
||||
<span class="n">UnitCommitment</span><span class="o">.</span><span class="n">optimize!</span><span class="p">(</span><span class="n">model</span><span class="p">)</span>
|
||||
|
||||
<span class="c"># Extract solution and write it to a file</span>
|
||||
<span class="c"># Extract solution</span>
|
||||
<span class="n">solution</span> <span class="o">=</span> <span class="n">UnitCommitment</span><span class="o">.</span><span class="n">solution</span><span class="p">(</span><span class="n">model</span><span class="p">)</span>
|
||||
<span class="n">open</span><span class="p">(</span><span class="s">"/path/to/output.json"</span><span class="p">,</span> <span class="s">"w"</span><span class="p">)</span> <span class="k">do</span> <span class="n">file</span>
|
||||
<span class="n">JSON</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="n">file</span><span class="p">,</span> <span class="n">solution</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
|
||||
<span class="k">end</span>
|
||||
|
||||
<span class="c"># Write solution to a file</span>
|
||||
<span class="n">UnitCommitment</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">"/path/to/output.json"</span><span class="p">,</span> <span class="n">solution</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<meta http-equiv="Refresh" content="0; url='/UnitCommitment.jl/0.1'" />
|
||||
<meta http-equiv="Refresh" content="0; url='/UnitCommitment.jl/0.2'" />
|
||||
|
||||
Reference in New Issue
Block a user