From 100c4267e4ac68bb87c11b1ef0e06f1fd1089c3d Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Fri, 6 Nov 2020 13:44:17 -0600 Subject: [PATCH] Update docs --- 0.1/404.html | 2 + 0.1/format/index.html | 80 ++++----- 0.1/index.html | 6 +- 0.1/isf/index.html | 230 ------------------------- 0.1/model/index.html | 321 ----------------------------------- 0.1/search/search_index.json | 2 +- 0.1/sitemap.xml | 6 +- 0.1/sitemap.xml.gz | Bin 194 -> 194 bytes 0.1/usage/index.html | 87 +++++++++- 9 files changed, 129 insertions(+), 605 deletions(-) delete mode 100644 0.1/isf/index.html delete mode 100644 0.1/model/index.html diff --git a/0.1/404.html b/0.1/404.html index 2fdeeb4..9f40ddd 100644 --- a/0.1/404.html +++ b/0.1/404.html @@ -133,6 +133,8 @@ + + diff --git a/0.1/format/index.html b/0.1/format/index.html index e9b246c..003e998 100644 --- a/0.1/format/index.html +++ b/0.1/format/index.html @@ -117,37 +117,24 @@

Data Format

+

1. Input Data Format

Instances are specified by JSON files containing the following main sections:

Each section is described in detail below. For a complete example, see case14.json.

-

Parameters

+

1.1 Parameters

This section describes system-wide parameters, such as power balance penalties, and optimization parameters, such as the length of the planning horizon.

@@ -185,7 +172,7 @@
-

Example

+

Example

