### Install Documentation Requirements Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Install the necessary Python packages for building the documentation using pip. ```bash pip install -r requirements.txt ``` -------------------------------- ### Loadflow Configuration Example Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/loadflow/parameters.md An example configuration file snippet for Open Loadflow, demonstrating settings for low impedance branches, slack distribution, voltage control, and slack bus selection. ```yaml open-loadflow-default-parameters: lowImpedanceBranchMode: REPLACE_BY_ZERO_IMPEDANCE_LINE slackDistributionFailureBehavior: FAIL voltageRemoteControl: false slackBusSelectionMode: NAME slackBusesIds: Bus3_0,Bus5_0 loadPowerFactorConstant: true ``` -------------------------------- ### Empty LfNetworkLoaderPostProcessor Example Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/advanced_programming/lfnetwork_loader_postprocessor.md An example of an empty post-processor that implements the LfNetworkLoaderPostProcessor interface. This serves as a basic template for creating custom post-processors. ```java package org.example.powsybl.plugins; import com.google.auto.service.AutoService; import com.powsybl.openloadflow.network.*; @AutoService(LfNetworkLoaderPostProcessor.class) public class MyLfNetworkLoaderPostProcessor implements LfNetworkLoaderPostProcessor { @Override public String getName() { return "my-example-plugin"; } @Override public LoadingPolicy getLoadingPolicy() { return LoadingPolicy.ALWAYS; } @Override public void onBusAdded(Object element, LfBus lfBus) { // implement me } @Override public void onBranchAdded(Object element, LfBranch lfBranch) { // implement me } @Override public void onInjectionAdded(Object element, LfBus lfBus) { // implement me } @Override public void onAreaAdded(Object element, LfArea lfArea) { // implement me } @Override public void onLfNetworkLoaded(Object element, LfNetwork lfNetwork) { // implement me } } ``` -------------------------------- ### Configure Start with Frozen AC Emulation Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/parameters.md Control whether contingency simulation starts with HVDC link AC emulation frozen. If true, it uses the base case's active set point; otherwise, it allows immediate adaptation to new angles. ```yaml open-sensitivityanalysis-default-parameters: startWithFrozenACEmulation: true ``` -------------------------------- ### Configure Intersphinx Mapping Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Add an intersphinx mapping to link to the documentation of another PowSyBl project, like PowSyBl-Core. The URL must start with 'https://' and end with '/'. ```python # This parameter might already be present, just add the new value intersphinx_mapping = { "powsyblcore": ("https://powsybl-core.readthedocs.io/en/latest/", None), } ``` -------------------------------- ### Build Documentation with Make Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Build the documentation in HTML format using the make html command. ```bash make html ``` -------------------------------- ### Build Documentation with Sphinx Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Build the documentation in HTML format using the sphinx-build command with the -a flag. ```bash sphinx-build -a . ./_build/html ``` -------------------------------- ### Navigate to Docs Directory Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Change the current directory to the 'docs' folder of the project. ```bash cd docs ``` -------------------------------- ### DC Sensitivity: Phase-Shifting Angle Increase in Branch (i,j) to Branch (k,l) Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/sensitivity.md Computes the sensitivity of a branch flow to a 1° phase-shifting angle increase in another branch. This requires a specific setup of the right-hand side vector 'b' based on the branch impedance. ```mathematica if~n=i:& &b_n = -\frac{\pi}{180X_{i,j}} if~n=j:& &b_n = \frac{\pi}{180X_{i,j}} else:& &b_n = 0 ``` -------------------------------- ### Build Documentation with Sphinx (Clear Cache) Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Build the documentation with Sphinx, using the -E flag to clear the build cache if issues arise. ```bash sphinx-build -a -E . _build/html ``` -------------------------------- ### Build Documentation in LaTeX Format Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/README.md Build the documentation in LaTeX format using the make latexpdf command. ```bash make latexpdf ``` -------------------------------- ### Configure Sensitivity Analysis Module Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/parameters.md Set the default implementation for sensitivity analysis to OpenLoadFlow in the configuration file. ```yaml sensitivity-analysis: default-impl-name: OpenLoadFlow ``` -------------------------------- ### Run Load Flow Calculation Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/README.md Execute the load flow calculation with default parameters on the loaded network. ```java LoadFlow.run(network); ``` -------------------------------- ### Configure Security Analysis Module Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/security/parameters.md Set the default implementation for security analysis to OpenLoadFlow in the configuration file. ```yaml security-analysis: default-impl-name: OpenLoadFlow ``` -------------------------------- ### Configure Default Load Flow Implementation Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/loadflow/parameters.md Set the default implementation for load flow computations to OpenLoadFlow in the configuration file. ```yaml load-flow: default-impl-name: "OpenLoadFlow" ``` -------------------------------- ### Add Maven Dependencies for Load Flow Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/README.md Include these Maven dependencies to access network models, IEEE test networks, logging, and Open Load Flow implementation. ```xml com.powsybl powsybl-iidm-impl 7.2.0 com.powsybl powsybl-ieee-cdf-converter 7.2.0 org.slf4j slf4j-simple 2.0.13 ``` -------------------------------- ### Set Debug Directory for Sensitivity Analysis Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/parameters.md Specify a directory to dump debug files for sensitivity analysis. The default is null, disabling debug file writing. ```yaml open-sensitivityanalysis-default-parameters: debugDir: /path/to/debug/dir ``` -------------------------------- ### Load IEEE 14 Bus Network Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/README.md Use IeeeCdfNetworkFactory to create an instance of the IEEE 14 bus network. ```java Network network = IeeeCdfNetworkFactory.create14(); ``` -------------------------------- ### Remote Voltage Control Equations Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/loadflow/loadflow.md Defines the power balance at the controller bus and the voltage and power balance at the controlled bus for remote voltage control. ```mathematica At controller bus $b_1$: ${b_1}^{in} = \sum_{j \in v(b_1)} p_{b_1,j}$. At controlled bus $b_2$: $P_{b_2}^{in} = \sum_{j \in v(b_2)} p_{b_2,j}$. $Q_{b_2}^{in} = \sum_{j \in v(b_2)} q_{b_2,j}$. $v_{b_2} = V^{c}_{b_1}$. ``` -------------------------------- ### Gradient Vector Components for Phase Shift Parameter Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/sensitivity.md Provides the non-zero components of the gradient vector g_p(v,phi) when the parameter p is a phase shift of a phase tap changer. These are specific to sensitivities on the branch (i,j) where the tap changer is located. ```mathematics \rho_iv_iY\rho_jv_j\texttt{cos}(\theta)\frac{\pi}{180}, \quad\texttt{if the sensitivity is on the power flow}, -\frac{Re(I)\frac{dRe(I)}{d\phi_j} + Im(I)\frac{dIm(I)}{d\phi_j}}{|I|}\frac{\pi}{180}, \quad\texttt{if the sensitivity is on the current flow}. ``` -------------------------------- ### Sensitivity of Voltage Angle Difference on Pre-Contingency Network Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/sensitivity.md Provides the fundamental formula for calculating the sensitivity of the voltage angle difference across a branch $(i,j)$ on the pre-contingency network. ```mathematica s_{b,ij} = \frac{\theta^1_i-\theta^1_j}{X_{i,j}} ``` ```mathematica s_{mk,ij} = \frac{\theta^2_i-\theta^2_j}{X_{i,j}} ``` -------------------------------- ### Create Result Extension Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/security/parameters.md Defines whether Open Load Flow specific results extensions, such as voltage information for branches and three-winding transformers, should be created in the security analysis results. Defaults to false. ```text The `createResultExtension` property defines whether Open Load Flow specific results extensions should be created in the security analysis results. Today the available extensions provide information about branches and three-windings transformers voltages (magnitude and angle): ``` -------------------------------- ### Configure Thread Count for AC Sensitivity Analysis Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/sensitivity/parameters.md Define the number of threads for AC sensitivity analysis. Multi-threading is not supported for DC analysis. The default value is 1. ```yaml open-sensitivityanalysis-default-parameters: threadCount: 1 ``` -------------------------------- ### Remote Reactive Power Control Equations Source: https://github.com/powsybl/powsybl-open-loadflow/blob/main/docs/loadflow/loadflow.md Specifies the active power balance at the controller bus and the reactive power control at the controlled branch for remote reactive power control. ```mathematica At controller bus $b_1$: $P_{b_1}^{in} = \sum_{j \in v(b_1)} p_{b_1,j}$. At controlled branch $(i,j)$: $q_{i,j} = Q^{c}_{b_1}$. ```