Skip to content

Commit

Permalink
Prep for release 0.7.1 (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
frapac authored and michel2323 committed May 10, 2022
1 parent 12daa4c commit 4c6777e
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 45 deletions.
15 changes: 14 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
ExaPF release notes
==================

Version 0.7.0 (TBD)
Version 0.7.1 (TDB)
-------------------------------

- New features
* Add `BlockNetworkStack` structure for batch evaluation (#241)
* Add `ArrowheadJacobian` and `ArrowheadHessian` for stochastic OPF (#241)
* define loads as parameters inside `NetworkStack` (#238)
- Bug fixes & improvements
* Migrate to KernelAbstractions 0.8 (#236)
* Drop support for Julia 1.6
* Migrate to Krylov.jl 0.8 (#239)
* Update CI

Version 0.7.0 (March 1st, 2022)
-------------------

- API changes
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ExaPF"
uuid = "0cf0e50c-a82e-488f-ac7e-41ffdff1b8aa"
authors = ["Adrian Maldonado <[email protected]>", "Michel Schanen <[email protected]>", "François Pacaud <[email protected]>"]
version = "0.7.0"
version = "0.7.1"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand All @@ -26,7 +26,7 @@ Krylov = "0.8"
LightGraphs = "1.3"
Metis = "1"
SparseDiffTools = "1"
julia = "1.6"
julia = "1.7"

This comment has been minimized.

Copy link
@frapac

frapac May 10, 2022

Author Member

[extras]
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# ExaPF

| **Documentation** | **Release** | **Dev** |
|:-:|:-:|:-:|
| [![][docs-stable-img]][docs-stable-url] | [![][build-stable-img]][build-url] | [![][build-latest-img]][build-url] |
| | [![][codecov-stable-img]][codecov-stable-url] | [![][codecov-latest-img]][codecov-latest-url] |
[![][docs-stable-img]][docs-stable-url] [![][build-latest-img]][build-url] [![][codecov-latest-img]][codecov-latest-url] [![][doi-img]][doi-url]

ExaPF is a HPC package implementing a vectorized modeler
for power systems. It targets primarily GPU architectures, and provides a portable abstraction to model power systems on upcoming HPC architectures.
Expand Down Expand Up @@ -78,16 +75,14 @@ This research was supported by the Exascale Computing Project (17-SC-20-SC), a j


[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://exanauts.github.io/ExaPF.jl/
[docs-stable-url]: https://exanauts.github.io/ExaPF.jl/stable

[codecov-stable-img]: https://codecov.io/gh/exanauts/ExaPF.jl/branch/master/graphs/badge.svg?branch=master
[codecov-stable-url]: https://codecov.io/github/exanauts/ExaPF.jl?branch=master

[codecov-latest-img]: https://codecov.io/gh/exanauts/ExaPF.jl/branch/develop/graphs/badge.svg?branch=develop
[codecov-latest-url]: https://codecov.io/github/exanauts/ExaPF.jl?branch=develop
[codecov-latest-img]: https://codecov.io/gh/exanauts/ExaPF.jl/branch/master/graphs/badge.svg?branch=master
[codecov-latest-url]: https://codecov.io/github/exanauts/ExaPF.jl?branch=master

[build-url]: https://github.com/exanauts/ExaPF.jl/actions?query=workflow
[build-latest-img]: https://github.com/exanauts/ExaPF.jl/workflows/Run%20tests/badge.svg?branch=master

[build-stable-img]: https://github.com/exanauts/ExaPF.jl/workflows/Run%20tests/badge.svg?branch=master
[build-latest-img]: https://github.com/exanauts/ExaPF.jl/workflows/Run%20tests/badge.svg?branch=develop
[doi-img]: https://zenodo.org/badge/DOI/10.5281/zenodo.5705457.svg
[doi-url]: https://doi.org/10.5281/zenodo.5705457

2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ makedocs(
deploydocs(
repo = "github.com/exanauts/ExaPF.jl.git",
target = "build",
devbranch = "develop",
devbranch = "master",
devurl = "dev",
push_preview = true,
)
1 change: 1 addition & 0 deletions docs/src/lib/formulations.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Control
```@docs
PolarForm
NetworkStack
BlockNetworkStack
init!
```
Expand Down
77 changes: 48 additions & 29 deletions src/Polar/stacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function Base.copyto!(dest::AbstractVector, stack::AutoDiff.AbstractStack{VT}, m
end

"""
NetworkStack <: AbstractStack
NetworkStack{VT,VD,MT} <: AbstractNetworkStack{VT}
NetworkStack(polar::PolarForm)
NetworkStack(nbus::Int, ngen::Int, nlines::Int, VT::Type)
Expand Down Expand Up @@ -141,12 +141,32 @@ voltage(buf::NetworkStack) = buf.vmag .* exp.(im .* buf.vang)
voltage_host(buf::NetworkStack) = voltage(buf) |> Array


#=
BlockNetworkStack
"""
BlockNetworkStack{MT,MD,MI} <: AbstractStack{MT}
Store the variables of the `N` different scenarios
associated to the polar formulation. Extend [`NetworkStack`](@ref).
The variables are stored in the field `input`, and
are ordered as follows
```
input = [ vmag^1, ..., vmag^N, vang^1, ..., vang^N, pgen^1, ..., pgen^N]
```
---
BlockNetworkStack(polar::PolarForm, k::Int)
Create a `BlockNetworkStack` with `k` different scenarios using the data stored inside `polar`.
---
BlockNetworkStack(polar::PolarForm, pload::Array, qload::Array)
Create a `BlockNetworkStack` using the load scenarios stored
inside the 2-dimensional arrays `pload` and `qload`.
Ordering of input:
[ vmag^1, ..., vmag^N, vang^1, ..., vang^N, pgen^1, ..., pgen^N]
=#
---
BlockNetworkStack(k::Int, nbus::Int, ngen::Int, nlines::Int, VT::Type)
Create an empty `BlockNetworkStack` with the size needed to stored `k` different scenarios.
"""
struct BlockNetworkStack{MT,MD,NT} <: AbstractNetworkStack{MT}
k::Int
# INPUT
Expand Down Expand Up @@ -198,6 +218,28 @@ function BlockNetworkStack(k, nbus, ngen, nlines, VT, VD)

return BlockNetworkStack(k, input, vmag, vang, pgen, ψ, intermediate, params, pload, qload)
end
function BlockNetworkStack(polar::PolarForm{T,VI,VT,MT}, k::Int) where {T,VI,VT,MT}
nbus = get(polar, PS.NumberOfBuses())
ngen = get(polar, PS.NumberOfGenerators())
nlines = get(polar, PS.NumberOfLines())
stack = BlockNetworkStack(k, nbus, ngen, nlines, VT, VT)
init!(polar, stack)
return stack
end
function BlockNetworkStack(
polar::PolarForm,
ploads::Array{Float64, 2},
qloads::Array{Float64, 2},
)
@assert size(ploads) == size(qloads)
k = size(ploads, 2)
blk_stack = BlockNetworkStack(polar, k)

copyto!(blk_stack.pload, ploads)
copyto!(blk_stack.qload, qloads)
return blk_stack
end


function Base.show(io::IO, stack::BlockNetworkStack)
print(io, "$(length(stack.input))-elements BlockNetworkStack{$(typeof(stack.input))}")
Expand Down Expand Up @@ -232,29 +274,6 @@ function init!(polar::PolarForm, stack::BlockNetworkStack; loads=true)
end
end

function BlockNetworkStack(polar::PolarForm{T,VI,VT,MT}, k::Int) where {T,VI,VT,MT}
nbus = get(polar, PS.NumberOfBuses())
ngen = get(polar, PS.NumberOfGenerators())
nlines = get(polar, PS.NumberOfLines())
stack = BlockNetworkStack(k, nbus, ngen, nlines, VT, VT)
init!(polar, stack)
return stack
end

function BlockNetworkStack(
polar::PolarForm,
ploads::Array{Float64, 2},
qloads::Array{Float64, 2},
)
@assert size(ploads) == size(qloads)
k = size(ploads, 2)
blk_stack = BlockNetworkStack(polar, k)

copyto!(blk_stack.pload, ploads)
copyto!(blk_stack.qload, qloads)
return blk_stack
end

function Base.empty!(stack::BlockNetworkStack)
fill!(stack.vmag, 0.0)
fill!(stack.vang, 0.0)
Expand Down

1 comment on commit 4c6777e

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/60009

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.1 -m "<description of version>" 4c6777ebe652c242b5a4fe016421bb2fec6d688e
git push origin v0.7.1

Please sign in to comment.