com.farao_community.farao.ra_optimisation.RaoComputationResult Maven / Gradle / Ivy
/*
* Copyright (c) 2018, 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.ra_optimisation;
import com.powsybl.commons.extensions.AbstractExtendable;
import java.beans.ConstructorProperties;
import java.util.ArrayList;
import java.util.List;
/**
* @author Mohamed Zelmat {@literal }
*/
public class RaoComputationResult extends AbstractExtendable {
public enum Status {
FAILURE,
SUCCESS
}
private final Status status;
private final PreContingencyResult preContingencyResult;
private final List contingencyResults;
public RaoComputationResult(final Status status) {
this.status = status;
this.preContingencyResult = new PreContingencyResult();
this.contingencyResults = new ArrayList<>();
}
public RaoComputationResult(final Status status, final PreContingencyResult preContingencyResult) {
this.status = status;
this.preContingencyResult = preContingencyResult;
this.contingencyResults = new ArrayList<>();
}
@ConstructorProperties({"status", "preContingencyResult", "contingencyResults"})
public RaoComputationResult(
final Status status,
final PreContingencyResult preContingencyResult,
final List contingencyResults) {
this.status = status;
this.preContingencyResult = preContingencyResult;
this.contingencyResults = contingencyResults;
}
public Status getStatus() {
return status;
}
public PreContingencyResult getPreContingencyResult() {
return preContingencyResult;
}
public List getContingencyResults() {
return contingencyResults;
}
public void addContingencyResult(ContingencyResult contingencyResult) {
contingencyResults.add(contingencyResult);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy