### Serialization Example Source: https://power-grid-model.readthedocs.io Example demonstrating how to serialize and deserialize power grid data. ```APIDOC ## Serialization Example ### Description This example shows how to use the serialization features of the Power Grid Model to save and load network data, including different formats like JSON and Msgpack. ### Workflow 1. **Load dependencies**: Import necessary libraries. 2. **Load a dataset from a JSON file**: Read network data from a JSON file. 3. **Run power flow calculation on the loaded input data**: Perform calculations on the deserialized data. 4. **Serialize the output dataset**: Save the results or model state to a file. 5. **Msgpack serialization**: Demonstrate serialization using the Msgpack format. 6. **Selective deserialization and dataset format**: Show how to load specific parts of a dataset or use different data formats. ``` -------------------------------- ### State Estimation Example Source: https://power-grid-model.readthedocs.io Example demonstrating how to perform state estimation on a power grid model. ```APIDOC ## State Estimation Example ### Description This example guides through the process of performing state estimation on a power grid, including network setup, measurement input, and calculation execution. ### Steps 1. **Example Network**: Define or load an example power network. 2. **Input Dataset**: Prepare input data, including network parameters and measurement data. 3. **Validation (optional)**: Validate the input dataset. 4. **Construction**: Instantiate the `PowerGridModel`. 5. **One-time State Estimation Calculation**: Perform a single state estimation run. 6. **Observability**: Analyze the observability of the network based on measurements. 7. **Batch calculation**: Execute state estimation for multiple scenarios or time steps. ``` -------------------------------- ### Asym Line Example Source: https://power-grid-model.readthedocs.io Example demonstrating the modeling and analysis of asymmetric lines. ```APIDOC ## Asym Line Example ### Description This example focuses on the specific modeling and analysis of asymmetric lines, which are lines with different characteristics on their phases. ``` -------------------------------- ### Short Circuit Calculation Example Source: https://power-grid-model.readthedocs.io Example demonstrating how to perform short circuit calculations. ```APIDOC ## Short Circuit Example ### Description This example covers the process of performing short circuit calculations on a power grid model, including network definition and calculation execution. ### Steps 1. **Example Network**: Define or load an example power network. 2. **Input Dataset**: Prepare the input data for the network. 3. **Validation (optional)**: Validate the input dataset. 4. **Construction**: Instantiate the `PowerGridModel`. 5. **One-time Short circuit Calculation**: Execute a single short circuit calculation. 6. **Batch Calculations**: Perform short circuit calculations for multiple fault locations or types. ``` -------------------------------- ### Install Power Grid Model from PyPI Source: https://power-grid-model.readthedocs.io Use this command to install the package directly from the Python Package Index. ```bash pip install power-grid-model ``` -------------------------------- ### Build Guide Source: https://power-grid-model.readthedocs.io Instructions and requirements for building the Power Grid Model from source. ```APIDOC ## Build Guide ### Description This guide provides comprehensive instructions for building the Power Grid Model from its source code on various platforms. ### Build Requirements - **Build Requirements**: List of necessary software and libraries. - **Build Python Package**: Steps to build the Python package. - **Build CMake Project**: Instructions for building the core C++ project using CMake. ### Platform-Specific Setup - **Example Setup for Ubuntu 24.04 (in WSL or physical/virtual machine)**: Detailed setup for Ubuntu. - **Example Setup for Windows 11**: Instructions for Windows environments. - **Example Setup for macOS (Tahoe)**: Guidance for macOS users. ### Additional Information - **Package tests**: How to run tests after building. - **Visual Studio Code Support**: Configuration tips for VS Code. - **Documentation**: Building the documentation itself. ``` -------------------------------- ### Transformer Example Source: https://power-grid-model.readthedocs.io Examples related to modeling and calculating power flow for transformers. ```APIDOC ## Transformer Example ### Description This section provides examples for modeling and analyzing different types of transformers, including two-winding and three-winding transformers, and their behavior during power flow calculations. ### Transformer Types - **Transformer (Two-winding Transformer)**: Modeling and analysis of standard two-winding transformers. - **Three-Winding Transformer**: Modeling and analysis of transformers with three windings. - **Power flow calculations with automatic tap changing**: Specific examples demonstrating how tap changers affect power flow calculations. ``` -------------------------------- ### Install Power Grid Model from Conda Source: https://power-grid-model.readthedocs.io If you are using conda, install the package from the conda-forge channel. ```bash conda install -c conda-forge power-grid-model ``` -------------------------------- ### Asymmetric Calculation Example Source: https://power-grid-model.readthedocs.io Example demonstrating asymmetric calculations, such as asymmetric power flow and state estimation. ```APIDOC ## Asymmetric Calculation Example ### Description This example focuses on performing asymmetric calculations, which are relevant for unbalanced power flow and state estimation. ### Scenarios - **Example Network**: Setting up an example network suitable for asymmetric analysis. - **Power Flow Calculation**: Performing standard asymmetric power flow. - **Batch Asymmetric Power Flow Calculation**: Executing asymmetric power flow for multiple scenarios. - **Asymmetric State Estimation**: Performing state estimation with unbalanced conditions. ``` -------------------------------- ### Install Power Grid Model C API via Homebrew Source: https://power-grid-model.readthedocs.io For users of the C API with Homebrew, this command installs the C API and experimental C++ wrapper. ```bash brew install powergridmodel/pgm/power-grid-model ``` -------------------------------- ### Validation Examples Source: https://power-grid-model.readthedocs.io Examples related to data validation within the Power Grid Model. ```APIDOC ## Validation Examples ### Description This section provides examples and guidance on validating data used by the Power Grid Model. ### Topics - **Batch datasets**: Examples related to validating datasets used in batch processing. - **Structure of Validation Datasets**: Information on the expected format and structure of validation data. - **Helper Functions to Import and Export**: Utilities for managing validation datasets. - **Import and Export Batch Update/Result Dataset**: Specific examples for batch data operations. - **Detailed configuration with the params.json**: How to configure validation using `params.json`. ``` -------------------------------- ### Generic Branch Examples Source: https://power-grid-model.readthedocs.io Examples demonstrating the use of the generic branch representation for various network components. ```APIDOC ## Generic Branch Examples ### Description This section showcases the flexibility of the generic branch representation, allowing different component types to be modeled uniformly. ### Use Cases - **Generic Branch Representation of a Three-winding Transformer**: Using the generic branch to model a three-winding transformer. - **Generic Branch Representation for Line, Transformer and PST**: Applying the generic branch to lines, transformers, and phase-shifting transformers (PST). - **Using the Generic Branch with CIM/CGMES Data**: Integrating the generic branch representation with standard data formats like CIM/CGMES. ``` -------------------------------- ### Power Flow Calculation Example Source: https://power-grid-model.readthedocs.io Example demonstrating how to perform a power flow calculation using the Power Grid Model. ```APIDOC ## Power Flow Calculation Example ### Description This example illustrates the process of performing a power flow calculation, including network setup, data input, and calculation execution. ### Steps 1. **Example Network**: Define or load an example power network. 2. **Input Dataset**: Prepare the input data for the network components (e.g., buses, lines, loads). 3. **Validation (optional)**: Validate the input dataset for correctness. 4. **Construction**: Instantiate the `PowerGridModel` with the network and data. 5. **One-time Power Flow Calculation**: Execute a single power flow calculation. 6. **Update Model**: Modify network parameters or load data and re-run calculations. 7. **Batch Calculation**: Perform power flow calculations for multiple scenarios or time steps. 8. **Error Handling**: Implement mechanisms to handle potential errors during calculation. 9. **Power flow calculations with automatic tap changing**: Specific example for transformers with tap changers. ``` -------------------------------- ### Make Test Dataset Source: https://power-grid-model.readthedocs.io Guidance on creating test datasets for the Power Grid Model. ```APIDOC ## Make Test Dataset ### Description This section provides instructions and examples for creating test datasets, particularly for validation purposes. ### Key Areas - **Structure of Validation Datasets**: Understanding the required format for validation data. - **Helper Functions to Import and Export**: Utilizing provided functions to manage test datasets. - **Import and Export Batch Update/Result Dataset**: Specific methods for handling batch data in testing. - **Detailed configuration with the params.json**: Configuring test dataset generation using `params.json`. ``` -------------------------------- ### Use Power Grid Model through C API Source: https://power-grid-model.readthedocs.io Guidance on how to integrate and use the Power Grid Model via its C API. ```APIDOC ## Use Power Grid Model through C API ### Description This section explains how to find, link, and utilize the Power Grid Model library using its C API. ### Integration Steps - **Finding and linking the package**: How to locate and link the C library. - **Opaque struct/pointer**: Understanding the use of opaque pointers for data abstraction. - **Handle**: Managing handles for grid model instances. - **Calculation options**: Setting and passing calculation options. - **Buffers and attributes**: Working with data buffers and accessing model attributes. ``` -------------------------------- ### Short Circuit Algorithm Details Source: https://power-grid-model.readthedocs.io Detailed explanation of the algorithms used for short circuit calculations. ```APIDOC ## Short Circuit Algorithm Details ### Description This section provides an in-depth look at the algorithms used to calculate short circuit currents and their effects in a power system. ### Formulations - **Short Circuit Equations**: The underlying mathematical equations for short circuit analysis. - **IEC 60909 short circuit calculation**: Implementation details for the IEC 60909 standard. ``` -------------------------------- ### State Estimation Algorithm Details Source: https://power-grid-model.readthedocs.io Detailed explanation of the algorithms used for state estimation. ```APIDOC ## State Estimation Algorithm Details ### Description This section details the various algorithms and mathematical approaches used for state estimation in power systems. ### Methods - **Weighted Least Squares Formulation**: The standard WLS method for state estimation. - **State Estimation Measurement Aggregation**: Techniques for combining and processing measurements. - **State Estimate Sensor Transformations**: Handling transformations for different sensor types. - **Iterative linear state estimation**: Linearized iterative approaches. - **Newton-Raphson state estimation**: Applying Newton-Raphson method to state estimation. ``` -------------------------------- ### LU Solver Source: https://power-grid-model.readthedocs.io Information on the LU solver implementation used within the Power Grid Model. ```APIDOC ## LU Solver ### Description This section provides details about the LU decomposition solver used in the Power Grid Model, including its background and implementation. ### Details - **Background**: Theoretical basis for using LU decomposition. - **Implementation**: Specifics of how the LU solver is implemented within the library. ``` -------------------------------- ### Power Flow Algorithm Details Source: https://power-grid-model.readthedocs.io Detailed explanation of the algorithms used for power flow calculations. ```APIDOC ## Power Flow Algorithm Details ### Description This section delves into the mathematical formulations and algorithms employed for solving the power flow problem. ### Algorithms - **Nodal Equations**: The fundamental equations governing power flow at each node. - **Newton-Raphson power flow**: A common iterative method for solving non-linear power flow equations. - **Iterative current power flow**: An alternative iterative approach based on current calculations. - **Linear power flow**: Methods that linearize the power flow equations for faster, approximate solutions. - **Linear current power flow**: Linearized methods focused on current calculations. ``` -------------------------------- ### Python API Reference - Power Grid Model Source: https://power-grid-model.readthedocs.io Reference for the Python API of the Power Grid Model, including core classes and utility functions. ```APIDOC ## Python API Reference - power_grid_model ### Description This section details the Python API for the Power Grid Model, covering its main class and associated utility functions. ### Classes and Functions #### `PowerGridModel` - **Description**: The main class representing the power grid. #### `initialize_array()` - **Description**: Function to initialize arrays for the model. #### `attribute_dtype()` - **Description**: Retrieves the data type of an attribute. #### `attribute_empty_value()` - **Description**: Gets the empty value for a specific attribute. #### `power_grid_meta_data` - **Description**: Access to metadata related to the power grid. ### Supporting Modules - **enum**: Enumerations used within the library. - **data types**: Definitions of various data types. - **error types**: Custom error types for handling exceptions. - **typing**: Type hinting utilities. - **validation**: Validation functions and utilities. - **utils**: General utility functions. ``` -------------------------------- ### C API Reference - power_grid_model_c Source: https://power-grid-model.readthedocs.io Reference for the C API of the Power Grid Model, covering core functionalities and data structures. ```APIDOC ## C API Reference - power_grid_model_c ### Description This section provides documentation for the C API of the Power Grid Model, outlining its main components and functionalities. ### Core Components - **Main Header**: Entry point for the C API. - **Basics**: Fundamental functions and types. - **Handle**: Management of grid model instances. - **Meta Data**: Access to metadata. - **Buffer**: Data buffering functionalities. - **Dataset**: Handling and manipulation of datasets. - **Options**: Configuration options for calculations. - **Model**: Core model structures and operations. - **Serialization**: Functions for data serialization and deserialization. - **Dataset Definitions**: Definitions related to dataset structures. ``` -------------------------------- ### Automatic Tap Changing Algorithm Details Source: https://power-grid-model.readthedocs.io Details on the algorithms used for automatic tap changing in transformers during power flow calculations. ```APIDOC ## Automatic Tap Changing Algorithm Details ### Description This section explains the algorithms and logic behind automatic tap changing for transformers, particularly how it integrates with power flow calculations. ### Control Logic and Methods - **Control logic for power flow with automatic tap changing**: How tap adjustments are made during the power flow solution. - **Initialization and exploitation of regulated transformers**: Strategies for setting initial tap positions and utilizing them. - **Search methods used for tap changing optimization**: Algorithms employed to find optimal tap settings. - **Regulatable voltage range outside `u_band`**: Handling scenarios where voltage deviates significantly from the target band. - **Error type `MaxIterationReached`**: Specific error handling for tap changing iterations. ``` -------------------------------- ### Native Data Interface Source: https://power-grid-model.readthedocs.io Documentation for the native data interface, including structured arrays and columnar data formats. ```APIDOC ## Native Data Interface ### Description This section describes the native data interface, focusing on efficient data handling using structured arrays and columnar formats. ### Features - **Structured Array**: Explanation of the structured array data format. - **Columnar data format**: Details on the columnar storage approach. - **Creating Dataset**: How to create datasets using the native interface. - **Basic Data Types**: Supported basic data types. - **Meta-data Helper Module**: Utilities for managing metadata. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.