Initial public release

akazachk/formulations
Alinson S. Xavier 5 years ago
commit b2480ef356

1
.gitattributes vendored

@ -0,0 +1 @@
* text=auto

@ -0,0 +1,33 @@
name: Benchmark
on:
push:
paths-ignore:
- '**.csv'
- '**.md'
- '.git*'
- 'test/**'
jobs:
benchmark:
runs-on: [self-hosted, benchmark]
timeout-minutes: 10080
steps:
- uses: actions/checkout@v1
- name: Benchmark
run: |
julia --project=@. -e 'using Pkg; Pkg.instantiate()'
make build/sysimage.so
make -C benchmark clean
make -C benchmark -kj4
make -C benchmark tables
make -C benchmark clean-mps clean-sol
- name: Upload logs
uses: actions/upload-artifact@v2
with:
name: logs
path: benchmark/results/*
- name: Upload tables & charts
uses: actions/upload-artifact@v2
with:
name: tables
path: benchmark/tables/*

@ -0,0 +1,9 @@
name: Tests
on: push
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- name: Run unit tests
run: julia --project=@. -e 'using Pkg; Pkg.test("UnitCommitment")'

16
.gitignore vendored

@ -0,0 +1,16 @@
*.bak
*.gz
*.lastrun
*.so
*.mps
.ipy*
benchmark/results
benchmark/runs
benchmark/tables
build
instances/**/*.json
instances/_source
local
docs
notebooks
TODO.md

@ -0,0 +1,5 @@
# UnitCommitment.jl
### Version 0.1.0 (November 6, 2020)
* Initial public release

@ -0,0 +1,25 @@
Copyright © 2020, UChicago Argonne, LLC
All Rights Reserved
Software Name: UnitCommitment.jl
By: Argonne National Laboratory
OPEN SOURCE LICENSE
-------------------
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
********************************************************************************
DISCLAIMER
----------
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
********************************************************************************

