com.powsybl.openloadflow.graph.EvenShiloachGraphDecrementalConnectivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powsybl-open-loadflow Show documentation
Show all versions of powsybl-open-loadflow Show documentation
An open source loadflow based on PowSyBl
The newest version!
/**
* Copyright (c) 2020, RTE (http://www.rte-france.com)
* 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 http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
*/
package com.powsybl.openloadflow.graph;
import com.powsybl.commons.PowsyblException;
import org.jgrapht.Graphs;
import java.util.*;
import java.util.stream.Collectors;
/**
* Implementing the Even-Shiloach algorithm (see https://dl.acm.org/doi/10.1145/322234.322235)
* Due to time computation optimizations, this current implementation is only for graphs which initially have ONLY ONE
* connected component. If more, an exception is thrown.
*
* @author Geoffroy Jamgotchian {@literal }
* @author Florian Dupuy {@literal }
*/
public class EvenShiloachGraphDecrementalConnectivity extends AbstractGraphConnectivity {
private Map vertexToConnectedComponent;
private final List> newConnectedComponents = new ArrayList<>();
private final Map levelNeighboursMap = new HashMap<>();
private final Deque
© 2015 - 2025 Weber Informatics LLC | Privacy Policy