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

com.powsybl.python.network.TemporaryLimitData Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2021, 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.python.network;

import com.powsybl.iidm.network.IdentifiableType;
import com.powsybl.iidm.network.LimitType;

import java.util.Objects;

/**
 * @author Etienne Lesot {@literal }
 */
public class TemporaryLimitData {

    private final String id;
    private final String name;
    private final LimitType type;
    private final Side side;
    private final IdentifiableType elementType;
    private final double value;
    private final int acceptableDuration;
    private final boolean isFictitious;
    private final String groupId;
    private final boolean selected;

    public enum Side {
        NONE,
        ONE,
        TWO,
        THREE
    }

    public TemporaryLimitData(String id, String name, Side side, double value, LimitType type, IdentifiableType elementType,
                              int acceptableDuration, boolean isFictitious, String groupId, boolean selected) {
        this.id = Objects.requireNonNull(id);
        this.name = Objects.requireNonNull(name);
        this.side = side;
        this.type = Objects.requireNonNull(type);
        this.elementType = Objects.requireNonNull(elementType);
        this.value = value;
        this.acceptableDuration = acceptableDuration;
        this.isFictitious = isFictitious;
        this.groupId = Objects.requireNonNull(groupId);
        this.selected = selected;
    }

    public TemporaryLimitData(String id, String name, Side side, double value, LimitType type, IdentifiableType elementType,
                              String groupId, boolean isSelected) {
        this(id, name, side, value, type, elementType, -1, false, groupId, isSelected);
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public double getValue() {
        return value;
    }

    public int getAcceptableDuration() {
        return acceptableDuration;
    }

    public Side getSide() {
        return side;
    }

    public IdentifiableType getElementType() {
        return elementType;
    }

    public LimitType getType() {
        return type;
    }

    public boolean isFictitious() {
        return isFictitious;
    }

    public String getGroupId() {
        return groupId;
    }

    public boolean isSelected() {
        return selected;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy