Source code for pypowsybl.flowdecomposition.impl.util

# Copyright (c) 2023, RTE (
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# SPDX-License-Identifier: MPL-2.0
from pypowsybl import _pypowsybl
from .flowdecomposition import FlowDecomposition

[docs]def create_decomposition() -> FlowDecomposition: """ Creates a flow decomposition objet, which can be used to run a flow decomposition on a network Example: .. code-block:: >>> flowdecomposition = pp.flowdecomposition.create_decomposition() >>> flowdecomposition.add_monitored_elements(['line_1', 'line_2']) >>> Returns: A flow decomposition object, which allows to run a flow decomposition on a network. """ return FlowDecomposition(_pypowsybl.create_flow_decomposition())