Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanergun authored Apr 14, 2020
2 parents 2ef1642 + e227aa5 commit 78cae99
Show file tree
Hide file tree
Showing 62 changed files with 6,097 additions and 1,531 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
jobs:
TagBot:
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ addons:

before_install:
# don't keep an old version of the code in the cache
# - julia -e 'using Pkg; if "PowerModels" in keys(Pkg.installed()) Pkg.rm("PowerModels"); Pkg.rm("PowerModels"); Pkg.add("https://github.com/lanl-ansi/PowerModels.jl.git") end'
# - julia -e 'using Pkg; if "PowerModels" in keys(Pkg.installed()) Pkg.rm("PowerModels"); Pkg.rm("PowerModels"); Pkg.add("https://github.com/lanl-ansi/_PM.jl.git") end'
# - julia -e 'using Pkg; if "PowerModelsACDC" in keys(Pkg.installed()) Pkg.rm("PowerModelsACDC"); Pkg.rm("PowerModelsACDC") end'
# - julia -e 'using Pkg; Pkg.update()' #make sure we get the latest version of METADATA
- julia -e 'using Pkg; Pkg.add("Ipopt")'
- julia -e 'using Pkg; Pkg.add("SCS")'
- julia -e 'using Pkg; Pkg.add("Documenter")'
- julia -e 'using Pkg; Pkg.add("Juniper")'
- julia -e 'using Pkg; Pkg.add("Cbc")'

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
Expand Down
8 changes: 3 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "PowerModelsACDC"
uuid = "ff45984e-d068-5f4c-9e32-c4133509d236"
autors = ["Hakan Ergun", "Frederik Geth"]
repo = "https://github.com/hakanergun/PowerModelsACDC.jl"
version = "0.2.0"
version = "0.3.0"

[deps]
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
Expand All @@ -21,10 +21,8 @@ InfrastructureModels = "~0.3.2"
JuMP = "0.20.1"

[extras]
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"
PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["SCS", "Test", "Cbc", "Ipopt"]
test = ["Test", "PowerModels"]
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AC/DC converter stations, connecting ac nodes and dc nodes, are composed of a tr

Note that the matpower-style `dcline` is transformed internally to two converters + a dcline connecting them. Such a transformation is exact for the 'dc'-style linearized models, but not for the AC models.

