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

update typos #53

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CurrentModule = PowerNetworkMatrices

`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 matrices according to different methods, providing a flexibe and powerful tool.
the matrices according to different methods, providing a flexible and powerful tool.

The documentation and code are organized according to the needs of different
users depending on their skillset and requirements. In broad terms there are three categories:
Expand Down
6 changes: 3 additions & 3 deletions docs/src/tutorials/tutorial_Incidence_BA_ABA_matrices.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ 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 branches names and bus numbers with the row
# 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
# exaple in the BA matrix for more details.
# example in the BA matrix for more details.
incidence_matrix.ref_bus_positions
```

Expand All @@ -63,7 +63,7 @@ the column related to the reference bus is discarded.
## BA_Matrix

The `BA_Matrix` is a structure containing the matrix coming from the product of the
`IncidenceMatrix` and the diagonal matrix contianing the impedence of the system's branches ("B" matrix).
`IncidenceMatrix` and the diagonal matrix containing the impedence of the system's branches ("B" matrix).

The `BA_Matrix` is computed as follows:

Expand Down
6 changes: 3 additions & 3 deletions docs/src/tutorials/tutorial_LODF_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before diving into this tutorial we encourage the user to load `PowerNetworkMatr

As for the `PTDF` matrix, the `LODF` one can be evaluated according to two different approaches:
- `Dense`: considers functions for dense matrix multiplication and inversion
- `KLU`: considers functions for sparse matrix multiplication and inversion(**default**)
- `KLU`: considers functions for sparse matrix multiplication and inversion (**default**)

The evaluation of the `LODF` matrix can be easily performed starting from importing the system's data and then by simply calling the `LODF` method.

Expand Down Expand Up @@ -69,7 +69,7 @@ lodf_5 = LODF(a, aba, ba);

For those methods that either require the evaluation of the `PTDF` matrix, or that execute this evaluation internally, two different approaches casen be used.

As for the `PTDF` matrix, here too the optional argument `linear_solver` can be specified with either `KLU` (for spars matrix calculation) or `Dense` (for sparse matrix calculation).
As for the `PTDF` matrix, here too the optional argument `linear_solver` can be specified with either `KLU` (for sparse matrix calculation) or `Dense` (for sparse matrix calculation).

``` @repl tutorial_PTDF_matrix
lodf_dense = LODF(sys, linear_solver="Dense");
Expand Down Expand Up @@ -97,4 +97,4 @@ Please consider that 0.4 was used for the purpose of this tutorial. In practice

**NOTE (2):** the `tol` argument does not refer to the "sparsification" tolerance of the `PTDF` matrix that is computed in the `LODF` method.

**NOTE (3):** in case the method `LODF(a::IncidenceMatrix, ptdf::PTDF)` is considerd, an error will be thrown whenever the `tol` argument in the `PTDF` structure used as input is different then 1e-15.
**NOTE (3):** in case the method `LODF(a::IncidenceMatrix, ptdf::PTDF)` is considered, an error will be thrown whenever the `tol` argument in the `PTDF` structure used as input is different than `1e-15`.
8 changes: 4 additions & 4 deletions docs/src/tutorials/tutorial_PTDF_matrix.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PTDF matrix

In this tutorial the methods for computing the Power Transfer Distribution Factors (`PTDF`) are presented.
Before diving into this tutorial we encourage the user to load `PowerNetworkMatrices`, hit the `?` key in the REPL terminal and look for the documentiont of the different `PTDF` methods avialable.
Before diving into this tutorial we encourage the user to load `PowerNetworkMatrices`, hit the `?` key in the REPL terminal and look for the documention of the different `PTDF` methods available.

## Evaluation of the `PTDF` matrix

Expand Down Expand Up @@ -59,11 +59,11 @@ get_ptdf_data(ptdf_klu)
```

By default the "KLU" method is selected, which appeared to require significant less time and memory with respect to "Dense".
Please note that either the `KLU` or `Dense` method isi used, the resultig `PTDF` matrix is stored as a dense one.
Please note that either the `KLU` or `Dense` method is used, the resulting `PTDF` matrix is stored as a dense one.

## Evaluating the `PTDF` matrix considering distributed slack bus

Whenever needed, the `PTDF` matrix can be computed with a distributed slack bus. To do so, a vecotr of type `Vector{Float64}` needs to be defined, specifying the weights for each bus of the system. These weights identify how the load on the slakc bus is redistributed accross the system.
Whenever needed, the `PTDF` matrix can be computed with a distributed slack bus. To do so, a vector of type `Vector{Float64}` needs to be defined, specifying the weights for each bus of the system. These weights identify how the load on the slakc bus is redistributed accross the system.

``` @repl tutorial_PTDF_matrix
# consider equal distribution accross each bus for this example
Expand All @@ -78,7 +78,7 @@ Once the vector of the weights is defined, the `PTDF` matrix can be computed by
ptdf_distr = PTDF(sys, dist_slack=dist_slack_array);
```

The diffrence between a the matrix computed with and without the `dist_slack` field defined can be seen as follows:
The difference between a the matrix computed with and without the `dist_slack` field defined can be seen as follows:

``` @repl tutorial_PTDF_matrix
# with no distributed slack bus
Expand Down
10 changes: 5 additions & 5 deletions docs/src/tutorials/tutorial_VirtualLODF_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Refer to the different arguments of the `VirtualLODF` methods by looking at the

The `VirtualLODF` structure retains many of the similarities of the `VirtualPTDF`. However, its computation is more complex and requires some additional data.

