Class SensitivityAnalysisResult


  • public class SensitivityAnalysisResult
    extends Object
    Sensitivity analysis result

    Mainly 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 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 otherwise
        metrics - map of metrics about the analysis
        logs - analysis logs
        sensitivityValues - result values of the sensitivity analysis in N
        sensitivityValuesContingencies - 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 function
        variable - 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 function
        contingencyId - 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 variable
        contingencyId - 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 function
        variable - sensitivity variable
        contingencyId - 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 factor
        contingencyId - the ID of the considered contingency
        Returns:
        the sensitivity value associated with given function and given variable