For further information, consult the PowerModels [documentation](https://lanl-ansi.github.io/PowerModels.jl/stable/).
For further information, consult the PowerModels [documentation](https://lanl-ansi.github.io/_PM.jl/stable/).


## Acknowledgments
Expand All @@ -43,8 +43,8 @@ The developers thank Carleton Coffrin (LANL) for his support.

## Citing PowerModelsACDC

If you find PowerModelsACDC useful in your work, we kindly request that you cite the following [publication](https://ieeexplore.ieee.org/document/8636236):

If you find PowerModelsACDC useful in your work, we kindly request that you cite the following publications:
[AC/DC OPF Core](https://ieeexplore.ieee.org/document/8636236):
```
@ARTICLE{8636236,
author={H. {Ergun} and J. {Dave} and D. {Van Hertem} and F. {Geth}},
Expand All @@ -59,7 +59,29 @@ doi={10.1109/TPWRS.2019.2897835},
ISSN={0885-8950},
month={July},}
```

[TNEP Extension 1](https://digital-library.theiet.org/content/journals/10.1049/iet-gtd.2019.0383):
```
@ARTICLE{
iet:/content/journals/10.1049/iet-gtd.2019.0383,
author = {Jay Dave},
author = {Hakan Ergun},
author = {Ting An},
author = {Jingjing Lu},
author = {Dirk Van Hertem},
keywords = {power systems;meshed HVDC grids;increased utilisation;presented formulations;convex formulations;second-order cone convex relaxation;multiple HVDC links;linear approximation;dc grids;transmission network expansion planning problem;high-voltage direct current;traditional ac grid;TNEP problem;nonlinear formulation;},
ISSN = {1751-8687},
title = {TNEP of meshed HVDC grids: ‘AC’, ‘DC’ and convex formulations},
journal = {IET Generation, Transmission & Distribution},
issue = {24},
volume = {13},
year = {2019},
month = {December},
pages = {5523-5532(9)},
publisher ={Institution of Engineering and Technology},
copyright = {© The Institution of Engineering and Technology},
url = {https://digital-library.theiet.org/content/journals/10.1049/iet-gtd.2019.0383}
}
```
## License

This code is provided under a BSD license.
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
julia 1.1

JuMP
PowerModels 0.13.0
InfrastructureModels
PowerModels 0.15.3
InfrastructureModels 0.4.2
Memento
8 changes: 8 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
v0.3.0 Release Notes

- Added TNEP problems in single and multiperiod
- TNEP formulated in DCP, LPAC, SOCBFM, SOCBIM, SDP, QC and ACP
- TNEP test cases and unit tests integrated
- Update code base for compliance with PowerModels v0.15.3
-- Variable definitions & reporting
-- Conductors removed
2 changes: 1 addition & 1 deletion docs/src/constraints.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Constraints
All the OPF constraints for the AC grids have been re-used from PowerModels.jl, and are therefore not repeated here.
All the OPF constraints for the AC grids have been re-used from _PM.jl, and are therefore not repeated here.

```@meta
CurrentModule = PowerModelsACDC
Expand Down
2 changes: 1 addition & 1 deletion docs/src/formulations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Type Hierarchy
The original type hierarchy of PowerModels is used.

For details on `GenericPowerModel`, see PowerModels.jl [documentation](https://lanl-ansi.github.io/PowerModels.jl/stable/).
For details on `GenericPowerModel`, see _PM.jl [documentation](https://lanl-ansi.github.io/_PM.jl/stable/).

# Formulations overview

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CurrentModule = PowerModelsACDC

## Overview

PowerModelsACDC.jl is a Julia/JuMP package extending PowerModels.jl, which focuses on Steady-State Power Network Optimization. PowerModels.jl provides utilities for parsing and modifying network data and is designed to enable computational evaluation of emerging power network formulations and algorithms in a common platform.
PowerModelsACDC.jl is a Julia/JuMP package extending _PM.jl, which focuses on Steady-State Power Network Optimization. _PM.jl provides utilities for parsing and modifying network data and is designed to enable computational evaluation of emerging power network formulations and algorithms in a common platform.

PowerModelsACDC.jl adds new problem types:
- Power flow with both ac and dc lines, from point-to-point connections to meshed grids, with converters connecting ac and dc grid lines
Expand Down
2 changes: 1 addition & 1 deletion docs/src/objective.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ CurrentModule = PowerModelsACDC


```@docs
PowerModels.objective_min_fuel_cost
_PM.objective_min_fuel_cost
```
2 changes: 1 addition & 1 deletion docs/src/result-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
## The Result Data Dictionary

PowerModels 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 consistent with PowerModels.
The data dictionary organization is consistent with _PM.
14 changes: 7 additions & 7 deletions docs/src/specifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ variable_dcgrid_voltage_magnitude(pm)
constraint_voltage(pm)
constraint_voltage_dc(pm)

for i in ids(pm, :ref_buses)
for i in _PM.ids(pm, :ref_buses)
constraint_theta_ref(pm, i)
end

for i in ids(pm, :bus)
for i in _PM.ids(pm, :bus)
constraint_kcl_shunt(pm, i)
end

for i in ids(pm, :branch)
for i in _PM.ids(pm, :branch)
# dirty, should be improved in the future TODO
if typeof(pm) <: PowerModels.SOCDFPowerModel
if typeof(pm) <: _PM.SOCDFPowerModel
constraint_flow_losses(pm, i)
constraint_voltage_magnitude_difference(pm, i)
constraint_branch_current(pm, i)
Expand All @@ -55,13 +55,13 @@ for i in ids(pm, :branch)
constraint_thermal_limit_from(pm, i)
constraint_thermal_limit_to(pm, i)
end
for i in ids(pm, :busdc)
for i in _PM.ids(pm, :busdc)
constraint_kcl_shunt_dcgrid(pm, i)
end
for i in ids(pm, :branchdc)
for i in _PM.ids(pm, :branchdc)
constraint_ohms_dc_branch(pm, i)
end
for i in ids(pm, :convdc)
for i in _PM.ids(pm, :convdc)
constraint_converter_losses(pm, i)
constraint_converter_current(pm, i)
constraint_conv_transformer(pm, i)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


## Functions
We provide the following methods to provide a compositional approach for defining common variables used in power flow models. These methods should always be defined over "GenericPowerModel", from the base PowerModels.jl.
We provide the following methods to provide a compositional approach for defining common variables used in power flow models. These methods should always be defined over "GenericPowerModel", from the base _PM.jl.

```@autodocs
Modules = [PowerModelsACDC]
Expand Down
2 changes: 1 addition & 1 deletion gen_pr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ for arg in ARGS
"uuid" => uuid(name),
"autors" => ["Hakan Ergun", "Frederik Geth"],
"repo" => "https://github.com/hakanergun/PowerModelsACDC.jl",
"version" => "0.2.0",
"version" => "0.3.0",
"deps" => Dict{String,String}(),
"compat" => Dict{String,String}(),
"extras" => Dict{String,String}(),
Expand Down
36 changes: 24 additions & 12 deletions src/PowerModelsACDC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,36 @@ isdefined(Base, :__precompile__) && __precompile__()

module PowerModelsACDC

# using Compat
using JuMP
using PowerModels
using InfrastructureModels
using Memento

# import Compat: @__MODULE__

# using Compat.LinearAlgebra
# using Compat.SparseArrays
#
# PMs = PowerModels
# import Compat
import JuMP
import Memento
import PowerModels
const _PM = PowerModels
import InfrastructureModels
# import InfrastructureModels: ids, ref, var, con, sol, nw_ids, nws, optimize_model!, @im_fields
const _IM = InfrastructureModels

import JuMP: with_optimizer
export with_optimizer

# Create our module level logger (this will get precompiled)
const _LOGGER = Memento.getlogger(@__MODULE__)

# Register the module level logger at runtime so that folks can access the logger via `getlogger(PowerModels)`
# NOTE: If this line is not included then the precompiled `_PM._LOGGER` won't be registered at runtime.
__init__() = Memento.register(_LOGGER)


include("prob/acdcopf.jl")
include("prob/acdcpf.jl")
include("prob/acdcopf_bf.jl")
include("prob/tnepopf.jl")
include("prob/tnepopf_bf.jl")
include("prob/mp_tnepopf.jl")
include("prob/mp_tnepopf_bf.jl")



include("core/solution.jl")
include("core/data.jl")
include("core/variabledcgrid.jl")
Expand All @@ -48,4 +58,6 @@ include("formconv/lpac.jl")
include("formconv/shared.jl")

include("core/constraint_template.jl")
include("io/multinetwork.jl")
include("io/results.jl")
end
Loading

0 comments on commit 78cae99

Please sign in to comment.