mirror of
https://github.com/ANL-CEEESA/UnitCommitment.jl.git
synced 2025-12-06 16:28:51 -06:00
Update docs
This commit is contained in:
@@ -154,13 +154,15 @@
|
||||
<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="language-julia">using Cbc
|
||||
using JSON
|
||||
using UnitCommitment
|
||||
|
||||
# Read instance
|
||||
instance = UnitCommitment.read("/path/to/input.json")
|
||||
|
||||
# Construct optimization model
|
||||
model = UnitCommitment.build_model(instance, Cbc.Optimizer)
|
||||
model = UnitCommitment.build_model(instance=instance,
|
||||
optimizer=Cbc.Optimizer)
|
||||
|
||||
# Solve model
|
||||
UnitCommitment.optimize!(model)
|
||||
|
||||
Reference in New Issue
Block a user