Package com.powsybl.sensitivity
Class SensitivityAnalysisResult
- java.lang.Object
-
- com.powsybl.sensitivity.SensitivityAnalysisResult
-
public class SensitivityAnalysisResult extends Object
Sensitivity analysis resultMainly composed of the lists of sensitivity values in N, and optionally in N-1
A single sensitivity analysis should return, besides its status and some stats on the analysis itself, all the sensitivity values for each factor (combination of a monitoredBranch and a specific equipment or group of equipments). The HADES2 sensitivity provider used with Powsybl offers the possibility to calculate the sensitivity on a set of contingencies besides the N state. The analysis is launched only once, but the solver itself modifies the matrix for each state of the network to output a full set of results. In the sensitivity API, it has been allowed to provide a list of contingencies as an optional input, which then triggers such a sensitivity analysis. The full set of results consists of : - the list of sensitivity values in N - the lists of sensitivity values for each N-1 situation - some metadata (status, stats, logs)- Author:
- Sebastien Murgey <sebastien.murgey at rte-france.com>
- See Also:
SensitivityValue
-
-
Constructor Summary
Constructors Constructor Description SensitivityAnalysisResult(boolean ok, Map<String,String> metrics, String logs, List<SensitivityValue> sensitivityValues)
SensitivityAnalysisResult(boolean ok, Map<String,String> metrics, String logs, List<SensitivityValue> sensitivityValues, Map<String,List<SensitivityValue>> sensitivityValuesContingencies)
Hades2 sensitivity analysis result
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contingenciesArePresent()
Get the status of the presence of contingenciesstatic SensitivityAnalysisResult
empty()
String
getLogs()
Get analysis logs.Map<String,String>
getMetrics()
Get some metrics about analysis execution.SensitivityValue
getSensitivityValue(SensitivityFactor factor)
Get the sensitivity value associated with given factor in state N.SensitivityValue
getSensitivityValue(SensitivityFactor factor, String contingencyId)
Get the sensitivity value associated with given factor for a specific contingencySensitivityValue
getSensitivityValue(SensitivityFunction function, SensitivityVariable variable)
Get the sensitivity value associated with given function and given variable in state N.SensitivityValue
getSensitivityValue(SensitivityFunction function, SensitivityVariable variable, String contingencyId)
Get the sensitivity value associated with given function and given variable for a specific contingency.Collection<SensitivityValue>
getSensitivityValues()
Get a collection of all the sensitivity values in state N.Collection<SensitivityValue>
getSensitivityValuesByFunction(SensitivityFunction function)
Get a collection of all the sensitivity values associated with given function in state N.Collection<SensitivityValue>
getSensitivityValuesByFunction(SensitivityFunction function, String contingencyId)
Get a collection of all the sensitivity values associated with given function for a specific contingency.Collection<SensitivityValue>
getSensitivityValuesByVariable(SensitivityVariable variable)
Get a collection of all the sensitivity values associated with given variable in state N.Collection<SensitivityValue>
getSensitivityValuesByVariable(SensitivityVariable variable, String contingencyId)
Get a collection of all the sensitivity values associated with given variable for a specific contingency.Map<String,List<SensitivityValue>>
getSensitivityValuesContingencies()
Get a collection of all the sensitivity values for all contingencies.boolean
isOk()
Get the status of the sensitivity analysis
-
-
-
Constructor Detail
-
SensitivityAnalysisResult
public SensitivityAnalysisResult(boolean ok, Map<String,String> metrics, String logs, List<SensitivityValue> sensitivityValues, Map<String,List<SensitivityValue>> sensitivityValuesContingencies)
Hades2 sensitivity analysis result- Parameters:
ok
- true if the analysis succeeded, false otherwisemetrics
- map of metrics about the analysislogs
- analysis logssensitivityValues
- result values of the sensitivity analysis in NsensitivityValuesContingencies
- result values of the sensitivity analysis on contingencies
-
-
Method Detail
-
isOk
public boolean isOk()
Get the status of the sensitivity analysis- Returns:
- true if the analysis is ok, false otherwise
-
getMetrics
public Map<String,String> getMetrics()
Get some metrics about analysis execution. Content may vary a lot depending of the implementation- Returns:
- the metrics of the execution
-
getLogs
public String getLogs()
Get analysis logs.- Returns:
- the analysis logs
-
getSensitivityValues
public Collection<SensitivityValue> getSensitivityValues()
Get a collection of all the sensitivity values in state N.- Returns:
- a collection of all the sensitivity values in state N.
-
getSensitivityValuesByFunction
public Collection<SensitivityValue> getSensitivityValuesByFunction(SensitivityFunction function)
Get a collection of all the sensitivity values associated with given function in state N.- Parameters:
function
- sensitivity function- Returns:
- a collection of all the sensitivity values associated with given function in state N.
-
getSensitivityValuesByVariable
public Collection<SensitivityValue> getSensitivityValuesByVariable(SensitivityVariable variable)
Get a collection of all the sensitivity values associated with given variable in state N.- Parameters:
variable
- sensitivity variable- Returns:
- a collection of all the sensitivity values associated with given variable in state N.
-
getSensitivityValue
public SensitivityValue getSensitivityValue(SensitivityFunction function, SensitivityVariable variable)
Get the sensitivity value associated with given function and given variable in state N.- Parameters:
function
- sensitivity functionvariable
- sensitivity variable- Returns:
- the sensitivity value associated with given function and given variable in state N.
-
getSensitivityValue
public SensitivityValue getSensitivityValue(SensitivityFactor factor)
Get the sensitivity value associated with given factor in state N.- Parameters:
factor
- sensitivity factor- Returns:
- the sensitivity value associated with given function and given variable in state N.
-
contingenciesArePresent
public boolean contingenciesArePresent()
Get the status of the presence of contingencies- Returns:
- true if the analysis contains contingencies, false otherwise
-
getSensitivityValuesContingencies
public Map<String,List<SensitivityValue>> getSensitivityValuesContingencies()
Get a collection of all the sensitivity values for all contingencies.- Returns:
- a collection of all the sensitivity values for all contingencies.
-
getSensitivityValuesByFunction
public Collection<SensitivityValue> getSensitivityValuesByFunction(SensitivityFunction function, String contingencyId)
Get a collection of all the sensitivity values associated with given function for a specific contingency.- Parameters:
function
- sensitivity functioncontingencyId
- the ID of the considered contingency- Returns:
- a collection of all the sensitivity values associated with given function for the given contingencyId
-
getSensitivityValuesByVariable
public Collection<SensitivityValue> getSensitivityValuesByVariable(SensitivityVariable variable, String contingencyId)
Get a collection of all the sensitivity values associated with given variable for a specific contingency.- Parameters:
variable
- sensitivity variablecontingencyId
- the ID of the considered contingency- Returns:
- a collection of all the sensitivity values associated with given variable
-
getSensitivityValue
public SensitivityValue getSensitivityValue(SensitivityFunction function, SensitivityVariable variable, String contingencyId)
Get the sensitivity value associated with given function and given variable for a specific contingency.- Parameters:
function
- sensitivity functionvariable
- sensitivity variablecontingencyId
- the ID of the considered contingency- Returns:
- the sensitivity value associated with given function and given variable
-
getSensitivityValue
public SensitivityValue getSensitivityValue(SensitivityFactor factor, String contingencyId)
Get the sensitivity value associated with given factor for a specific contingency- Parameters:
factor
- sensitivity factorcontingencyId
- the ID of the considered contingency- Returns:
- the sensitivity value associated with given function and given variable
-
empty
public static SensitivityAnalysisResult empty()
-
-