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

set_default_provider

Set the default sensitivity analysis provider

get_default_provider

Get the current default sensitivity analysis provider.

get_provider_names

Get list of supported provider names

Parameters

The execution of the sensitivity analysis can be customized using sensitivity analysis parameters.

Parameters

Parameters for a sensitivity analysis execution.

get_provider_parameters_names

Get list of parameters for the specified sensitivity analysis provider.

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.add_branch_flow_factor_matrix

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

SensitivityAnalysis.add_precontingency_branch_flow_factor_matrix

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

SensitivityAnalysis.add_postcontingency_branch_flow_factor_matrix

Defines branch active power flow factor matrix for specific post contingencies states, with a list of branches IDs and a list of variables.

AcSensitivityAnalysis.set_bus_voltage_factor_matrix

Defines buses voltage sensitivities to be computed.

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

create_zone_from_injections_and_shift_keys

Create country zone with custom generator name and shift keys :param country: Identifier of the zone :param injection_index: IDs of the injection :param shift_keys: shift keys for the generators

create_zones_from_glsk_file

Create country zones from glsk file for a given datetime :param glsk_file: UCTE glsk file :param instant: timepoint at which to select glsk data

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 post contingency state.

DcSensitivityAnalysisResult.get_reference_flows

The branches active power flows on the base case or on post contingency state.

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 post contingency state.

AcSensitivityAnalysisResult.get_reference_voltages

The values of bus voltages on the base case or on post contingency state.

GLSK UCTE file loading

UCTE GLSK files can be loaded using glsk.load and GLSKDocument, data can be used for zone creation.

load

Loads a GLSK file.

GLSKDocument

Result of GLSK file parsing, provides access to underlying data.

GLSKDocument.get_gsk_time_interval_start

GLSKDocument.get_gsk_time_interval_end

GLSKDocument.get_countries

GLSKDocument.get_points_for_country

GLSKDocument.get_glsk_factors