@ -0,0 +1,31 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
JULIA := julia --color=yes --project=@.
MKDOCS := ~/.local/bin/mkdocs
SRC_FILES := $(wildcard src/*.jl) $(wildcard test/*.jl)
VERSION := 0.1
build/sysimage.so: src/sysimage.jl Project.toml Manifest.toml
mkdir -p build
$(JULIA) src/sysimage.jl
clean:
rm -rf build/*
docs:
$(MKDOCS) build -d ../docs/$(VERSION)/
rm ../docs/$(VERSION)/*.ipynb
docs-push:
rsync -avP docs/ isoron@axavier.org:/www/axavier.org/projects/UnitCommitment.jl/
install-deps-docs:
pip install --user mkdocs mkdocs-cinder python-markdown-math
test: build/sysimage.so
@echo Running tests...
cd test; $(JULIA) --sysimage ../build/sysimage.so runtests.jl | tee ../build/test.log
.PHONY: docs docs-push build test

@ -0,0 +1,366 @@
# This file is machine-generated - editing it directly is not advised
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Statistics", "UUIDs"]
git-tree-sha1 = "9e62e66db34540a0c919d72172cc2f642ac71260"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "0.5.0"
[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.10"
[[Bzip2_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "3663bfffede2ef41358b6fc2e1d8a6d50b3c3904"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.6+2"
[[CEnum]]
git-tree-sha1 = "1b77a77c3b28e0b3f413f7567c9bb8dd9bdccd14"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.3.0"
[[Calculus]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.5.1"
[[Cbc]]
deps = ["BinaryProvider", "CEnum", "Cbc_jll", "Libdl", "MathOptInterface", "SparseArrays"]
git-tree-sha1 = "72e4299de0995a60a6230079adc7e47580870815"
uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
version = "0.7.0"
[[Cbc_jll]]
deps = ["Cgl_jll", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"]
git-tree-sha1 = "16b8ffa56b3ded6b201aa2f50623f260448aa205"
uuid = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d"
version = "2.10.3+4"
[[Cgl_jll]]
deps = ["Clp_jll", "CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "32be20ec1e4c40e5c5d1bbf949ba9918a92a7569"
uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782"
version = "0.60.2+5"
[[Clp_jll]]
deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"]
git-tree-sha1 = "70fe9e52fd95fa37f645e3d30f08f436cc5b1457"
uuid = "06985876-5285-5a41-9fcb-8948a742cc53"
version = "1.17.6+5"
[[CodecBzip2]]
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
git-tree-sha1 = "2e62a725210ce3c3c2e1a3080190e7ca491f18d7"
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
version = "0.7.2"
[[CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"
[[CoinUtils_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"]
git-tree-sha1 = "ee1f06ab89337b7f194c29377ab174e752cdf60d"
uuid = "be027038-0da8-5614-b30d-e42594cb92df"
version = "2.11.3+3"
[[CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"
[[CompilerSupportLibraries_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.3.3+0"
[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "edad9434967fdc0a2631a65d902228400642120c"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.19"
[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[DiffResults]]
deps = ["StaticArrays"]
git-tree-sha1 = "da24935df8e0c6cf28de340b958f6aac88eaa0cc"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.2"
[[DiffRules]]
deps = ["NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "eb0c34204c8410888844ada5359ac8b96292cfd1"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.0.1"
[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "c5714d9bcdba66389612dc4c47ed827c64112997"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.2"
[[Documenter]]
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "1c593d1efa27437ed9dd365d1143c594b563e138"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.25.1"
[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "1d090099fb82223abc48f7ce176d3f7696ede36d"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.12"
[[GLPK]]
deps = ["BinaryProvider", "GLPK_jll", "Libdl", "MathOptInterface", "SparseArrays"]
git-tree-sha1 = "86573ecb852e303b209212046af44871f1c0e49c"
uuid = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
version = "0.13.0"
[[GLPK_jll]]
deps = ["GMP_jll", "Libdl", "Pkg"]
git-tree-sha1 = "ccc855de74292e478d4278e3a6fdd8212f75e81e"
uuid = "e8aa6df9-e6ca-548a-97ff-1f85fc5b8b98"
version = "4.64.0+0"
[[GMP_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "4dd9301d3a027c05ec403e756ee7a60e3c367e5d"
uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d"
version = "6.1.2+5"
[[GZip]]
deps = ["Libdl"]
git-tree-sha1 = "039be665faf0b8ae36e089cd694233f5dee3f7d6"
uuid = "92fee26a-97fe-5a0c-ad85-20a5f3185b63"
version = "0.5.1"
[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
git-tree-sha1 = "2ac03263ce44be4222342bca1c51c36ce7566161"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.8.17"
[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"
[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"
[[JSONSchema]]
deps = ["HTTP", "JSON", "ZipFile"]
git-tree-sha1 = "832a4d327d9dafdae55a6ecae04f9997c83615cc"
uuid = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
version = "0.3.0"
[[JuMP]]
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "MutableArithmetics", "NaNMath", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "cbab42e2e912109d27046aa88f02a283a9abac7c"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.21.3"
[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.5"
[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[MathOptInterface]]
deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "JSON", "JSONSchema", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
git-tree-sha1 = "cd2049c055c7d192a235670d50faa375361624ba"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.9.14"
[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "426a6978b03a97ceb7ead77775a1da066343ec6e"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.2"
[[MbedTLS_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "a0cb0d489819fa7ea5f9fa84c7e7eba19d8073af"
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.16.6+1"
[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
[[MutableArithmetics]]
deps = ["LinearAlgebra", "SparseArrays", "Test"]
git-tree-sha1 = "6cf09794783b9de2e662c4e8b60d743021e338d0"
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
version = "0.2.10"
[[NaNMath]]
git-tree-sha1 = "c84c576296d0e2fbb3fc134d3e09086b3ea617cd"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.4"
[[OpenBLAS32_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "793b33911239d2651c356c823492b58d6490d36a"
uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2"
version = "0.3.9+4"
[[OpenSpecFun_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "d51c416559217d974a1113522d5919235ae67a87"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.3+3"
[[OrderedCollections]]
git-tree-sha1 = "293b70ac1780f9584c89268a6e2a560d938a7065"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.3.0"
[[Osi_jll]]
deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"]
git-tree-sha1 = "bd436a97280df40938e66ae8d18e57aceb072856"
uuid = "7da25872-d9ce-5375-a4d3-7a845f58efdd"
version = "0.108.5+3"
[[PackageCompiler]]
deps = ["Libdl", "Pkg", "UUIDs"]
git-tree-sha1 = "98aa9c653e1dc3473bb5050caf8501293db9eee1"
uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
version = "1.2.1"
[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "10134f2ee0b1978ae7752c41306e131a684e1f06"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.0.7"
[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "d37400976e98018ee840e0ca4f9d20baa231dc6b"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.0.1"
[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[[SpecialFunctions]]
deps = ["OpenSpecFun_jll"]
git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.10.3"
[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "016d1e1a00fabc556473b07161da3d39726ded35"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "0.12.4"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[[TimerOutputs]]
deps = ["Printf"]
git-tree-sha1 = "f458ca23ff80e46a630922c555d838303e4b9603"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.6"
[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.5"
[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[ZipFile]]
deps = ["Libdl", "Printf", "Zlib_jll"]
git-tree-sha1 = "254975fef2fc526583bb9b7c9420fe66ffe09f2f"
uuid = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
version = "0.9.2"
[[Zlib_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "622d8b6dc0c7e8029f17127703de9819134d1b71"
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.11+14"

@ -0,0 +1,30 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
name = "UnitCommitment"
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
authors = ["Santos Xavier, Alinson <axavier@anl.gov>"]
repo = "https://github.com/ANL-CEEESA/UnitCommitment.jl"
version = "0.1.0"
[deps]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
GZip = "92fee26a-97fe-5a0c-ad85-20a5f3185b63"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
[compat]
JuMP = "0.21"

@ -0,0 +1,26 @@
<a href="https://github.com/iSoron/UnitCommitment.jl/actions?query=workflow%3ATest+branch%3Adev"><img src="https://github.com/iSoron/UnitCommitment.jl/workflows/Tests/badge.svg"></img></a>
<a href="https://github.com/iSoron/UnitCommitment.jl/actions?query=workflow%3ABenchmark+branch%3Adev"><img src="https://github.com/iSoron/UnitCommitment.jl/workflows/Benchmark/badge.svg"></img></a>
# UnitCommitment.jl
**UnitCommitment.jl** is an optimization package for the Security-Constrained Unit Commitment Problem (SCUC), a fundamental optimization problem in power systems which is used, for example, to clear the day-ahead electricity markets. The problem asks for the most cost-effective power generation schedule under a number of physical, operational and economic constraints.
### Package Components
* **Data Format:** The package proposes an extensible and fully-documented JSON-based data specification format for SCUC, developed in collaboration with Independent System Operators (ISOs), which describes the most important aspects of the problem.
* **Benchmark Instances:** The package provides a diverse collection of large-scale benchmark instances collected from the literature and extended to make them more challenging and realistic, based on publicly available data.
* **Model Implementation**: The package provides a Julia/JuMP implementation of state-of-the-art formulations and solution methods for SCUC. Our goal is to keep this implementation up-to-date, as new methods are proposed in the literature.
* **Benchmark Tools:** The package provides automated benchmark scripts to accurately evaluate the performance impact of proposed code changes.
### Documentation
* [Installation Guide](https://axavier.org/projects/UnitCommitment.jl/install/)
* [Data Format Specification](https://axavier.org/projects/UnitCommitment.jl/format/)
### Authors
* **Alinson Santos Xavier,** Argonne National Laboratory
* **Feng Qiu,** Argonne National Laboratory
### Collaborators
* **Yonghong Chen,** Midcontinent Independent System Operator
* **Feng Pan,** Pacific Northwest National Laboratory

@ -0,0 +1,124 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
SHELL := /bin/bash
JULIA := julia --project=. --sysimage ../build/sysimage.so
TIMESTAMP := $(shell date "+%Y-%m-%d %H:%M")
SRC_FILES := $(wildcard ../src/*.jl)
INSTANCES_PGLIB := \
pglib-uc/ca/2014-09-01_reserves_0 \
pglib-uc/ca/2014-09-01_reserves_1 \
pglib-uc/ca/2014-09-01_reserves_3 \
pglib-uc/ca/2014-09-01_reserves_5 \
pglib-uc/ca/2014-12-01_reserves_0 \
pglib-uc/ca/2014-12-01_reserves_1 \
pglib-uc/ca/2014-12-01_reserves_3 \
pglib-uc/ca/2014-12-01_reserves_5 \
pglib-uc/ca/2015-03-01_reserves_0 \
pglib-uc/ca/2015-03-01_reserves_1 \
pglib-uc/ca/2015-03-01_reserves_3 \
pglib-uc/ca/2015-03-01_reserves_5 \
pglib-uc/ca/2015-06-01_reserves_0 \
pglib-uc/ca/2015-06-01_reserves_1 \
pglib-uc/ca/2015-06-01_reserves_3 \
pglib-uc/ca/2015-06-01_reserves_5 \
pglib-uc/ca/Scenario400_reserves_0 \
pglib-uc/ca/Scenario400_reserves_1 \
pglib-uc/ca/Scenario400_reserves_3 \
pglib-uc/ca/Scenario400_reserves_5 \
pglib-uc/ferc/2015-01-01_hw \
pglib-uc/ferc/2015-01-01_lw \
pglib-uc/ferc/2015-02-01_hw \
pglib-uc/ferc/2015-02-01_lw \
pglib-uc/ferc/2015-03-01_hw \
pglib-uc/ferc/2015-03-01_lw \
pglib-uc/ferc/2015-04-01_hw \
pglib-uc/ferc/2015-04-01_lw \
pglib-uc/ferc/2015-05-01_hw \
pglib-uc/ferc/2015-05-01_lw \
pglib-uc/ferc/2015-06-01_hw \
pglib-uc/ferc/2015-06-01_lw \
pglib-uc/ferc/2015-07-01_hw \
pglib-uc/ferc/2015-07-01_lw \
pglib-uc/ferc/2015-08-01_hw \
pglib-uc/ferc/2015-08-01_lw \
pglib-uc/ferc/2015-09-01_hw \
pglib-uc/ferc/2015-09-01_lw \
pglib-uc/ferc/2015-10-01_hw \
pglib-uc/ferc/2015-10-01_lw \
pglib-uc/ferc/2015-11-02_hw \
pglib-uc/ferc/2015-11-02_lw \
pglib-uc/ferc/2015-12-01_hw \
pglib-uc/ferc/2015-12-01_lw \
pglib-uc/rts_gmlc/2020-01-27 \
pglib-uc/rts_gmlc/2020-02-09 \
pglib-uc/rts_gmlc/2020-03-05 \
pglib-uc/rts_gmlc/2020-04-03 \
pglib-uc/rts_gmlc/2020-05-05 \
pglib-uc/rts_gmlc/2020-06-09 \
pglib-uc/rts_gmlc/2020-07-06 \
pglib-uc/rts_gmlc/2020-08-12 \
pglib-uc/rts_gmlc/2020-09-20 \
pglib-uc/rts_gmlc/2020-10-27 \
pglib-uc/rts_gmlc/2020-11-25 \
pglib-uc/rts_gmlc/2020-12-23
INSTANCES_MATPOWER := \
matpower/case118/2017-02-01 \
matpower/case118/2017-08-01 \
matpower/case300/2017-02-01 \
matpower/case300/2017-08-01 \
matpower/case1354pegase/2017-02-01 \
matpower/case1354pegase/2017-08-01 \
matpower/case1888rte/2017-02-01 \
matpower/case1888rte/2017-08-01 \
matpower/case1951rte/2017-02-01 \
matpower/case1951rte/2017-08-01 \
matpower/case2848rte/2017-02-01 \
matpower/case2848rte/2017-08-01 \
matpower/case2868rte/2017-02-01 \
matpower/case2868rte/2017-08-01 \
matpower/case3375wp/2017-02-01 \
matpower/case3375wp/2017-08-01 \
matpower/case6468rte/2017-02-01 \
matpower/case6468rte/2017-08-01 \
matpower/case6515rte/2017-02-01 \
matpower/case6515rte/2017-08-01
SAMPLES := 1 2 3
SOLUTIONS_MATPOWER := $(foreach s,$(SAMPLES),$(addprefix results/,$(addsuffix .$(s).sol.json,$(INSTANCES_MATPOWER))))
SOLUTIONS_PGLIB := $(foreach s,$(SAMPLES),$(addprefix results/,$(addsuffix .$(s).sol.json,$(INSTANCES_PGLIB))))
.PHONY: tables save small large clean-mps matpower pglib
all: matpower pglib
matpower: $(SOLUTIONS_MATPOWER)
pglib: $(SOLUTIONS_PGLIB)
clean:
@rm -rf tables/benchmark* tables/compare* results
clean-mps:
@rm -fv results/*/*/*.mps.gz
clean-sol:
@rm -rf results/*/*/*.sol.*
save:
mkdir -p "runs/$(TIMESTAMP)"
rsync -avP results tables "runs/$(TIMESTAMP)/"
results/%.sol.json: run.jl
@echo "run $*"
@mkdir -p $(dir results/$*)
@$(JULIA) run.jl $* 2>&1 | cat > results/$*.log
@echo "run $* [done]"
tables:
@mkdir -p tables
@python scripts/table.py
#@python scripts/compare.py tables/reference.csv tables/benchmark.csv

@ -0,0 +1,417 @@
# This file is machine-generated - editing it directly is not advised
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Statistics", "UUIDs"]
git-tree-sha1 = "9e62e66db34540a0c919d72172cc2f642ac71260"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "0.5.0"
[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "ecdec412a9abc8db54c0efc5548c64dfce072058"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.10"
[[Bzip2_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "3663bfffede2ef41358b6fc2e1d8a6d50b3c3904"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.6+2"
[[CEnum]]
git-tree-sha1 = "1b77a77c3b28e0b3f413f7567c9bb8dd9bdccd14"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.3.0"
[[Calculus]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.5.1"
[[Cbc]]
deps = ["BinaryProvider", "CEnum", "Cbc_jll", "Libdl", "MathOptInterface", "SparseArrays"]
git-tree-sha1 = "72e4299de0995a60a6230079adc7e47580870815"
uuid = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
version = "0.7.0"
[[Cbc_jll]]
deps = ["Cgl_jll", "Clp_jll", "CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"]
git-tree-sha1 = "16b8ffa56b3ded6b201aa2f50623f260448aa205"
uuid = "38041ee0-ae04-5750-a4d2-bb4d0d83d27d"
version = "2.10.3+4"
[[Cgl_jll]]
deps = ["Clp_jll", "CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "32be20ec1e4c40e5c5d1bbf949ba9918a92a7569"
uuid = "3830e938-1dd0-5f3e-8b8e-b3ee43226782"
version = "0.60.2+5"
[[Clp_jll]]
deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Osi_jll", "Pkg"]
git-tree-sha1 = "70fe9e52fd95fa37f645e3d30f08f436cc5b1457"
uuid = "06985876-5285-5a41-9fcb-8948a742cc53"
version = "1.17.6+5"
[[CodeTracking]]
deps = ["InteractiveUtils", "UUIDs"]
git-tree-sha1 = "cab4da992adc0a64f63fa30d2db2fd8bec40cab4"
uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
version = "0.5.11"
[[CodecBzip2]]
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
git-tree-sha1 = "2e62a725210ce3c3c2e1a3080190e7ca491f18d7"
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
version = "0.7.2"
[[CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"
[[CoinUtils_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"]
git-tree-sha1 = "ee1f06ab89337b7f194c29377ab174e752cdf60d"
uuid = "be027038-0da8-5614-b30d-e42594cb92df"
version = "2.11.3+3"
[[CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"
[[CompilerSupportLibraries_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.3.3+0"
[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "edad9434967fdc0a2631a65d902228400642120c"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.19"
[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[DiffResults]]
deps = ["StaticArrays"]
git-tree-sha1 = "da24935df8e0c6cf28de340b958f6aac88eaa0cc"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.2"
[[DiffRules]]
deps = ["NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "eb0c34204c8410888844ada5359ac8b96292cfd1"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.0.1"
[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "c5714d9bcdba66389612dc4c47ed827c64112997"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.2"
[[Documenter]]
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "1c593d1efa27437ed9dd365d1143c594b563e138"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.25.1"
[[FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "1d090099fb82223abc48f7ce176d3f7696ede36d"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.12"
[[GLPK]]
deps = ["BinaryProvider", "GLPK_jll", "Libdl", "MathOptInterface", "SparseArrays"]
git-tree-sha1 = "86573ecb852e303b209212046af44871f1c0e49c"
uuid = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
version = "0.13.0"
[[GLPK_jll]]
deps = ["GMP_jll", "Libdl", "Pkg"]
git-tree-sha1 = "ccc855de74292e478d4278e3a6fdd8212f75e81e"
uuid = "e8aa6df9-e6ca-548a-97ff-1f85fc5b8b98"
version = "4.64.0+0"
[[GMP_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "4dd9301d3a027c05ec403e756ee7a60e3c367e5d"
uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d"
version = "6.1.2+5"
[[GZip]]
deps = ["Libdl"]
git-tree-sha1 = "039be665faf0b8ae36e089cd694233f5dee3f7d6"
uuid = "92fee26a-97fe-5a0c-ad85-20a5f3185b63"
version = "0.5.1"
[[Gurobi]]
deps = ["Libdl", "LinearAlgebra", "MathOptInterface", "MathProgBase", "SparseArrays"]
git-tree-sha1 = "f36a2fa62909675681aec582ccfc4a4a629406e4"
uuid = "2e9cd046-0924-5485-92f1-d5272153d98b"
version = "0.8.1"
[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
git-tree-sha1 = "2ac03263ce44be4222342bca1c51c36ce7566161"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.8.17"
[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"
[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"
[[JSONSchema]]
deps = ["HTTP", "JSON", "ZipFile"]
git-tree-sha1 = "832a4d327d9dafdae55a6ecae04f9997c83615cc"
uuid = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
version = "0.3.0"
[[JuMP]]
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "MutableArithmetics", "NaNMath", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "cbab42e2e912109d27046aa88f02a283a9abac7c"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.21.3"
[[JuliaInterpreter]]
deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"]
git-tree-sha1 = "79e4496b79e8af45198f8c291f26d4514d6b06d6"
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
version = "0.7.24"
[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
[[LoweredCodeUtils]]
deps = ["JuliaInterpreter"]
git-tree-sha1 = "1b632dc108106101a9909db7be8f8b32ed8d02f7"
uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b"
version = "0.4.6"
[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.5"
[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[MathOptFormat]]
deps = ["CodecZlib", "DataStructures", "HTTP", "JSON", "JSONSchema", "MathOptInterface"]
git-tree-sha1 = "0206edd9310b863c222af23f71fde5d09e95c20c"
uuid = "f4570300-c277-12e8-125c-4912f86ce65d"
version = "0.2.2"
[[MathOptInterface]]
deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "JSON", "JSONSchema", "LinearAlgebra", "MutableArithmetics", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
git-tree-sha1 = "cd2049c055c7d192a235670d50faa375361624ba"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.9.14"
[[MathProgBase]]
deps = ["LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "9abbe463a1e9fc507f12a69e7f29346c2cdc472c"
uuid = "fdba3010-5040-5b88-9595-932c9decdf73"
version = "0.7.8"
[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "426a6978b03a97ceb7ead77775a1da066343ec6e"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.2"
[[MbedTLS_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "a0cb0d489819fa7ea5f9fa84c7e7eba19d8073af"
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.16.6+1"
[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
[[MutableArithmetics]]
deps = ["LinearAlgebra", "SparseArrays", "Test"]
git-tree-sha1 = "6cf09794783b9de2e662c4e8b60d743021e338d0"
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
version = "0.2.10"
[[NaNMath]]
git-tree-sha1 = "c84c576296d0e2fbb3fc134d3e09086b3ea617cd"
uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
version = "0.3.4"
[[OpenBLAS32_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "793b33911239d2651c356c823492b58d6490d36a"
uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2"
version = "0.3.9+4"
[[OpenSpecFun_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "d51c416559217d974a1113522d5919235ae67a87"
uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e"
version = "0.5.3+3"
[[OrderedCollections]]
git-tree-sha1 = "293b70ac1780f9584c89268a6e2a560d938a7065"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.3.0"
[[Osi_jll]]
deps = ["CoinUtils_jll", "CompilerSupportLibraries_jll", "Libdl", "OpenBLAS32_jll", "Pkg"]
git-tree-sha1 = "bd436a97280df40938e66ae8d18e57aceb072856"
uuid = "7da25872-d9ce-5375-a4d3-7a845f58efdd"
version = "0.108.5+3"
[[PackageCompiler]]
deps = ["Libdl", "Pkg", "UUIDs"]
git-tree-sha1 = "98aa9c653e1dc3473bb5050caf8501293db9eee1"
uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
version = "1.2.1"
[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "10134f2ee0b1978ae7752c41306e131a684e1f06"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.0.7"
[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "d37400976e98018ee840e0ca4f9d20baa231dc6b"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.0.1"
[[Revise]]
deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "UUIDs", "Unicode"]
git-tree-sha1 = "0992d4643e27b2deb9f2e4ec7a56b7033813a027"
uuid = "295af30f-e4ad-537b-8983-00126c2a3abe"
version = "2.7.3"
[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[[SpecialFunctions]]
deps = ["OpenSpecFun_jll"]
git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.10.3"
[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "016d1e1a00fabc556473b07161da3d39726ded35"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "0.12.4"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[[TimerOutputs]]
deps = ["Printf"]
git-tree-sha1 = "f458ca23ff80e46a630922c555d838303e4b9603"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.6"
[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.5"
[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[UnitCommitment]]
deps = ["Cbc", "DataStructures", "Documenter", "GLPK", "GZip", "JSON", "JuMP", "LinearAlgebra", "Logging", "MathOptFormat", "MathOptInterface", "PackageCompiler", "Printf", "Requires", "Revise", "SparseArrays", "Test", "TimerOutputs"]
path = ".."
uuid = "64606440-39ea-11e9-0f29-3303a1d3d877"
version = "2.1.0"
[[ZipFile]]
deps = ["Libdl", "Printf", "Zlib_jll"]
git-tree-sha1 = "254975fef2fc526583bb9b7c9420fe66ffe09f2f"
uuid = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
version = "0.9.2"
[[Zlib_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "622d8b6dc0c7e8029f17127703de9819134d1b71"
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.11+14"

@ -0,0 +1,5 @@
[deps]
Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
UnitCommitment = "64606440-39ea-11e9-0f29-3303a1d3d877"

@ -0,0 +1,61 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
using UnitCommitment
using JuMP
using Gurobi
using JSON
using Logging
using Printf
using LinearAlgebra
function main()
basename, suffix = split(ARGS[1], ".")
solution_filename = "results/$basename.$suffix.sol.json"
model_filename = "results/$basename.$suffix.mps.gz"
time_limit = 60 * 20
BLAS.set_num_threads(4)
global_logger(TimeLogger(initial_time = time()))
total_time = @elapsed begin
@info "Reading: $basename"
time_read = @elapsed begin
instance = UnitCommitment.read_benchmark(basename)
end
@info @sprintf("Read problem in %.2f seconds", time_read)
time_model = @elapsed begin
model = build_model(instance=instance,
optimizer=optimizer_with_attributes(Gurobi.Optimizer,
"Threads" => 4,
"Seed" => rand(1:1000),
))
end
@info "Optimizing..."
BLAS.set_num_threads(1)
UnitCommitment.optimize!(model, time_limit=time_limit, gap_limit=1e-3)
end
@info @sprintf("Total time was %.2f seconds", total_time)
@info "Writing: $solution_filename"
solution = UnitCommitment.get_solution(model)
open(solution_filename, "w") do file
JSON.print(file, solution, 2)
end
@info "Verifying solution..."
UnitCommitment.validate(instance, solution)
@info "Setting variable names..."
UnitCommitment.set_variable_names!(model)
@info "Exporting model..."
JuMP.write_to_file(model.mip, model_filename)
end
main()

@ -0,0 +1,64 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import sys
easy_cutoff = 120
b1 = pd.read_csv(sys.argv[1], index_col=0)
b2 = pd.read_csv(sys.argv[2], index_col=0)
c1 = b1.groupby(["Group", "Instance", "Sample"])[["Optimization time (s)", "Primal bound"]].mean()
c2 = b2.groupby(["Group", "Instance", "Sample"])[["Optimization time (s)", "Primal bound"]].mean()
c1.columns = ["A Time (s)", "A Value"]
c2.columns = ["B Time (s)", "B Value"]
merged = pd.concat([c1, c2], axis=1)
merged["Speedup"] = merged["A Time (s)"] / merged["B Time (s)"]
merged["Time diff (s)"] = merged["B Time (s)"] - merged["A Time (s)"]
merged["Value diff (%)"] = np.round((merged["B Value"] - merged["A Value"]) / merged["A Value"] * 100.0, 5)
merged.loc[merged.loc[:, "B Time (s)"] <= 0, "Speedup"] = float("nan")
merged.loc[merged.loc[:, "B Time (s)"] <= 0, "Time diff (s)"] = float("nan")
merged = merged[(merged["A Time (s)"] >= easy_cutoff) | (merged["B Time (s)"] >= easy_cutoff)]
merged.reset_index(inplace=True)
merged["Name"] = merged["Group"] + "/" + merged["Instance"]
merged = merged.sort_values(by="Speedup", ascending=False)
k = len(merged.groupby("Name"))
plt.figure(figsize=(12, 0.50 * k))
plt.rcParams['xtick.bottom'] = plt.rcParams['xtick.labelbottom'] = True
plt.rcParams['xtick.top'] = plt.rcParams['xtick.labeltop'] = True
sns.set_style("whitegrid")
sns.set_palette("Set1")
sns.barplot(data=merged,
x="Speedup",
y="Name",
color="tab:red",
capsize=0.15,
errcolor="k",
errwidth=1.25)
plt.axvline(1.0, linestyle="--", color="k")
plt.tight_layout()
print("Writing tables/compare.png")
plt.savefig("tables/compare.png", dpi=150)
print("Writing tables/compare.csv")
merged.loc[:, ["Group",
"Instance",
"Sample",
"A Time (s)",
"B Time (s)",
"Speedup",
"Time diff (s)",
"A Value",
"B Value",
"Value diff (%)",
]
].to_csv("tables/compare.csv", index_label="Index")

@ -0,0 +1,184 @@
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
from pathlib import Path
import pandas as pd
import re
from tabulate import tabulate
def process_all_log_files():
pathlist = Path(".").glob('results/*/*/*.log')
rows = []
for path in pathlist:
if ".ipy" in str(path):
continue
row = process(str(path))
rows += [row]
df = pd.DataFrame(rows)
df = df.sort_values(["Group", "Buses"])
df.index = range(len(df))
print("Writing tables/benchmark.csv")
df.to_csv("tables/benchmark.csv", index_label="Index")
def process(filename):
parts = filename.replace(".log", "").split("/")
group_name = "/".join(parts[1:-1])
instance_name = parts[-1]
instance_name, sample_name = instance_name.split(".")
nodes = 0.0
optimize_time = 0.0
simplex_iterations = 0.0
primal_bound = None
dual_bound = None
gap = None
root_obj = None
root_iterations = 0.0
root_time = 0.0
n_rows_orig, n_rows_presolved = None, None
n_cols_orig, n_cols_presolved = None, None
n_nz_orig, n_nz_presolved = None, None
n_cont_vars_presolved, n_bin_vars_presolved = None, None
read_time, model_time, isf_time, total_time = None, None, None, None
cb_calls, cb_time = 0, 0.0
transmission_count, transmission_time, transmission_calls = 0, 0.0, 0
# m = re.search("case([0-9]*)", instance_name)
# n_buses = int(m.group(1))
n_buses = 0
with open(filename) as file:
for line in file.readlines():
m = re.search(r"Explored ([0-9.e+]*) nodes \(([0-9.e+]*) simplex iterations\) in ([0-9.e+]*) seconds", line)
if m is not None:
nodes += int(m.group(1))
simplex_iterations += int(m.group(2))
optimize_time += float(m.group(3))
m = re.search(r"Best objective ([0-9.e+]*), best bound ([0-9.e+]*), gap ([0-9.e+]*)\%", line)
if m is not None:
primal_bound = float(m.group(1))
dual_bound = float(m.group(2))
gap = round(float(m.group(3)), 3)
m = re.search(r"Root relaxation: objective ([0-9.e+]*), ([0-9.e+]*) iterations, ([0-9.e+]*) seconds", line)
if m is not None:
root_obj = float(m.group(1))
root_iterations += int(m.group(2))
root_time += float(m.group(3))
m = re.search(r"Presolved: ([0-9.e+]*) rows, ([0-9.e+]*) columns, ([0-9.e+]*) nonzeros", line)
if m is not None:
n_rows_presolved = int(m.group(1))
n_cols_presolved = int(m.group(2))
n_nz_presolved = int(m.group(3))
m = re.search(r"Optimize a model with ([0-9.e+]*) rows, ([0-9.e+]*) columns and ([0-9.e+]*) nonzeros", line)
if m is not None:
n_rows_orig = int(m.group(1))
n_cols_orig = int(m.group(2))
n_nz_orig = int(m.group(3))
m = re.search(r"Variable types: ([0-9.e+]*) continuous, ([0-9.e+]*) integer \(([0-9.e+]*) binary\)", line)
if m is not None:
n_cont_vars_presolved = int(m.group(1))
n_bin_vars_presolved = int(m.group(3))
m = re.search(r"Read problem in ([0-9.e+]*) seconds", line)
if m is not None:
read_time = float(m.group(1))
m = re.search(r"Computed ISF in ([0-9.e+]*) seconds", line)
if m is not None:
isf_time = float(m.group(1))
m = re.search(r"Built model in ([0-9.e+]*) seconds", line)
if m is not None:
model_time = float(m.group(1))
m = re.search(r"Total time was ([0-9.e+]*) seconds", line)
if m is not None:
total_time = float(m.group(1))
m = re.search(r"User-callback calls ([0-9.e+]*), time in user-callback ([0-9.e+]*) sec", line)
if m is not None:
cb_calls = int(m.group(1))
cb_time = float(m.group(2))
m = re.search(r"Verified transmission limits in ([0-9.e+]*) sec", line)
if m is not None:
transmission_time += float(m.group(1))
transmission_calls += 1
m = re.search(r".*MW overflow", line)
if m is not None:
transmission_count += 1
return {
"Group": group_name,
"Instance": instance_name,
"Sample": sample_name,
"Optimization time (s)": optimize_time,
"Read instance time (s)": read_time,
"Model construction time (s)": model_time,
"ISF & LODF computation time (s)": isf_time,
"Total time (s)": total_time,
"User-callback time": cb_time,
"User-callback calls": cb_calls,
"Gap (%)": gap,
"B&B Nodes": nodes,
"Simplex iterations": simplex_iterations,
"Primal bound": primal_bound,
"Dual bound": dual_bound,
"Root relaxation iterations": root_iterations,
"Root relaxation time": root_time,
"Root relaxation value": root_obj,
"Rows": n_rows_orig,
"Cols": n_cols_orig,
"Nonzeros": n_nz_orig,
"Rows (presolved)": n_rows_presolved,
"Cols (presolved)": n_cols_presolved,
"Nonzeros (presolved)": n_nz_presolved,
"Bin vars (presolved)": n_bin_vars_presolved,
"Cont vars (presolved)": n_cont_vars_presolved,
"Buses": n_buses,
"Transmission screening constraints": transmission_count,
"Transmission screening time": transmission_time,
"Transmission screening calls": transmission_calls,
}
def generate_chart():
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
tables = []
files = ["tables/benchmark.csv"]
for f in files:
table = pd.read_csv(f, index_col=0)
table.loc[:, "Instance"] = table.loc[:,"Group"] + "/" + table.loc[:,"Instance"]
table.loc[:, "Filename"] = f
tables += [table]
benchmark = pd.concat(tables, sort=True)
benchmark = benchmark.sort_values(by="Instance")
k = len(benchmark.groupby("Instance"))
plt.figure(figsize=(12, 0.50 * k))
sns.set_style("whitegrid")
sns.set_palette("Set1")
sns.barplot(y="Instance",
x="Total time (s)",
color="tab:red",
capsize=0.15,
errcolor="k",
errwidth=1.25,
data=benchmark);
plt.tight_layout()
print("Writing tables/benchmark.png")
plt.savefig("tables/benchmark.png", dpi=150);
if __name__ == "__main__":
process_all_log_files()
generate_chart()

@ -0,0 +1,29 @@
UnitCommitment.jl Instances
===========================
References
----------
### PGLIB-UC
* Coffrin, Carleton and Knueven, Bernard. "Power Grid Lib - Unit Commitment". https://github.com/power-grid-lib/pglib-uc
* Knueven, Bernard, James Ostrowski, and Jean-Paul Watson. "On mixed integer programming formulations for the unit commitment problem." Pre-print available at http://www.optimization-online.org/DB_HTML/2018/11/6930.pdf (2018).
* Krall, Eric, Michael Higgins, and Richard P. ONeill. "RTO unit commitment test system." Federal Energy Regulatory Commission. Available: http://ferc.gov/legal/staff-reports/rto-COMMITMENT-TEST.pdf (2012).
### MATPOWER
* https://github.com/MATPOWER/matpower
* R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, "MATPOWER: Steady-State Operations, Planning and Analysis Tools for Power Systems Research and Education," Power Systems, IEEE Transactions on, vol. 26, no. 1, pp. 1219, Feb. 2011.
* C. Josz, S. Fliscounakis, J. Maeght, and P. Panciatici, "AC Power Flow Data in MATPOWER and QCQP Format: iTesla, RTE Snapshots, and PEGASE" https://arxiv.org/abs/1603.01533
* S. Fliscounakis, P. Panciatici, F. Capitanescu, and L. Wehenkel, "Contingency ranking with respect to overloads in very large power systems taking into account uncertainty, preventive and corrective actions", Power Systems, IEEE Trans. on, (28)4:4909-4917, 2013. https://doi.org/10.1109/TPWRS.2013.2251015
### RTS-GMLC
* https://github.com/GridMod/RTS-GMLC
* Barrows, Clayton, Aaron Bloom, Ali Ehlen, Jussi Ikaheimo, Jennie Jorgenson, Dheepak Krishnamurthy, Jessica Lau et al. "The IEEE Reliability Test System: A Proposed 2019 Update." IEEE Transactions on Power Systems (2019).

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save