All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.powsybl.cgmes.conversion.elements.EquivalentShuntConversion Maven / Gradle / Ivy

There is a newer version: 6.6.0
Show newest version
/**
 * Copyright (c) 2019, 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/.
 */
package com.powsybl.cgmes.conversion.elements;

import com.powsybl.cgmes.conversion.Context;
import com.powsybl.cgmes.conversion.Conversion;
import com.powsybl.iidm.network.ShuntCompensator;
import com.powsybl.iidm.network.ShuntCompensatorAdder;
import com.powsybl.triplestore.api.PropertyBag;

/**
 * @author Miora Ralambotiana 
 */
public class EquivalentShuntConversion extends AbstractConductingEquipmentConversion {

    public EquivalentShuntConversion(PropertyBag p, Context context) {
        super("EquivalentShunt", p, context);
    }

    @Override
    public void convert() {
        ShuntCompensatorAdder adder = voltageLevel().newShuntCompensator()
                .setSectionCount(terminalConnected() ? 1 : 0)
                .newLinearModel()
                    .setGPerSection(p.asDouble("g"))
                    .setBPerSection(p.asDouble("b"))
                    .setMaximumSectionCount(1)
                    .add();
        identify(adder);
        connect(adder);
        ShuntCompensator sc = adder.add();
        sc.setProperty(Conversion.PROPERTY_IS_EQUIVALENT_SHUNT, "true");
        addAliasesAndProperties(sc);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy