Sensitivity analysis

The sensitivity analysis module allows to compute the impact of various variations (typically, generation variations), on other physical values on the network (typically, active power flows or currents on lines).

Run a sensitivity analysis

You can run an AC or DC security analysis using the following methods:

create_ac_analysis

Creates a new AC sensitivity analysis.

AcSensitivityAnalysis.run

Runs the sensitivity analysis

create_dc_analysis

Creates a new DC sensitivity analysis.

DcSensitivityAnalysis.run

Runs the sensitivity analysis

Contingencies definition

SensitivityAnalysis.add_single_element_contingency

Add one N-1 contingency.

SensitivityAnalysis.add_multiple_elements_contingency

Add one N-K contingency.

SensitivityAnalysis.add_single_element_contingencies

Add multiple N-1 contingencies.

Sensitivities definition

You can either define the sensitivities you want to compute by defining individual elements variations, or by defining zones.

In AC mode, you can define voltage sensitivities, in addition to flows sensitivities.

SensitivityAnalysis.set_branch_flow_factor_matrix

Defines branch active power flow factor matrix, with a list of branches IDs and a list of variables.

AcSensitivityAnalysis.set_bus_voltage_factor_matrix

Defines buses for which voltage sensitivities should be computed, and to which regulating equipments.

SensitivityAnalysis.set_zones

Define zones that will be used in branch flow factor matrix.

In order to create, inspect and manipulate zones, you can use the following methods:

create_empty_zone

create_country_zone

Zone

Zone.id

Zone.shift_keys_by_injections_ids

Zone.injections_ids

Zone.get_shift_key

Zone.add_injection

Zone.remove_injection

Zone.move_injection_to

ZoneKeyType

An enumeration.

Results

When the security analysis is completed, you can inspect its results:

DcSensitivityAnalysisResult

Represents the result of a DC sensitivity analysis.

DcSensitivityAnalysisResult.get_branch_flows_sensitivity_matrix

Get the matrix of branch flows sensitivities on the base case or on the post contingency state depending if a contingency ID has been provided.

DcSensitivityAnalysisResult.get_reference_flows

The branches active power flows on the base case or on the post contingency state depending if a contingency ID has been provided.

AcSensitivityAnalysisResult

Represents the result of a AC sensitivity analysis.

AcSensitivityAnalysisResult.get_bus_voltages_sensitivity_matrix

Get the matrix of bus voltages sensitivities on the base case or on the post contingency state depending if a contingency ID has been provided.

AcSensitivityAnalysisResult.get_reference_voltages

The values of bus voltages on the base case or on the post contingency state depending if a contingency ID has been provided.