mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 08:18:51 -06:00
Update docs
This commit is contained in:
@@ -294,5 +294,5 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
MkDocs version : 1.1.2
|
MkDocs version : 1.1.2
|
||||||
Build Date UTC : 2020-11-16 13:03:02.825593+00:00
|
Build Date UTC : 2020-11-16 13:41:05.638487+00:00
|
||||||
-->
|
-->
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -154,13 +154,15 @@
|
|||||||
<h3 id="21-solving-user-provided-instances">2.1 Solving user-provided instances</h3>
|
<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>
|
<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="language-julia">using Cbc
|
<pre><code class="language-julia">using Cbc
|
||||||
|
using JSON
|
||||||
using UnitCommitment
|
using UnitCommitment
|
||||||
|
|
||||||
# Read instance
|
# Read instance
|
||||||
instance = UnitCommitment.read("/path/to/input.json")
|
instance = UnitCommitment.read("/path/to/input.json")
|
||||||
|
|
||||||
# Construct optimization model
|
# Construct optimization model
|
||||||
model = UnitCommitment.build_model(instance, Cbc.Optimizer)
|
model = UnitCommitment.build_model(instance=instance,
|
||||||
|
optimizer=Cbc.Optimizer)
|
||||||
|
|
||||||
# Solve model
|
# Solve model
|
||||||
UnitCommitment.optimize!(model)
|
UnitCommitment.optimize!(model)
|
||||||
|
|||||||
Reference in New Issue
Block a user