Skip to content

Commit

Permalink
Feature: Support for PowerModelsDistribution ENGINEERING data models …
Browse files Browse the repository at this point in the history
…(breaking) (#13)

* WIP: Add initial support for PMD engineering data model

* ADD: sizes for generators, energized vs not, etc

* WIP: rewrite for math/eng models

* WIP: docs and infrastructuregraph (generic)

* FIX: summary plotting

* UPD: Version bump and remove PowerModels/PMD from deps

* ADD: LinearAlgrebra

* FIX: mixed enum and float for status

* UPD: defaults

* ADD: aggregate extra nodes support

* FIX: mismatched kwarg names

* FIX: Unit tests

* UPD: changelog, julia version in travis

* REM: Windows build

See JuliaIO/FFMPEG.jl#14

Some packages seem to be moving back to AppVeyor to test
Windows because of this issue.

* FIX: aggregate_extra_nodes bugs

* FIX: demand in mathematical cases

* FIX: fixed vs free edges

* UPD: Examples, code indentation

* UPD: documentation

* UPD: Changelog
  • Loading branch information
pseudocubic authored Jun 30, 2020
1 parent b0bc719 commit f8c91cf
Show file tree
Hide file tree
Showing 23 changed files with 2,346 additions and 1,935 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ env:
os:
- linux
- osx
- windows
julia:
- 1.0
- 1.3
- 1.4
- nightly
codecov: true
jobs:
allow_failures:
- julia: nightly
include:
- stage: "Documentation"
julia: 1.3
julia: 1.4
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))'
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# PowerModelsAnalytics.jl Change Log

## staged

- none

## v0.3.0

- Makes `build_network_graph` more agnostic to type of Infrastructure network being graphed
- Rename `build_graph_network` to `build_network_graph`
- Changes kwargs in functions
- Moves kwarg defaults to `src/core/options.jl`, and changes color defaults
- Changes type from `PowerModelsGraph` to `InfrastructureGraph`
- Removes `plot_load_blocks` and `build_graph_load_blocks` in favor of using kwarg `block_graph=true`

## v0.2.2

- Add additional compatible versions to dependencies
Expand Down
9 changes: 5 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name = "PowerModelsAnalytics"
uuid = "7425d11c-6b70-11e9-2bc6-9bcd3191d4b9"
authors = ["David M Fobes <dfobes@lanl.gov>", "Carleton Coffrin"]
version = "0.2.2"
version = "0.3.0"

[deps]
ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655"
PowerModelsDistribution = "d7431456-977f-11e9-2de3-97ff7677985e"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -29,7 +28,9 @@ PyCall = "~1.91"
julia = "^1"

[extras]
PowerModels = "c36e90e8-916a-50a6-bd94-075b64ef4655"
PowerModelsDistribution = "d7431456-977f-11e9-2de3-97ff7677985e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "PowerModels", "PowerModelsDistribution"]
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@

Tools for the analysis and visualization of PowerModels data and results.

**BETA / IN ACTIVE DEVELOPMENT: Features will change quickly and without warning**
**BETA / IN ACTIVE DEVELOPMENT**: Features will change quickly and without warning

## Backends for Plotting
## Using PowerModelsAnalytics

This package relies on Plots.jl for plotting, so you must choose an appropriate backend for the style of plot you desire. See the Plots.jl [Documentation](http://docs.juliaplots.org/latest/install/) for additional information.
To use the `plot_network` function for example, one must load a network case, e.g. using `parse_file` in PowerModels or PowerModelsDistribution, and then

### Creating a PDF backend for `plot_network`
```julia
using PowerModelsAnalytics

plot_network(network_case)
```

The `plot_network` function currently operates slightly different than other functions, because it currently relies on GraphPlot.jl. In order to plot with this function, a backend must be created separately and passed as an argument to the function:
should plot the network using the currently enabled backend, or e.g.

```julia
import Cairo, Fontconfig
using Compose
plot_network(network_case; filename="network.pdf")
```

backend = Compose.PDF("test.pdf", 10cm, 10cm)
will save a network plot to a file using the current backend enabled for Plots.jl, as noted in the following section.

plot_network(network_case, backend)
```
## Backends for Plotting

This package relies on Plots.jl for plotting, so you must choose an appropriate backend for the style of plot you desire. See the Plots.jl [Documentation](http://docs.juliaplots.org/latest/install/) for additional information.

## License

Expand Down
97 changes: 97 additions & 0 deletions docs/src/output_3_0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

2 comments on commit f8c91cf

@pseudocubic
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/17219

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.3.0 -m "<description of version>" f8c91cf2a1c6e9b4e3adc366aa58b8ce9dbd45f8
git push origin v0.3.0

Please sign in to comment.