diff --git a/CHANGELOG.md b/CHANGELOG.md index 246dfa2..b9f5fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -GasGridModels.jl Change Log +GasPowerModels.jl Change Log ======================= ### Pending diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 0000000..64726f1 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,238 @@ +# This file is machine-generated - editing it directly is not advised + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[BinDeps]] +deps = ["Compat", "Libdl", "SHA", "URIParser"] +git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9" +uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" +version = "0.8.10" + +[[BinaryProvider]] +deps = ["Libdl", "SHA"] +git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648" +uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" +version = "0.5.4" + +[[Calculus]] +deps = ["Compat"] +git-tree-sha1 = "f60954495a7afcee4136f78d1d60350abd37a409" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.4.1" + +[[CommonSubexpressions]] +deps = ["Test"] +git-tree-sha1 = "efdaf19ab11c7889334ca247ff4c9f7c322817b0" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.2.0" + +[[Compat]] +deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] +git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "2.1.0" + +[[DataStructures]] +deps = ["InteractiveUtils", "OrderedCollections", "Random", "Serialization", "Test"] +git-tree-sha1 = "ca971f03e146cf144a9e2f2ce59674f5bf0e8038" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.15.0" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[DelimitedFiles]] +deps = ["Mmap"] +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" + +[[DiffResults]] +deps = ["Compat", "StaticArrays"] +git-tree-sha1 = "34a4a1e8be7bc99bc9c611b895b5baf37a80584c" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "0.0.4" + +[[DiffRules]] +deps = ["Random", "Test"] +git-tree-sha1 = "dc0869fb2f5b23466b32ea799bd82c76480167f7" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "0.0.10" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[EzXML]] +deps = ["BinaryProvider", "Libdl", "Pkg", "Printf", "Test"] +git-tree-sha1 = "ad00b79cca4bb3eabb4209217859c553af4401f5" +uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615" +version = "0.9.1" + +[[ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "InteractiveUtils", "LinearAlgebra", "NaNMath", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "Test"] +git-tree-sha1 = "4c4d727f1b7e0092134fabfab6396b8945c1ea5b" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.3" + +[[GasModels]] +deps = ["Compat", "InfrastructureModels", "JSON", "JuMP", "LinearAlgebra", "MathOptInterface", "Memento"] +git-tree-sha1 = "f763a4c7dc69390885bcb7034c80c5476de98f9c" +uuid = "5e113713-6c35-5477-b766-e1109486666f" +version = "0.4.0" + +[[InfrastructureModels]] +deps = ["JuMP", "Memento"] +git-tree-sha1 = "131d2d24a2a0d404f59dceab2fb8f8cca2aadce5" +uuid = "2030c09a-7f63-5d83-885d-db604e0e9cc0" +version = "0.2.1" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[JSON]] +deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"] +git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.20.0" + +[[JuMP]] +deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "a37fdb14ee3a04b4df44c20a73da89c57035bdf2" +uuid = "4076af6c-e467-56ae-b986-b466b2749572" +version = "0.19.2" + +[[LibGit2]] +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" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[MathOptInterface]] +deps = ["Compat", "Unicode"] +git-tree-sha1 = "5d3de69c9220610d0336ab45d3eb8b6ac7a7c807" +uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" +version = "0.8.4" + +[[Memento]] +deps = ["Dates", "Distributed", "JSON", "Serialization", "Sockets", "Syslogs", "Test", "TimeZones", "UUIDs"] +git-tree-sha1 = "090463b13da88689e5eae6468a6f531a21392175" +uuid = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9" +version = "0.12.1" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[Mocking]] +deps = ["Compat", "Dates"] +git-tree-sha1 = "4bf69aaf823b119b034e091e16b18311aa191663" +uuid = "78c3b35d-d492-501b-9361-3d52fe80e533" +version = "0.5.7" + +[[NaNMath]] +deps = ["Compat"] +git-tree-sha1 = "ce3b85e484a5d4c71dd5316215069311135fa9f2" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "0.3.2" + +[[OrderedCollections]] +deps = ["Random", "Serialization", "Test"] +git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.1.0" + +[[Pkg]] +deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[PowerModels]] +deps = ["InfrastructureModels", "JSON", "JuMP", "LinearAlgebra", "MathOptInterface", "Memento", "SparseArrays"] +git-tree-sha1 = "74d51121ad6fdf2fd1dc06403e2855dac1b8e192" +uuid = "c36e90e8-916a-50a6-bd94-075b64ef4655" +version = "0.11.2" + +[[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" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[SpecialFunctions]] +deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"] +git-tree-sha1 = "0b45dc2e45ed77f445617b99ff2adf0f5b0f23ea" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "0.7.2" + +[[StaticArrays]] +deps = ["LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "db23bbf50064c582b6f2b9b043c8e7e98ea8c0c6" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "0.11.0" + +[[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[Syslogs]] +deps = ["Printf", "Sockets"] +git-tree-sha1 = "46badfcc7c6e74535cc7d833a91f4ac4f805f86d" +uuid = "cea106d9-e007-5e6c-ad93-58fe2094e9c4" +version = "0.3.0" + +[[Test]] +deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[TimeZones]] +deps = ["Dates", "EzXML", "Mocking", "Printf", "Serialization", "Unicode"] +git-tree-sha1 = "859bfc1832ea52e413c96fa5c92130516db62bdb" +uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" +version = "0.9.1" + +[[URIParser]] +deps = ["Test", "Unicode"] +git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69" +uuid = "30578b45-9adc-5946-b283-645ec420af67" +version = "0.4.0" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..bb029e2 --- /dev/null +++ b/Project.toml @@ -0,0 +1,29 @@ +name = "GasPowerModels" +uuid = "1fcaf345-95e3-5b8b-91d6-2145eb844b9d" +authors = ["Russell Bent"] +repo = "https://github.com/lanl-ansi/GasPowerModels.jl" +version = "0.1.0" + +[deps] +GasModels = "5e113713-6c35-5477-b766-e1109486666f" +InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0" +JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +JuMP = "4076af6c-e467-56ae-b986-b466b2749572" +Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9" +PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655" + +[compat] +JSON = ">= 0.18" +GasModels = "~0.4" +InfrastructureModels = "~0.2" +PowerModels = "~0.11" +julia = "^1" + +[extras] +Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76" +Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" +Juniper = "2ddba703-00a4-53a7-87a5-e8b9971dde84" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Test", "Cbc", "Juniper", "Ipopt"] diff --git a/README.md b/README.md index cecb1c8..7c7e669 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# GasGridModels.jl +# GasPowerModels.jl Dev: -[![Build Status](https://travis-ci.org/lanl-ansi/GasGridModels.jl.svg?branch=master)](https://travis-ci.org/lanl-ansi/GasGridModels.jl) -[![codecov](https://codecov.io/gh/lanl-ansi/GasGridModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/lanl-ansi/GasGridModels.jl) -[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://lanl-ansi.github.io/GasGridModels.jl/latest) +[![Build Status](https://travis-ci.org/lanl-ansi/GasPowerModels.jl.svg?branch=master)](https://travis-ci.org/lanl-ansi/GasPowerModels.jl) +[![codecov](https://codecov.io/gh/lanl-ansi/GasPowerModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/lanl-ansi/GasPowerModels.jl) +[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://lanl-ansi.github.io/GasPowerModels.jl/latest) -GasGridModels.jl is a Julia/JuMP package for Simultaneous Steady-State Natural Gas and Electric Power Network Optimization. +GasPowerModels.jl is a Julia/JuMP package for Simultaneous Steady-State Natural Gas and Electric Power Network Optimization. It is designed to enable computational evaluation of emerging Gas-Grid network formulations and algorithms in a common platform. The code is engineered to decouple problem specifications (e.g. Flow, Expansion planning, ...) from the gas and power network formulations (e.g. MINLP, MISOCP, ...) defined in PowerModels.jl and GasModels.jl This enables the definition of a wide variety of formulations and their comparison on common problem specifications. @@ -20,9 +20,9 @@ This enables the definition of a wide variety of formulations and their comparis ## Installation -For the moment, GasGridModels.jl is not yet registered as a Julia package. Hence, "clone" should be used instead of "add" for package installation, +For the moment, GasPowerModels.jl is not yet registered as a Julia package. Hence, "clone" should be used instead of "add" for package installation, -`Pkg.clone("https://github.com/lanl-ansi/GasGridModels.jl.git")` +`Pkg.clone("https://github.com/lanl-ansi/GasPowerModels.jl.git")` At least one solver is required for running GasModels. Commercial or psuedo-commerical solvers seem to handle these problems much better than some of the open source alternatives. Gurobi and Cplex perform well on the MISOCP model, and SCIP handles the MINLP model reasonably well. @@ -30,9 +30,9 @@ some of the open source alternatives. Gurobi and Cplex perform well on the MISO ## Basic Usage -Once GasGridModels is installed, a solver is installed, and a network data file has been acquired, a Gas-Grid Flow can be executed with, +Once GasPowerModels is installed, a solver is installed, and a network data file has been acquired, a Gas-Grid Flow can be executed with, ``` -using GasGridModels +using GasPowerModels using run_gpf("foo_gasgrid.json", "foo_electricpower.json", "foo_gas.json", FooGasGridModel, FooPowerModel, FooGasModel, FooSolver()) diff --git a/REQUIRE b/REQUIRE deleted file mode 100644 index fedaaff..0000000 --- a/REQUIRE +++ /dev/null @@ -1,9 +0,0 @@ -julia 1 -JSON -JuMP - -PowerModels 0.11 0.12- -GasModels 0.4 0.5- -InfrastructureModels 0.2 0.3- - -Memento diff --git a/docs/README.md b/docs/README.md index 7c40310..e9de0b7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# Building the Documentation for GasGridModels.jl +# Building the Documentation for GasPowerModels.jl ## Installation We rely on [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl). To install it, run the following command in a julia session: diff --git a/docs/make.jl b/docs/make.jl index 9d27f7b..8776ce4 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,9 +1,9 @@ -using Documenter, GasGridModels +using Documenter, GasPowerModels makedocs( - modules = [GasGridModels], + modules = [GasPowerModels], format = :html, - sitename = "GasGridModels", + sitename = "GasPowerModels", authors = "Russell Bent and contributors.", analytics = "UA-367975-10", pages = [ @@ -33,6 +33,6 @@ deploydocs( deps = nothing, make = nothing, target = "build", - repo = "github.com/lanl-ansi/GasGridModels.jl.git", + repo = "github.com/lanl-ansi/GasPowerModels.jl.git", julia = "1.1" ) diff --git a/docs/src/constraints.md b/docs/src/constraints.md index a95b17d..3c649e4 100644 --- a/docs/src/constraints.md +++ b/docs/src/constraints.md @@ -1,7 +1,7 @@ # Constraints ```@autodocs -Modules = [GasGridModels] +Modules = [GasPowerModels] Pages = ["core/constraint_template.jl"] Order = [:type, :function] Private = true diff --git a/docs/src/index.md b/docs/src/index.md index 172019f..eb0db9a 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,27 +1,27 @@ -# GasGridModels.jl Documentation +# GasPowerModels.jl Documentation ```@meta -CurrentModule = GasGridModels +CurrentModule = GasPowerModels ``` ## Overview -GasGridModels.jl is a Julia/JuMP package for Steady-State Gas Network Optimization. It provides utilities for modeling problems that combine elements of natural gas and electric power systems. It is designed to enable computational evaluation of emerging gas and power network formulations and algorithms in a common platform. +GasPowerModels.jl is a Julia/JuMP package for Steady-State Gas Network Optimization. It provides utilities for modeling problems that combine elements of natural gas and electric power systems. It is designed to enable computational evaluation of emerging gas and power network formulations and algorithms in a common platform. The code is engineered to decouple [Problem Specifications](@ref) (e.g. Flow, Expansion Planning, ...) from [Network Formulations](@ref) (e.g. MINLP, MISOC-relaxation, ...). This enables the definition of a wide variety of coupled network formulations and their comparison on common problem specifications. ## Installation -The latest stable release of GasGridModels will be installed using the Julia package manager with +The latest stable release of GasPowerModels will be installed using the Julia package manager with ```julia -Pkg.add("GasGridModels") +Pkg.add("GasPowerModels") ``` For the current development version, "checkout" this package with ```julia -Pkg.checkout("GasGridModels") +Pkg.checkout("GasPowerModels") ``` At least one solver is required for running GasModels. The open-source solver Pavito is recommended and can be used to solve a wide variety of the problems and network formulations provided in GasModels. The Pavito solver can be installed via the package manager with @@ -33,5 +33,5 @@ Pkg.add("Pavito") Test that the package works by running ```julia -Pkg.test("GasGridModels") +Pkg.test("GasPowerModels") ``` diff --git a/docs/src/math-model.md b/docs/src/math-model.md index 53766b2..0f39245 100644 --- a/docs/src/math-model.md +++ b/docs/src/math-model.md @@ -1,11 +1,11 @@ -# The GasGridModels Mathematical Model +# The GasPowerModels Mathematical Model -As GasGridModels implements a variety of coupled gas grid network optimization problems, the implementation is the best reference for precise mathematical formulations. This section provides a mathematical specification for a prototypical coupled gas grid Flow problem, to provide an overview of the typical mathematical models in GasGridModels. +As GasPowerModels implements a variety of coupled gas grid network optimization problems, the implementation is the best reference for precise mathematical formulations. This section provides a mathematical specification for a prototypical coupled gas grid Flow problem, to provide an overview of the typical mathematical models in GasPowerModels. ## Coupled Gas Electric Power Flow -GasGridModels implements a steady-state model of gas flow and power flow based on the implementations of gas flows in GasModels.jl and power flows in PowerModels.jl. The key coupling constraint between +GasPowerModels implements a steady-state model of gas flow and power flow based on the implementations of gas flows in GasModels.jl and power flows in PowerModels.jl. The key coupling constraint between power and gas systems is through generators that consume gas to produce power. This is expressed in terms of a heat rate curve, i.e. ```math diff --git a/docs/src/network-data.md b/docs/src/network-data.md index a00730b..2e97e43 100644 --- a/docs/src/network-data.md +++ b/docs/src/network-data.md @@ -1,8 +1,8 @@ -# GasGridModels Network Data Format +# GasPowerModels Network Data Format ## The Network Data Dictionary -Internally GasGridModels utilizes a dictionary to store network data for power systems (see PowerModels) and gas models (see GasModels.jl). The dictionary uses strings as key values so it can be serialized to JSON for algorithmic data exchange. The I/O for GasGridModels utilizes the serializations available in PowerModels.jl and GasModels.jl to construct the two network models. All data is assumed to be in per_unit (non dimenisionalized) or SI units. +Internally GasPowerModels utilizes a dictionary to store network data for power systems (see PowerModels) and gas models (see GasModels.jl). The dictionary uses strings as key values so it can be serialized to JSON for algorithmic data exchange. The I/O for GasPowerModels utilizes the serializations available in PowerModels.jl and GasModels.jl to construct the two network models. All data is assumed to be in per_unit (non dimenisionalized) or SI units. Besides the standard network data supported by GasModels.jl and PowerModels.jl, there are a few extra fields that are required to couple the two systems together. These are discussed as follows: diff --git a/docs/src/objective.md b/docs/src/objective.md index be7f9c4..9c8af46 100644 --- a/docs/src/objective.md +++ b/docs/src/objective.md @@ -1,7 +1,7 @@ # Objective ```@autodocs -Modules = [GasGridModels] +Modules = [GasPowerModels] Pages = ["core/objective.jl"] Order = [:function] Private = true diff --git a/docs/src/quickguide.md b/docs/src/quickguide.md index 0ffcc90..788d7e2 100644 --- a/docs/src/quickguide.md +++ b/docs/src/quickguide.md @@ -3,7 +3,7 @@ Once GasGrid Models is installed, Pavito is installed, and network data files (e.g. `"test/data/belgion.json"`, `"test/data/case14.m"`) have been acquired, a Gas and Power Flow with SOC relaxations can be executed with, ```julia -using GasGridModels +using GasPowerModels using Pavito run_gpf("../test/data/case14.m", "../test/data/belgian.json", SOCWRPowerModel, MISOCPGasModel, PavitoSolver()) @@ -18,7 +18,7 @@ run_gpf("../test/data/case14.m", "../test/data/belgian.json", ACPowerModel, MINL ## Getting Results -The run commands in GasGridModels return detailed results data in the form of a dictionary. +The run commands in GasPowerModels return detailed results data in the form of a dictionary. This dictionary can be saved for further processing as follows, ```julia @@ -39,14 +39,14 @@ For example, the following dictionary comprehension can be used to inspect the j Dict(name => data["p"] for (name, data) in result["solution"]["junction"]) ``` -For more information about GasGridModels result data see the [GasGridModels Result Data Format](@ref) section. +For more information about GasPowerModels result data see the [GasPowerModels Result Data Format](@ref) section. ## Inspecting the Formulation -The following example demonstrates how to break a `run_gpf` call into separate model building and solving steps. This allows inspection of the JuMP model created by GasGridModels for the gas flow problem, +The following example demonstrates how to break a `run_gpf` call into separate model building and solving steps. This allows inspection of the JuMP model created by GasPowerModels for the gas flow problem, ```julia -pm, gm = build_generic_model("../test/data/case14.m", "../test/data/belgian.json", SOCWRPowerModel, MISOCPGasModel, GasGridModels.post_gpf) +pm, gm = build_generic_model("../test/data/case14.m", "../test/data/belgian.json", SOCWRPowerModel, MISOCPGasModel, GasPowerModels.post_gpf) print(gm.model) print(pm.model) diff --git a/docs/src/result-data.md b/docs/src/result-data.md index d4c4089..367d24c 100644 --- a/docs/src/result-data.md +++ b/docs/src/result-data.md @@ -1,8 +1,8 @@ -# GasGridModels Result Data Format +# GasPowerModels Result Data Format ## The Result Data Dictionary -GasGridModels utilizes a dictionary to organize the results of a run command. The dictionary uses strings as key values so it can be serialized to JSON for algorithmic data exchange. +GasPowerModels utilizes a dictionary to organize the results of a run command. The dictionary uses strings as key values so it can be serialized to JSON for algorithmic data exchange. The data dictionary organization is designed to be consistent with the GasModels [The Network Data Dictionary](@ref). At the top level the results data dictionary is structured as follows: diff --git a/docs/src/variables.md b/docs/src/variables.md index c468d6f..a04ae78 100644 --- a/docs/src/variables.md +++ b/docs/src/variables.md @@ -3,7 +3,7 @@ We provide the following methods to provide a compositional approach for defining common variables used in coupled gas grid flow models. These methods should always be defined over "GenericGasModels" and/or "GenericPowerModels". ```@autodocs -Modules = [GasGridModels] +Modules = [GasPowerModels] Pages = ["core/variable.jl"] Order = [:type, :function] Private = true diff --git a/src/GasGridModels.jl b/src/GasPowerModels.jl similarity index 98% rename from src/GasGridModels.jl rename to src/GasPowerModels.jl index 18fa5a9..89bfa2c 100644 --- a/src/GasGridModels.jl +++ b/src/GasPowerModels.jl @@ -1,4 +1,4 @@ -module GasGridModels +module GasPowerModels using JSON using JuMP diff --git a/test/REQUIRE b/test/REQUIRE deleted file mode 100644 index e068e47..0000000 --- a/test/REQUIRE +++ /dev/null @@ -1,5 +0,0 @@ -julia 1 - -Ipopt -Cbc -Juniper diff --git a/test/ne.jl b/test/ne.jl index bdc3ffb..e60ea84 100644 --- a/test/ne.jl +++ b/test/ne.jl @@ -19,7 +19,7 @@ end gas_ne_weight = 1.0 power_ne_weight = 1.0 - result = GasGridModels.run_ne("../test/data/case14-ne.m", "../test/data/belgian-ne.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; gas_ne_weight=gas_ne_weight, power_ne_weight=power_ne_weight, obj_normalization=normalization) + result = GasPowerModels.run_ne("../test/data/case14-ne.m", "../test/data/belgian-ne.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; gas_ne_weight=gas_ne_weight, power_ne_weight=power_ne_weight, obj_normalization=normalization) @test result["status"] == :LocalOptimal || result["status"] == :Optimal # @test isapprox(result["objective"], 4.2769964867495346e9 * normalization; atol = 1.0) diff --git a/test/neopf.jl b/test/neopf.jl index 99b7183..bea577b 100644 --- a/test/neopf.jl +++ b/test/neopf.jl @@ -4,7 +4,7 @@ @testset "test neopf" begin @testset "Pressure Penalty" begin - result = GasGridModels.run_ne_opf("../test/data/no_cost.m", "../test/data/no_demand_cost.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=1.0, gas_price_weight=1.0) + result = GasPowerModels.run_ne_opf("../test/data/no_cost.m", "../test/data/no_demand_cost.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=1.0, gas_price_weight=1.0) @test result["status"] == :LocalOptimal || result["status"] == :Optimal println(result["objective"]) # Tested with Gurobi 8.1 @@ -12,7 +12,7 @@ end @testset "Demand Penalty" begin - result = GasGridModels.run_ne_opf("../test/data/no_cost.m", "../test/data/no_pressure_cost.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=1.0, gas_price_weight=1.0) + result = GasPowerModels.run_ne_opf("../test/data/no_cost.m", "../test/data/no_pressure_cost.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=1.0, gas_price_weight=1.0) @test result["status"] == :LocalOptimal || result["status"] == :Optimal println(result["objective"]) # Tested with Gurobi 8.1 diff --git a/test/neopf_long.jl b/test/neopf_long.jl index 2d781fe..0e9081f 100644 --- a/test/neopf_long.jl +++ b/test/neopf_long.jl @@ -5,14 +5,14 @@ @testset "36 Bus Ilic 1.1 Northeast 1.0" begin data = GasModels.parse_file("../data/TC_PennToNortheast_wValves_expansion_1.0.json") - result = GasGridModels.run_ne_opf("../data/36bus_ilic_expansion_1.1.m", "../data/TC_PennToNortheast_wValves_expansion_1.0.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) + result = GasPowerModels.run_ne_opf("../data/36bus_ilic_expansion_1.1.m", "../data/TC_PennToNortheast_wValves_expansion_1.0.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) @test result["status"] == :LocalOptimal || result["status"] == :Optimal @test isapprox(result["objective"], 4.926397139595786e9; atol = 1e6) end @testset "36 Bus Ilic 1.1 Northeast 2.25" begin data = GasModels.parse_file("../data/TC_PennToNortheast_wValves_expansion_2.25.json") - result = GasGridModels.run_ne_opf("../data/36bus_ilic_expansion_1.1.m", "../data/TC_PennToNortheast_wValves_expansion_2.25.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) + result = GasPowerModels.run_ne_opf("../data/36bus_ilic_expansion_1.1.m", "../data/TC_PennToNortheast_wValves_expansion_2.25.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) @test result["status"] == :LocalOptimal || result["status"] == :Optimal @test isapprox(result["objective"], 5.127290418071447e9; atol = 1e6) @@ -20,7 +20,7 @@ @testset "36 Bus Ilic 1.0 Northeast 1.0" begin data = GasModels.parse_file("../data/TC_PennToNortheast_wValves_expansion_1.0.json") - result = GasGridModels.run_ne_opf("../data/36bus_ilic_expansion_1.0.m", "../data/TC_PennToNortheast_wValves_expansion_1.0.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) + result = GasPowerModels.run_ne_opf("../data/36bus_ilic_expansion_1.0.m", "../data/TC_PennToNortheast_wValves_expansion_1.0.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) @test result["status"] == :LocalOptimal || result["status"] == :Optimal @test isapprox(result["objective"], 4.0269404390948544e9; atol = 1e6) @@ -28,7 +28,7 @@ @testset "36 Bus Ilic 1.0 Northeast 2.25" begin data = GasModels.parse_file("../data/TC_PennToNortheast_wValves_expansion_2.25.json") - result = GasGridModels.run_ne_opf("../data/36bus_ilic_expansion_1.0.m", "../data/TC_PennToNortheast_wValves_expansion_2.25.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) + result = GasPowerModels.run_ne_opf("../data/36bus_ilic_expansion_1.0.m", "../data/TC_PennToNortheast_wValves_expansion_2.25.json", SOCWRPowerModel, MISOCPGasModel, misocp_solver; power_opf_weight=365, gas_price_weight=365) @test result["status"] == :LocalOptimal || result["status"] == :Optimal @test isapprox(result["objective"], 4.1859768708376384e9; atol = 1e6) diff --git a/test/runtests.jl b/test/runtests.jl index 1ea61b1..125648f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,13 @@ using InfrastructureModels using PowerModels using GasModels -using GasGridModels +using GasPowerModels using Memento # Suppress warnings during testing. setlevel!(getlogger(GasModels), "error") -GasGridModels.silence() +GasPowerModels.silence() #bonmin_solver = AmplNLSolver("bonmin") diff --git a/test/runtests_long.jl b/test/runtests_long.jl index 0cf4a3c..8bfa0b5 100644 --- a/test/runtests_long.jl +++ b/test/runtests_long.jl @@ -1,6 +1,6 @@ using PowerModels using GasModels -using GasGridModels +using GasPowerModels using InfrastructureModels using Ipopt