Update 0.2 docs

docs
Alinson S. Xavier 4 years ago
parent 95556c02a2
commit f245821753

@ -48,9 +48,9 @@ Name | Symbol | Description | Unit
`flow[l,t]` | $f_l(t)$ | Power flow on line `l` at time `t`. | MW `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 `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 Objective function

@ -52,11 +52,11 @@ model = UnitCommitment.build_model(
# Solve model # Solve model
UnitCommitment.optimize!(model) UnitCommitment.optimize!(model)
# Extract solution and write it to a file # Extract solution
solution = UnitCommitment.solution(model) solution = UnitCommitment.solution(model)
open("/path/to/output.json", "w") do file
JSON.print(file, solution, 2) # Write solution to a file
end UnitCommitment.write("/path/to/output.json", solution)
``` ```
### Solving benchmark instances ### Solving benchmark instances

@ -383,9 +383,9 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="admonition danger"> <div class="admonition warning">
<p class="admonition-title">Danger</p> <p class="admonition-title">Warning</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> <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> </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="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="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">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">&quot;/path/to/output.json&quot;</span><span class="p">,</span> <span class="s">&quot;w&quot;</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="c"># Write solution to a file</span>
<span class="k">end</span> <span class="n">UnitCommitment</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;/path/to/output.json&quot;</span><span class="p">,</span> <span class="n">solution</span><span class="p">)</span>
</pre></div> </pre></div>
</div> </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'" />

Loading…
Cancel
Save