FBMCModule

class pomato.fbmc.FBMCModule(wdir, grid, data, options)

The FBMC module calculates FB parameters based on a suitable market result.

Flow based market coupling derives commercial exchange capacities for a day-ahead market clearing from a forecasted market results. These day ahead capacities are reported in a zonal PTDF matrix, representing the impact of changes in zonal net-position (NEX) on network elements under contingencies, together with the remaining capacity on these network elements (RAM, remaining available margin).

These are denoted as flow based paramters and represent the main output of this module.

Parameters:
wdirpathlib.Path

Working directory

grid_objectGridTopology

An instance of the DataManagement class with processed input data.

dataDataManagement

An instance of the DataManagement class with processed input data.

optionsdict

The options from POMATO main module.

Methods

create_gsk([option])

Returns static GSK.

create_dynamic_gsk(basecase, timestep)

Returns GSK based on the included basecase.

return_critical_branches([threshold, ...])

Returns Critical branches based on Zone-to-Zone ptdf.

create_base_fbmc_parameters(critical_branches)

Create the nodal ptdf for the FB paramters.

create_flowbased_parameters(basecase[, ...])

Create Flow-Based Paramters.

enforce_ntc_domain(fb_parameters)

Remove enforce domain to include NTC values

create_base_fbmc_parameters(critical_branches, lodf_sensitivity=0.1)

Create the nodal ptdf for the FB paramters.

Which lines are considered critical and their critical outages are independent from the basecase. Therefore the ptdf for all CBCOs are obtained once and used throughout this method.

The process is similar to create_filtered_n_1_ptdf(), for a list of CBs, that are obtained in return_critical_branches(), outages are selected based on a lodf threshold. The method returns the nodal ptdf Nodes x CBCOs matrix and a pd.DataFrame with all additional information.

Parameters:
critical_brancheslist-like,

Lines considered critical network elements, which are considered for the FB parameters.

lodf_sensitivityfloat, optional

The sensitivity defines the threshold from which outages are considered critical. A outage that can impact the lineflow, relative to its maximum capacity, more than the sensitivity is considered critical.

Returns:
nodal_fbmc_ptdfnumpy.array

nodal PTDF for each CBCO

fbmc_datapandas.DataFrame

The ptdf, together with all information, like CBCO, capacity, nodes.

create_dynamic_gsk(basecase, timestep)

Returns GSK based on the included basecase.

As the dynamic GSK depends on the generation schedule, it needs the timestep as input arguments

Parameters:
basecaseResult

The basecase, that is used for the calculation of the FB paramters.

timestepstring

Timestep, for which the GSK is calculated

Returns:
gskArray

A Zone X Node array that will yield a zonal ptdf when multiplied with the nodal ptdf.

create_flowbased_parameters(basecase, timesteps=None)

Create Flow-Based Paramters.

Creates the FB Paramters for the supplied basecase. Optional arguments are the GSK that is used during the process and whether the constraints are reduced to a minimal set.

For a specific timestep or over the full model horizon, the reference flow is calculated as the basecase flow minus the flow resulting from the DA market:

F_ref = F_basecase - F_DA

Where F_DA = PTDF*GSK*NEX, derives from the net position in the basecase. The RAM therefore represents the line capacity minus F_ref and additional security margins line FRM/FAV.

Depending on how the CBCOs are selected and the basecase is cleared, negative RAMs are possible, however for the purpose of market clearing, these have to positive.

This either indicates an error in the calculation or the need for relaxation via the minRAM option.

Parameters:
basecaseResults

Market resultsfrom which the FB paramters are deducted.

Returns:
fb_parameterspandas.DataFrame

Flow Based Parameters which are a zonal ptdf for each and ram, depending on the reference flows derived from the basecase for each timestep.

create_gsk(option='gmax')

Returns static GSK.

Input options are:
  • flat: for equal participation of each node to the NEX

  • gmax: for weighted participation proportional to the installed capacity of conventional generation.

Conventional generation is defined as generation which is not of plant type es or ts.

Parameters:
optionstr, optional

Options are flat or gmax, defaults to flat.

Returns:
gskArray

A Zone X Node array that will yield a zonal ptdf when multiplied with the nodal ptdf.

enforce_ntc_domain(fb_parameters)

Remove enforce domain to include NTC values

return_critical_branches(threshold=0.05, gsk_strategy='gmax', flowbased_region=None)

Returns Critical branches based on Zone-to-Zone ptdf.

In the calculation of FB parameters it makes sense to use only lines to constrain commercial exchange, that are actually affected by it. Otherwise, lines would be part of the FB domain that have no sensitivity towards the commercial exchange.

Lines are selected based on the Zone-to-Zone PTDF values. This is done to remove the slack dependencies of the nodal PTDF. The Zonal PTDF is calculated using the defined GSK strategy.

In addition to the CBs, crossborder lines are part of the set.

Parameters:
thresholdfloat, optional

Zone-to-Zone PTDF threshold, defaults to 5%.

gsk_strategystr, optional

GSK strategy, defaults to gmax.

only_crossborderstr, optional

Only consider cross-border lines as critical branches, defaults to False.

flowbased_regionlist-like, optional,

Specify a subset of zones that compose the flow based region. Default to all zones.

Returns
——-
CBslist

List of all critical branches, including all cross border lines.