com.powsybl.iidm.serde.test.MetrixTutorialSixBusesFactory Maven / Gradle / Ivy
/**
* Copyright (c) 2022, 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.iidm.serde.test;
import com.powsybl.commons.report.ReportNode;
import com.powsybl.iidm.network.Network;
import com.powsybl.iidm.network.NetworkFactory;
import com.powsybl.iidm.serde.ImportOptions;
import com.powsybl.iidm.serde.NetworkSerDe;
/**
* @author Geoffroy Jamgotchian {@literal }
*/
public final class MetrixTutorialSixBusesFactory {
private MetrixTutorialSixBusesFactory() {
}
public static Network create() {
return create(NetworkFactory.findDefault());
}
public static Network create(NetworkFactory networkFactory) {
return NetworkSerDe.read(MetrixTutorialSixBusesFactory.class.getResourceAsStream("/metrix-tutorial-6-buses-network.xiidm"), new ImportOptions(), null, networkFactory, ReportNode.NO_OP);
}
}