Package com.powsybl.sensitivity
Class SensitivityAnalysisResult
- java.lang.Object
-
- com.powsybl.sensitivity.SensitivityAnalysisResult
-
public class SensitivityAnalysisResult extends Object
Sensitivity analysis resultComposed of a list of sensitivity values in pre-contingency and post-contingency states.
Sensitivity analysis is used to assess the impact of a small modification of a network variables on the value of network functions. A combination of a variable and a function is called a sensitivity factor. It returns the sensitivity values for each factor, and the reference values for each function. The sensitivity analysis API offers the possibility to calculate the sensitivities on a set of contingencies besides the pre-contingency state. The full set of results consists of: - the list of factors - the list of contingencies and their associated computation status - the list of sensitivity values in pre-contingency and post-contingency states - the list of function reference values in pre-contingency and post-contingency states. A sensitivity analysis result offers a set of methods to retrieve sensitivity values or function reference values. For example, you can retrieve a sensitivity value as a double given the ID of a contingency, the ID of a variable and the ID of a function.- Author:
- Geoffroy Jamgotchian
- See Also:
SensitivityValue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SensitivityAnalysisResult.SensitivityContingencyStatus
static class
SensitivityAnalysisResult.Status
-
Constructor Summary
Constructors Constructor Description SensitivityAnalysisResult(List<SensitivityFactor> factors, List<SensitivityAnalysisResult.SensitivityContingencyStatus> contingencyStatuses, List<SensitivityValue> values)
Sensitivity analysis result
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBranchCurrent1FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_1 in a pre-contingency state.double
getBranchCurrent1FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_1.double
getBranchCurrent1SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_1.double
getBranchCurrent1SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_1.double
getBranchCurrent2FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_2 in a pre-contingency state.double
getBranchCurrent2FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_2.double
getBranchCurrent2SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_2.double
getBranchCurrent2SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_2.double
getBranchCurrent3FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_3 in a pre-contingency state.double
getBranchCurrent3FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_3.double
getBranchCurrent3SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_3.double
getBranchCurrent3SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_3.double
getBranchFlow1FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_1 in a pre-contingency state.double
getBranchFlow1FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_1.double
getBranchFlow1SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_1.double
getBranchFlow1SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_1.double
getBranchFlow2FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_2 in a pre-contingency state.double
getBranchFlow2FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_2.double
getBranchFlow2SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_2.double
getBranchFlow2SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_2.double
getBranchFlow3FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_3 in a pre-contingency state.double
getBranchFlow3FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_3.double
getBranchFlow3SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_3.double
getBranchFlow3SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_3.double
getBusVoltageFunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BUS_VOLTAGE in a pre-contingency state.double
getBusVoltageFunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BUS_VOLTAGE.double
getBusVoltageSensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BUS_VOLTAGE.double
getBusVoltageSensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BUS_VOLTAGE.SensitivityAnalysisResult.Status
getContingencyStatus(String contingencyId)
Get the status associated to a contingency idList<SensitivityAnalysisResult.SensitivityContingencyStatus>
getContingencyStatuses()
Get a list of all the contingency statuses.List<SensitivityFactor>
getFactors()
Get a list of all the sensitivity factors.double
getFunctionReferenceValue(String functionId, SensitivityFunctionType functionType)
Get the function reference associated to a given function id and type in a pre-contingency state.double
getFunctionReferenceValue(String contingencyId, String functionId, SensitivityFunctionType functionType)
Get the function reference associated to a given contingency Id and a given function id and type.List<SensitivityValue>
getPreContingencyValues()
Get a list of all the pre-contingency sensitivity values.double
getSensitivityValue(String variableId, String functionId, SensitivityFunctionType functionType, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and type and a given variable in pre-contingency state.double
getSensitivityValue(String contingencyId, String variableId, String functionId, SensitivityFunctionType functionType, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and type and a given variable and for a specific contingency.List<SensitivityValue>
getValues()
Get a list of all the sensitivity values.List<SensitivityValue>
getValues(String contingencyId)
Get a list of sensitivity value associated to a given contingency id
-
-
-
Constructor Detail
-
SensitivityAnalysisResult
public SensitivityAnalysisResult(List<SensitivityFactor> factors, List<SensitivityAnalysisResult.SensitivityContingencyStatus> contingencyStatuses, List<SensitivityValue> values)
Sensitivity analysis result- Parameters:
factors
- the list of sensitivity factors that have been computed.contingencyStatuses
- the list of contingencies and their associated computation status.values
- result values of the sensitivity analysis in pre-contingency state and post-contingency states.
-
-
Method Detail
-
getFactors
public List<SensitivityFactor> getFactors()
Get a list of all the sensitivity factors.- Returns:
- a list of all the sensitivity factors.
-
getContingencyStatuses
public List<SensitivityAnalysisResult.SensitivityContingencyStatus> getContingencyStatuses()
Get a list of all the contingency statuses.- Returns:
- a list of all the contingency statuses.
-
getValues
public List<SensitivityValue> getValues()
Get a list of all the sensitivity values.- Returns:
- a list of all the sensitivity values.
-
getValues
public List<SensitivityValue> getValues(String contingencyId)
Get a list of sensitivity value associated to a given contingency id- Parameters:
contingencyId
- the ID of the considered contingency. Use null to get pre-contingency sensitivity values.- Returns:
- the sensitivity value associated to a given contingency ID.
-
getPreContingencyValues
public List<SensitivityValue> getPreContingencyValues()
Get a list of all the pre-contingency sensitivity values.- Returns:
- a list of all the pre-contingency sensitivity values.
-
getSensitivityValue
public double getSensitivityValue(String contingencyId, String variableId, String functionId, SensitivityFunctionType functionType, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and type and a given variable and for a specific contingency.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.functionType
- the sensitivity function type.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchFlow1SensitivityValue
public double getBranchFlow1SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_1.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchFlow2SensitivityValue
public double getBranchFlow2SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_2.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchFlow3SensitivityValue
public double getBranchFlow3SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_ACTIVE_POWER_3.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchCurrent1SensitivityValue
public double getBranchCurrent1SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_1.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchCurrent2SensitivityValue
public double getBranchCurrent2SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_2.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBranchCurrent3SensitivityValue
public double getBranchCurrent3SensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BRANCH_CURRENT_3.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getBusVoltageSensitivityValue
public double getBusVoltageSensitivityValue(String contingencyId, String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and a given variable and for a specific contingency for function type BUS_VOLTAGE.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency sensitivity value.variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable for a given contingency.
-
getSensitivityValue
public double getSensitivityValue(String variableId, String functionId, SensitivityFunctionType functionType, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function id and type and a given variable in pre-contingency state.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.functionType
- sensitivity function type- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchFlow1SensitivityValue
public double getBranchFlow1SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_1.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchFlow2SensitivityValue
public double getBranchFlow2SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_2.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchFlow3SensitivityValue
public double getBranchFlow3SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_ACTIVE_POWER_3.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchCurrent1SensitivityValue
public double getBranchCurrent1SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_1.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchCurrent2SensitivityValue
public double getBranchCurrent2SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_2.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBranchCurrent3SensitivityValue
public double getBranchCurrent3SensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BRANCH_CURRENT_3.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getBusVoltageSensitivityValue
public double getBusVoltageSensitivityValue(String variableId, String functionId, SensitivityVariableType variableType)
Get the sensitivity value associated to a given function and a given variable in pre-contingency state for function type BUS_VOLTAGE.- Parameters:
variableId
- the sensitivity variable id.functionId
- the sensitivity function id.- Returns:
- the sensitivity value associated with a given function and a given variable in pre-contingency state.
-
getFunctionReferenceValue
public double getFunctionReferenceValue(String contingencyId, String functionId, SensitivityFunctionType functionType)
Get the function reference associated to a given contingency Id and a given function id and type.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.functionType
- sensitivity function type- Returns:
- the function reference value
-
getBranchFlow1FunctionReferenceValue
public double getBranchFlow1FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_1.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBranchFlow2FunctionReferenceValue
public double getBranchFlow2FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_2.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBranchFlow3FunctionReferenceValue
public double getBranchFlow3FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_ACTIVE_POWER_3.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBranchCurrent1FunctionReferenceValue
public double getBranchCurrent1FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_1.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBranchCurrent2FunctionReferenceValue
public double getBranchCurrent2FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_2.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBranchCurrent3FunctionReferenceValue
public double getBranchCurrent3FunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BRANCH_CURRENT_3.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getBusVoltageFunctionReferenceValue
public double getBusVoltageFunctionReferenceValue(String contingencyId, String functionId)
Get the function reference associated to a given contingency Id and a given function id and function type BUS_VOLTAGE.- Parameters:
contingencyId
- the id of the considered contingency. Use null to get a pre-contingency function reference value.functionId
- sensitivity function id.- Returns:
- the function reference value
-
getFunctionReferenceValue
public double getFunctionReferenceValue(String functionId, SensitivityFunctionType functionType)
Get the function reference associated to a given function id and type in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.functionType
- sensitivity function type- Returns:
- the function reference value.
-
getBranchFlow1FunctionReferenceValue
public double getBranchFlow1FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_1 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBranchFlow2FunctionReferenceValue
public double getBranchFlow2FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_2 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBranchFlow3FunctionReferenceValue
public double getBranchFlow3FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_ACTIVE_POWER_3 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBranchCurrent1FunctionReferenceValue
public double getBranchCurrent1FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_1 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBranchCurrent2FunctionReferenceValue
public double getBranchCurrent2FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_2 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBranchCurrent3FunctionReferenceValue
public double getBranchCurrent3FunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BRANCH_CURRENT_3 in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getBusVoltageFunctionReferenceValue
public double getBusVoltageFunctionReferenceValue(String functionId)
Get the function reference associated to a given function and function type BUS_VOLTAGE in a pre-contingency state.- Parameters:
functionId
- sensitivity function id.- Returns:
- the function reference value.
-
getContingencyStatus
public SensitivityAnalysisResult.Status getContingencyStatus(String contingencyId)
Get the status associated to a contingency id- Parameters:
contingencyId
- The contingency id- Returns:
- The associated status.
-
-