com.powsybl.openrao.searchtreerao.result.impl.OptimizationResultImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of open-rao-search-tree-rao Show documentation
Show all versions of open-rao-search-tree-rao Show documentation
Implementation of search tree remedial action optimisation with modular approach
The newest version!
/*
* Copyright (c) 2024, 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.openrao.searchtreerao.result.impl;
import com.powsybl.iidm.network.TwoSides;
import com.powsybl.openrao.commons.Unit;
import com.powsybl.openrao.data.crac.api.Instant;
import com.powsybl.openrao.data.crac.api.State;
import com.powsybl.openrao.data.crac.api.cnec.FlowCnec;
import com.powsybl.openrao.data.crac.api.networkaction.NetworkAction;
import com.powsybl.openrao.data.crac.api.rangeaction.PstRangeAction;
import com.powsybl.openrao.data.crac.api.rangeaction.RangeAction;
import com.powsybl.openrao.data.raoresult.api.ComputationStatus;
import com.powsybl.openrao.searchtreerao.result.api.*;
import com.powsybl.sensitivity.SensitivityVariableSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Philippe Edwards {@literal }
*/
public class OptimizationResultImpl implements OptimizationResult {
private final ObjectiveFunctionResult objectiveFunctionResult;
private final FlowResult flowResult;
private final SensitivityResult sensitivityResult;
private final NetworkActionsResult networkActionsResult;
private final RangeActionActivationResult rangeActionActivationResult;
public OptimizationResultImpl(ObjectiveFunctionResult objectiveFunctionResult, FlowResult flowResult, SensitivityResult sensitivityResult, NetworkActionsResult networkActionsResult, RangeActionActivationResult rangeActionActivationResult) {
this.objectiveFunctionResult = objectiveFunctionResult;
this.flowResult = flowResult;
this.sensitivityResult = sensitivityResult;
this.networkActionsResult = networkActionsResult;
this.rangeActionActivationResult = rangeActionActivationResult;
}
@Override
public double getFlow(FlowCnec flowCnec, TwoSides side, Unit unit) {
return flowResult.getFlow(flowCnec, side, unit);
}
@Override
public double getFlow(FlowCnec flowCnec, TwoSides side, Unit unit, Instant optimizedInstant) {
return flowResult.getFlow(flowCnec, side, unit, optimizedInstant);
}
@Override
public double getMargin(FlowCnec flowCnec, Unit unit) {
return flowResult.getMargin(flowCnec, unit);
}
@Override
public double getCommercialFlow(FlowCnec flowCnec, TwoSides side, Unit unit) {
return flowResult.getCommercialFlow(flowCnec, side, unit);
}
@Override
public double getPtdfZonalSum(FlowCnec flowCnec, TwoSides side) {
return flowResult.getPtdfZonalSum(flowCnec, side);
}
@Override
public Map> getPtdfZonalSums() {
return flowResult.getPtdfZonalSums();
}
@Override
public boolean isActivated(NetworkAction networkAction) {
return networkActionsResult.isActivated(networkAction);
}
@Override
public Set getActivatedNetworkActions() {
return networkActionsResult.getActivatedNetworkActions();
}
@Override
public double getFunctionalCost() {
return objectiveFunctionResult.getFunctionalCost();
}
@Override
public List getMostLimitingElements(int number) {
return objectiveFunctionResult.getMostLimitingElements(number);
}
@Override
public double getVirtualCost() {
return objectiveFunctionResult.getVirtualCost();
}
@Override
public Set getVirtualCostNames() {
return objectiveFunctionResult.getVirtualCostNames();
}
@Override
public double getVirtualCost(String virtualCostName) {
return objectiveFunctionResult.getVirtualCost(virtualCostName);
}
@Override
public List getCostlyElements(String virtualCostName, int number) {
return objectiveFunctionResult.getCostlyElements(virtualCostName, number);
}
@Override
public void excludeContingencies(Set contingenciesToExclude) {
objectiveFunctionResult.excludeContingencies(contingenciesToExclude);
}
@Override
public Set> getRangeActions() {
return rangeActionActivationResult.getRangeActions();
}
@Override
public Set> getActivatedRangeActions(State state) {
return rangeActionActivationResult.getActivatedRangeActions(state);
}
@Override
public double getOptimizedSetpoint(RangeAction> rangeAction, State state) {
return rangeActionActivationResult.getOptimizedSetpoint(rangeAction, state);
}
@Override
public Map, Double> getOptimizedSetpointsOnState(State state) {
return rangeActionActivationResult.getOptimizedSetpointsOnState(state);
}
@Override
public double getSetPointVariation(RangeAction> rangeAction, State state) {
return rangeActionActivationResult.getSetPointVariation(rangeAction, state);
}
@Override
public int getOptimizedTap(PstRangeAction pstRangeAction, State state) {
return rangeActionActivationResult.getOptimizedTap(pstRangeAction, state);
}
@Override
public Map getOptimizedTapsOnState(State state) {
return rangeActionActivationResult.getOptimizedTapsOnState(state);
}
@Override
public int getTapVariation(PstRangeAction pstRangeAction, State state) {
return rangeActionActivationResult.getTapVariation(pstRangeAction, state);
}
@Override
public ComputationStatus getSensitivityStatus() {
return sensitivityResult.getSensitivityStatus();
}
@Override
public ComputationStatus getSensitivityStatus(State state) {
return sensitivityResult.getSensitivityStatus(state);
}
@Override
public Set getContingencies() {
return sensitivityResult.getContingencies();
}
@Override
public double getSensitivityValue(FlowCnec flowCnec, TwoSides side, RangeAction> rangeAction, Unit unit) {
return sensitivityResult.getSensitivityValue(flowCnec, side, rangeAction, unit);
}
@Override
public double getSensitivityValue(FlowCnec flowCnec, TwoSides side, SensitivityVariableSet linearGlsk, Unit unit) {
return sensitivityResult.getSensitivityValue(flowCnec, side, linearGlsk, unit);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy