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

com.farao_community.farao.linear_rao.LinearRaoResult Maven / Gradle / Ivy

There is a newer version: 2.4.3
Show 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/.
 */

package com.farao_community.farao.linear_rao;

import com.farao_community.farao.rao_api.RaoResult;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.powsybl.commons.extensions.AbstractExtension;

/**
 * @author Viktor Terrier {@literal }
 */
public class LinearRaoResult extends AbstractExtension {

    public enum SystematicSensitivityAnalysisStatus {
        DEFAULT,
        FALLBACK,
        FAILURE
    }

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private SystematicSensitivityAnalysisStatus systematicSensitivityAnalysisStatus;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String errorMessage;

    @Override
    public String getName() {
        return "LinearRaoResult";
    }

    public SystematicSensitivityAnalysisStatus getSystematicSensitivityAnalysisStatus() {
        return systematicSensitivityAnalysisStatus;
    }

    public void setSystematicSensitivityAnalysisStatus(SystematicSensitivityAnalysisStatus systematicSensitivityAnalysisStatus) {
        this.systematicSensitivityAnalysisStatus = systematicSensitivityAnalysisStatus;
    }

    public void setSuccessfulSystematicSensitivityAnalysisStatus(boolean lastSensiIsFallback) {
        this.systematicSensitivityAnalysisStatus = lastSensiIsFallback ? SystematicSensitivityAnalysisStatus.FALLBACK : SystematicSensitivityAnalysisStatus.DEFAULT;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy