Skip to content

Commit 23b0e37

Browse files
authored
Merge branch 'main' into feature/voltage-sensor-residuals
2 parents ab9cff1 + 24423ed commit 23b0e37

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

docs/advanced_documentation/build-guide.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,16 @@ The `pip install .` part of the command installs the complete package from scrat
477477
478478
The C API documentation is generated using [Doxygen](https://www.doxygen.nl). If you do not have Doxygen installed, it can also be temporarily bypassed by commenting out the `breathe` settings in `docs/conf.py`.
479479
480-
The documentation can be built with the following commands, resulting in html files of the webpages which can be found in `docs/_build/html` directory.
480+
The documentation can be built with the following commands, resulting in HTML files of the webpages which can be found in `docs/_build/html` directory.
481481
482482
```shell
483483
cd docs/doxygen
484484
doxygen
485485
cd ..
486486
sphinx-build -b html . _build/html
487487
```
488+
489+
```{note}
490+
The user documentation generated by [Sphinx](https://github.com/sphinx-doc/sphinx) only contains the C API documentation.
491+
Doxygen, however, also builds the documentation for the Power Grid Model core implementation, which can be accessed after building the documentation locally via `docs/_build/html/index.html`.
492+
```

docs/advanced_documentation/core-design.md

+5
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ graph TD
4848
4949
ComponentsOutput -->|Output| Output(Output data)
5050
```
51+
52+
## Detailed Power Grid Model core design
53+
54+
The sheer size and complexity of the Power Grid Model core implementation makes it hard to generate an up-to-date and comprehensive graph of its design.
55+
For a full overview of the core, it is recommended to build and access the Power Grid Model core documentation by following the steps in the [build guide](./build-guide.md#documentation).

docs/doxygen/Doxyfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -495,25 +495,25 @@ EXTRACT_ALL = YES
495495
# be included in the documentation.
496496
# The default value is: NO.
497497

498-
EXTRACT_PRIVATE = NO
498+
EXTRACT_PRIVATE = YES
499499

500500
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
501501
# methods of a class will be included in the documentation.
502502
# The default value is: NO.
503503

504-
EXTRACT_PRIV_VIRTUAL = NO
504+
EXTRACT_PRIV_VIRTUAL = YES
505505

506506
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
507507
# scope will be included in the documentation.
508508
# The default value is: NO.
509509

510-
EXTRACT_PACKAGE = NO
510+
EXTRACT_PACKAGE = YES
511511

512512
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
513513
# included in the documentation.
514514
# The default value is: NO.
515515

516-
EXTRACT_STATIC = NO
516+
EXTRACT_STATIC = YES
517517

518518
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
519519
# locally in source files will be included in the documentation. If set to NO,
@@ -529,7 +529,7 @@ EXTRACT_LOCAL_CLASSES = YES
529529
# included.
530530
# The default value is: NO.
531531

532-
EXTRACT_LOCAL_METHODS = NO
532+
EXTRACT_LOCAL_METHODS = YES
533533

534534
# If this flag is set to YES, the members of anonymous namespaces will be
535535
# extracted and appear in the documentation as a namespace called
@@ -538,7 +538,7 @@ EXTRACT_LOCAL_METHODS = NO
538538
# are hidden.
539539
# The default value is: NO.
540540

541-
EXTRACT_ANON_NSPACES = NO
541+
EXTRACT_ANON_NSPACES = YES
542542

543543
# If this flag is set to YES, the name of an unnamed parameter in a declaration
544544
# will be determined by the corresponding definition. By default unnamed
@@ -868,7 +868,7 @@ WARN_LOGFILE =
868868
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
869869
# Note: If this tag is empty the current directory is searched.
870870

871-
INPUT = ../../power_grid_model_c/power_grid_model_c/include
871+
INPUT = "../../power_grid_model_c/" "../../src/" "../../tests/"
872872

873873
# This tag can be used to specify the character encoding of the source files
874874
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -897,7 +897,7 @@ INPUT_ENCODING = UTF-8
897897
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
898898
# *.ucf, *.qsf and *.ice.
899899

900-
FILE_PATTERNS = *.h
900+
FILE_PATTERNS =
901901

902902
# The RECURSIVE tag can be used to specify whether or not subdirectories should
903903
# be searched for input files as well.
@@ -2314,7 +2314,7 @@ HIDE_UNDOC_RELATIONS = YES
23142314
# set to NO
23152315
# The default value is: YES.
23162316

2317-
HAVE_DOT = NO
2317+
HAVE_DOT = YES
23182318

23192319
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
23202320
# to run in parallel. When set to 0 doxygen will base this on the number of

docs/user_manual/calculations.md

+10
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ also of importance, i.e., the measurements should be topologically independent.
9696
Global angle current measurements require at least one voltage angle measurement to make sense. See also the [current sensor component documentation](./components.md#global-angle-current-sensors).
9797
```
9898

99+
```{note}
100+
It is not possible to add both a [power sensor](./components.md#generic-current-sensor) and a [current sensor](#./components.mdgeneric-current-sensor) to the same terminal of the same component.
101+
It is, however, allowed to have both a power sensor and a current sensor on the same branch if they are on different terminals.
102+
```
103+
99104
```{warning}
100105
The [iterative linear](#iterative-linear-state-estimation) and [Newton-Raphson](#newton-raphson-state-estimation) state estimation algorithms will assume angles to be zero by default (see the details about voltage sensors).
101106
In observable systems this helps better outputting correct results. On the other hand with unobservable systems, exceptions raised from calculations due to faulty results will be prevented.
@@ -462,6 +467,11 @@ $$
462467

463468
Where $S_k$ and $\sigma_{P,k}$ and $\sigma_{Q,k}$ are the measured value and the standard deviation of the individual appliances.
464469

470+
```{note}
471+
It is not possible to add both a [power sensor](./components.md#generic-current-sensor) and a [current sensor](#./components.mdgeneric-current-sensor) to the same terminal of the same component.
472+
It is, however, allowed to have both a power sensor and a current sensor on the same branch if they are on different terminals.
473+
```
474+
465475
#### State estimate sensor transformations
466476

467477
Sometimes, measurements need to be transformed between coordinate spaces. For example, current measurements are in polar coordinates (magnitude and angle), but it is beneficial to transform them to separate real and imaginary components per phase, with each their own variances.

docs/user_manual/components.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,11 @@ In the state estimation result, the power from this injection is distributed equ
652652
Because of this distribution, at least one appliance is required to be connected to the node where an injection sensor is placed for it to function.
653653
```
654654

655+
```{note}
656+
It is not possible to add both a [power sensor](#generic-current-sensor) and a [current sensor](#generic-current-sensor) to the same terminal of the same component.
657+
It is, however, allowed to have both a power sensor and a current sensor on the same branch if they are on different terminals.
658+
```
659+
655660
##### Input
656661

657662
| name | data type | unit | description | required | update | valid values |
@@ -743,6 +748,11 @@ The terminal is connecting the from/to end of a `branch` (except `link`) and a `
743748
Due to the high admittance of a `link` it is chosen that a current sensor cannot be coupled to a `link`, even though a link is a `branch`
744749
```
745750

751+
```{note}
752+
It is not possible to add both a [power sensor](#generic-current-sensor) and a [current sensor](#generic-current-sensor) to the same terminal of the same component.
753+
It is, however, allowed to have both a power sensor and a current sensor on the same branch if they are on different terminals.
754+
```
755+
746756
##### Input
747757

748758
| name | data type | unit | description | required | update | valid values |
@@ -828,11 +838,11 @@ As a result, the local angle current sensors have a different sign convention fr
828838
$$
829839
\begin{eqnarray}
830840
& i_{\text{residual}} = i_{\text{measured}} - i_{\text{state}} && \\
831-
& i_{\text{angle},\text{residual}} = i_{\text{angle},\text{measured}} - i_{\text{angle},\text{state}} \pmod 2 \pi
841+
& i_{\text{angle},\text{residual}} = i_{\text{angle},\text{measured}} - i_{\text{angle},\text{state}} \pmod{2 \pi}
832842
\end{eqnarray}
833843
$$
834844

835-
The $\pmod 2\pi$ is handled such that $-\pi \lt i_{\text{angle},\text{residual}} \leq \pi$.
845+
The $\pmod{2\pi}$ is handled such that $-\pi \lt i_{\text{angle},\text{residual}} \leq \pi$.
836846

837847
## Fault
838848

0 commit comments

Comments
 (0)