Starting from the system data, the `IncidenceMatrix`, `BA_Matrix` and `ABA_Matrix` (with relative LU factorization matrices) are evaluated. The `ABA_Matrix` and `BA_Matrix` are used for the computation of the diagonal elements of the `PTDF` matrix, and this vector is stored in the `VirtualLODF` structure together with the other structures abovementioned.
Starting from the system data, the `IncidenceMatrix`, `BA_Matrix` and `ABA_Matrix` (with relative LU factorization matrices) are evaluated. The `ABA_Matrix` and `BA_Matrix` are used for the computation of the diagonal elements of the `PTDF` matrix, and this vector is stored in the `VirtualLODF` structure together with the other structures mentioned above.

Once the `VirtualLODF` is initialized, each row of the matrix can be evaluated separately and on user request. The algorithmic procedure is the following:
1. Define the `VirtualPTDF` structure
Expand All @@ -19,12 +19,12 @@ Regarding point 2, if the row has been stored previosly then the desired element
The flowchart below shows how the `VirtualLODF` is structured and how it works. Examples will be presented in the following sections.

```@raw html
<img src="../assets/VirtualLODF_scheme.png"/>
<img src="../../assets/VirtualLODF_scheme.png"/>
```

## Initialize `VirtualLODF` and compute/access row/element

As for the `LODF` matrix, at first the `System` data must be loaded. The "RTS GMLC" systems is considered as example:
As for the `LODF` matrix, at first the `System` data must be loaded. The "RTS-GMLC" systems is considered as example:

``` @repl tutorial_VirtualPTDF_matrix
using PowerNetworkMatrices
Expand Down Expand Up @@ -58,9 +58,9 @@ col_number = v_lodf.lookup[2]["A3"]
el_C31_2_105_bis = v_lodf[row_number, col_number]
```

**NOTE**: this example was made for the sake of completeness and considering the actual branch names is reccomended.
**NOTE**: this example was made for the sake of completeness and considering the actual branch names is recommended.

As previosly mentioned, in order to evalute a single element of the `VirtualLODF`, the entire row related to the selected branch must be considered. For this reason it is cached for later calls.
As previosly mentioned, in order to evaluate a single element of the `VirtualLODF`, the entire row related to the selected branch must be considered. For this reason it is cached for later calls.
This is evident by looking at the following example:

``` @repl tutorial_VirtualPTDF_matrix
Expand Down
10 changes: 5 additions & 5 deletions docs/src/tutorials/tutorial_VirtualPTDF_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Regarding point 2, if the row has been stored previosly then the desired element
The flowchart below shows how the `VirtualPTDF` is structured and how it works. Examples will be presented in the following sections.

```@raw html
<img src="../assets/VirtualPTDF_scheme.png"/>
<img src="../../assets/VirtualPTDF_scheme.png"/>
```

## Initialize `VirtualPTDF` and compute/access row/element

As for the `PTDF` matrix, at first the `System` data must be loaded. The "RTS GMLC" systems is considered as example:
As for the `PTDF` matrix, at first the `System` data must be loaded. The "RTS-GMLC" systems is considered as example:

``` @repl tutorial_VirtualPTDF_matrix
using PowerNetworkMatrices
Expand Down Expand Up @@ -57,7 +57,7 @@ el_C31_2_105_bis = v_ptdf[row_number, col_number]

**NOTE**: this example was made for the sake of completeness and considering the actual branch name and bus number is reccomended.

As previosly mentioned, in order to evalute a single element of the `VirtualPTDF`, the entire row related to the selected branch must be considered. For this reason it is cached in the `VirtualPTDF` structure for later calls.
As previosly mentioned, in order to evaluate a single element of the `VirtualPTDF`, the entire row related to the selected branch must be considered. For this reason it is cached in the `VirtualPTDF` structure for later calls.
This is evident by looking at the following example:

``` @repl tutorial_VirtualPTDF_matrix
Expand All @@ -75,7 +75,7 @@ v_ptdf_2k = VirtualPTDF(sys_2k);
## `VirtualPTDF` with distributed slack bus

As for the `PTDF` matrix, here too each row can be evaluated considering distibuted slack buses.
A vecotr of type `Vector{Float64}` is defined, specifying the weights for each bus of the system.
A vector of type `Vector{Float64}` is defined, specifying the weights for each bus of the system.

``` @repl tutorial_VirtualPTDF_matrix
# smaller system for the next examples
Expand All @@ -94,7 +94,7 @@ v_ptdf_distr = VirtualPTDF(sys_2, dist_slack=dist_slack_array);
v_ptdf_orig = VirtualPTDF(sys_2);
```

Now check the difference with the same row related to the branch `"1"` evaluated withou considering distributed slack bus.
Now check the difference with the same row related to the branch `"1"` evaluated without considering distributed slack bus.

``` @repl tutorial_VirtualPTDF_matrix
row_distr = [v_ptdf_distr["1", j] for j in v_ptdf_distr.axes[2]]
Expand Down
2 changes: 1 addition & 1 deletion src/virtual_ptdf_calculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ matrix.
- `axes<:NTuple{2, Dict}`:
Tuple containing two vectors: the first one showing the branches names,
the second showing the buses numbers. There is no link between the
order of the vector of the branche names and the way the PTDF rows are
order of the vector of the branches names and the way the PTDF rows are
stored in the cache.
- `lookup<:NTuple{2, Dict}`:
Tuple containing two dictionaries, mapping the branches
Expand Down
Loading