Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs tom file #52

Merged
merged 4 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![PowerNetworkMatrices.jl Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/PowerNetworkMatrices)](https://pkgs.genieframework.com?packages=PowerNetworkMatrices)

`PowerNetworkMatrices.jl` is able to build classic power systems modeling network matrices such as
[Ybus](https://en.wikipedia.org/wiki/Nodal_admittance_matrix), [PTDF](https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Power_Transfer_Distribution_Factors.htm) and LODF.
[Ybus](https://en.wikipedia.org/wiki/Nodal_admittance_matrix), [PTDF](https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Power_Transfer_Distribution_Factors.htm) and [LODF](https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Line_Outage_Distribution_Factors_LODFs.htm#:~:text=Line%20Outage%20Distribution%20Factors%20(LODFs)%20are%20a%20sensitivity%20measure%20of,other%20lines%20in%20the%20system.).

## Version Advisory

Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
PowerNetworkMatrices = "bed98974-b02a-5e2f-9fe0-a103f5c450dd"
PowerSystemCaseBuilder = "f00506e0-b84f-492a-93c2-c0a9afc4364e"
PowerSystems = "bcd98974-b02a-5e2f-9ee0-a103f5c450dd"

[compat]
Documenter = "^0.27"
Expand Down
6 changes: 2 additions & 4 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CurrentModule = PowerNetworkMatrices
## Overview

`PowerNetworkMatrices.jl` is a [`Julia`](http://www.julialang.org) package for
the evaluation of network matrices given the system's data. The package allows to compute
the evaluation of network matrices given the system's data. The package allows to compute
the matrices according to different methods, providing a flexibe and powerful tool.
jd-lara marked this conversation as resolved.
Show resolved Hide resolved

The documentation and code are organized according to the needs of different
Expand Down Expand Up @@ -37,6 +37,4 @@ For the current development version, "checkout" this package with
```

------------
PowerNetworkMatrices has been developed as part of the Scalable Integrated Infrastructure Planning
(SIIP) initiative at the U.S. Department of Energy's National Renewable Energy
Laboratory ([NREL](https://www.nrel.gov/)).
PowerNetworkMatrices has been developed as part of the Scalable Integrated Infrastructure Planning (SIIP) initiative at the U.S. Department of Energy's National Renewable Energy Laboratory ([NREL](https://www.nrel.gov/)).
34 changes: 17 additions & 17 deletions docs/src/tutorials/tutorial_Incidence_BA_ABA_matrices.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Incidence, BA and ABA matrices

In this tutorial the `IncidenceMatrix`, `BA_matrix` and `ABA_matrix` are presented.
The methods used for their evaluation, as well as how data is stored is shown in
In this tutorial the `IncidenceMatrix`, `BA_matrix` and `ABA_matrix` are presented.
The methods used for their evaluation, as well as how data is stored is shown in
the following subsections.

The matrices here presented are the building blocks for the compuation of the PTDF and LODF matrices.

## IncidenceMatrix

The `PowerNetworkMatrices` package defines the structure `IncidenceMatrix`, which
The `PowerNetworkMatrices` package defines the structure `IncidenceMatrix`, which
store the Incidence Matrix of the considered system as well as the most relevant network data.

At first, the `System` data is loaded.
Expand All @@ -29,7 +29,7 @@ Then the Incidence Matrix is computed as follows:
incidence_matrix = PNM.IncidenceMatrix(sys);
```

The `incidence_matrix` variable is a structure of type `IncidenceMatrix`
The `incidence_matrix` variable is a structure of type `IncidenceMatrix`
featuring the following fields:

``` @repl tutorial_Incidence_BA_ABA_matrices
Expand All @@ -41,12 +41,12 @@ incidence_matrix.axes
# data: Incidence Matrix
incidence_matrix.data
# lookup: dictionary linking the branche names and bus numbers with the row
# lookup: dictionary linking the branche names and bus numbers with the row
jd-lara marked this conversation as resolved.
Show resolved Hide resolved
# and column numbers, respectively.
incidence_matrix.axes
# ref_bus_positions: set containing the positions of the reference buses.
# this represents the positions where to add the column of zeros. Please refer to the
# this represents the positions where to add the column of zeros. Please refer to the
# exaple in the BA matrix for more details.
jd-lara marked this conversation as resolved.
Show resolved Hide resolved
incidence_matrix.ref_bus_positions
```
Expand All @@ -57,7 +57,7 @@ Please note that the matrix data can be easily access by using the following fun
PNM.get_data(incidence_matrix)
```

Note that the number of columns is lower than the actual number of system buses since
Note that the number of columns is lower than the actual number of system buses since
the column related to the reference bus is discarded.

## BA_Matrix
Expand All @@ -81,27 +81,27 @@ ba_matrix.data
# or by using the "get_data" function
PNM.get_data(ba_matrix)
```
Note that the number of columns is lower than the actual number of system buses since
Note that the number of columns is lower than the actual number of system buses since
the column related to the reference bus is discarded.

To add the column of zeros related to the reference bus, it is necessary to use the
To add the column of zeros related to the reference bus, it is necessary to use the
information contained in the `ref_bus_positions` field.

``` @repl tutorial_Incidence_BA_ABA_matrices
new_ba_matrix = hcat(
ba_matrix.data[:,1:collect(ba_matrix.ref_bus_positions)[1]-1],
zeros(size(ba_matrix, 1), 1),
ba_matrix.data[:,1:collect(ba_matrix.ref_bus_positions)[1]-1],
zeros(size(ba_matrix, 1), 1),
ba_matrix.data[:, collect(ba_matrix.ref_bus_positions)[1]:end]
)
```

However, trying to change the data field with a matrix of different dimension
However, trying to change the data field with a matrix of different dimension
will result in an error.

``` @repl tutorial_Incidence_BA_ABA_matrices
ba_matrix.data = hcat(
ba_matrix.data[:,1:collect(ba_matrix.ref_bus_positions)[1]-1],
zeros(size(ba_matrix, 1), 1),
ba_matrix.data[:,1:collect(ba_matrix.ref_bus_positions)[1]-1],
zeros(size(ba_matrix, 1), 1),
ba_matrix.data[:, collect(ba_matrix.ref_bus_positions)[1]:end]
)
```
Expand All @@ -112,7 +112,7 @@ ba_matrix.data = hcat(
The `ABA_Matrix` is a structure containing the matrix coming from the product of the
`IncidenceMatrix` and the `BA_Matrix`.
It features the same fields as the `IncidenceMatrix` and the `BA_Matrix`, plus the `K` one.
The field `ABA_Matrix.K` stores the LU factorization matrices (using the
The field `ABA_Matrix.K` stores the LU factorization matrices (using the
methods contained in the package `KLU`).

To evaluate the `ABA_Matrix`, the following command is sufficient:
Expand Down Expand Up @@ -141,5 +141,5 @@ aba_matrix.K
The following command can then be used to check if the `ABA_Matrix` contains the LU factorization matrices:

``` @repl tutorial_Incidence_BA_ABA_matrices
is_factorized(aba_matrix_new)
```
is_factorized(aba_matrix)
```
Loading