{
     "Parameters": {
         "Time (h)": 4,
@@ -194,7 +181,7 @@
 }
 
-

Buses

+

1.2 Buses

This section describes the characteristics of each bus in the system.

@@ -214,7 +201,7 @@
-

Example

+

Example

{
     "Buses": {
         "b1": {
@@ -232,7 +219,7 @@
 }
 
-

Generators

+

1.3 Generators

This section describes all generators in the system, including thermal units, renewable units and virtual units.

@@ -324,7 +311,7 @@
-

Production costs and limits

+

Production costs and limits

Production costs are represented as piecewise-linear curves. Figure 1 shows an example cost curve with three segments, where it costs 1400, 1600, 2200 and 2400 dollars to generate, respectively, 100, 110, 130 and 135 MW of power. To model this generator, Production cost curve (MW) should be set to [100, 110, 130, 135], and Production cost curve ($) should be set to [1400, 1600, 2200, 2400]. Note that this curve also specifies the production limits. Specifically, the first point identifies the minimum power output when the unit is operational, while the last point identifies the maximum power output.

@@ -332,14 +319,14 @@ Note that this curve also specifies the production limits. Specifically, the fir
Figure 1. Piecewise-linear production cost curve.

-

Additional remarks:

+

Additional remarks:

-

Example

+

Example

{
     "Generators": {
         "gen1": {
@@ -368,7 +355,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Price-sensitive loads

+

1.4 Price-sensitive loads

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 buses 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.

@@ -400,7 +387,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
-

Example

+

Example

{
     "Price-sensitive loads": {
         "p1": {
@@ -412,7 +399,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Transmission Lines

+

1.5 Transmission Lines

This section describes the characteristics of transmission system, such as its topology and the susceptance of each transmission line.

@@ -468,7 +455,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
-

Example

+

Example

{
     "Transmission lines": {
         "l1": {
@@ -484,7 +471,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Reserves

+

1.6 Reserves

This section describes the hourly amount of operating reserves required.

@@ -504,7 +491,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
-

Example

+

Example

{
     "Reserves": {
         "Spinning (MW)": [
@@ -517,7 +504,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Contingencies

+

1.7 Contingencies

This section describes credible contingency scenarios in the optimization, such as the loss of a transmission line or generator.

@@ -540,7 +527,7 @@ Note that this curve also specifies the production limits. Specifically, the fir
-

Example

+

Example

{
     "Contingencies": {
         "c1": {
@@ -554,8 +541,8 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Additional remarks

-

Time series parameters

+

1.8 Additional remarks

+

Time series parameters

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 T elements, where T is the length of the planning horizon, if they are time-dependent. For example, both formats below are valid when T=3:

{
     "Load (MW)": 800.0,
@@ -563,12 +550,15 @@ Note that this curve also specifies the production limits. Specifically, the fir
 }
 
-

Current limitations

+

Current limitations

+
  • Time-varying minimum production amounts are not currently compatible with ramp/startup/shutdown limits.
  • + +

    2. Output Data Format

    +

    The output data format is also JSON-based, but it is not currently documented since we expect it to change significantly in a future version of the package.

    @@ -591,6 +581,8 @@ Note that this curve also specifies the production limits. Specifically, the fir + + diff --git a/0.1/index.html b/0.1/index.html index e705ffd..4849635 100644 --- a/0.1/index.html +++ b/0.1/index.html @@ -134,7 +134,7 @@

    UnitCommitment.jl

    -

    UnitCommitment.jl (UC.jl) is an optimization package for the Security-Constrained Unit Commitment Problem (SCUC), a fundamental optimization problem in power systems used, for example, to clear the day-ahead electricity markets. The package provides benchmark instances for the problem and JuMP implementations of state-of-the-art mixed-integer programming formulations.

    +

    UnitCommitment.jl (UC.jl) is a Julia optimization package for the Security-Constrained Unit Commitment Problem (SCUC), a fundamental optimization problem in power systems used, for example, to clear the day-ahead electricity markets. The package provides benchmark instances for the problem and Julia/JuMP implementations of state-of-the-art mixed-integer programming formulations.

    Package Components

    -

    Installation Guide

    -

    This package was tested and developed with Julia 1.5. To install Julia, please follow the installation guide on their website. To install UnitCommitment.jl, run the Julia interpreter, type ] to open the package manager, then type:

    +

    Usage

    +

    1. Installation

    +

    UnitCommitment.jl was tested and developed with Julia 1.5. To install Julia, please follow the installation guide on the official Julia website. To install UnitCommitment.jl, run the Julia interpreter, type ] to open the package manager, then type:

    pkg> add https://github.com/ANL-CEEESA/UnitCommitment.jl.git
     
    @@ -130,8 +142,73 @@
    pkg> test UnitCommitment
     
    -

    If all tests pass, the package should now be ready to be used by any Julia script on the machine. To try it out in the julia interpreter hit backspace to return to the regular interpreter, and type the following command:

    +

    If all tests pass, the package should now be ready to be used by any Julia script on the machine.

    +

    To solve the optimization models, a mixed-integer linear programming (MILP) solver is also required. Please see the JuMP installation guide for more instructions on installing a solver. Typical open-source choices are Cbc and GLPK. In the instructions below, Cbc will be used, but any other MILP solver listed in JuMP installation guide should also be compatible.

    +

    2. Typical Usage

    +

    2.1 Solving user-provided instances

    +

    The first step to use UC.jl is to construct a JSON file describing your unit commitment instance. See the data format page 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.

    +
    using Cbc
    +using UnitCommitment
    +
    +# Read instance
    +instance = UnitCommitment.read("/path/to/input.json")
    +
    +# Construct optimization model
    +model = UnitCommitment.build_model(instance, Cbc.Optimizer)
    +
    +# Solve model
    +UnitCommitment.optimize!(model)
    +
    +# Extract solution and write it to a file
    +solution = UnitCommitment.get_solution(model)
    +open("/path/to/output.json", "w") do file
    +    JSON.print(file, solution, 2)
    +end
    +
    + +

    2.2 Solving benchmark instances

    +

    As described in the instances page, 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 read_benchmark can be used:

    using UnitCommitment
    +instance = UnitCommitment.read_benchmark("matpower/case3375wp/2017-01-01")
    +
    + +

    3. Advanced usage

    +

    3.1 Modifying the formulation

    +

    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.

    +

    3.2 Generating initial conditions

    +

    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.

    +

    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:

    +
    using Cbc
    +using UnitCommitment
    +
    +# Read original instance
    +instance = UnitCommitment.read("instance.json")
    +
    +# Generate initial conditions (in-place)
    +UnitCommitment.generate_initial_conditions!(instance, Cbc.Optimizer)
    +
    +# Construct and solve optimization model
    +model = UnitCommitment.build_model(instance, Cbc.Optimizer)
    +UnitCommitment.optimize!(model)
    +
    + +
    +

    Warning

    +

    The function generate_initial_conditions! 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.

    +
    +

    3.3 Verifying solutions

    +

    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 UC.jl data format.

    +
    using JSON
    +using UnitCommitment
    +
    +# Read instance
    +instance = UnitCommitment.read("instance.json")
    +
    +# Read solution (potentially produced by other packages) 
    +solution = JSON.parsefile("solution.json")
    +
    +# Validate solution and print validation errors
    +UnitCommitment.validate(instance, solution)
     
    @@ -155,6 +232,8 @@ + +