FBDomainPlots

Classes

FBDomainPlots(data, flowbased_parameters)

Create FB domain plots based on flowbased paramters.

FBDomain(domain_information, ...)

Individual FB Domain plot.

class pomato.visualization.FBDomainPlots(data, flowbased_parameters)

Create FB domain plots based on flowbased paramters.

This module creates 2D plots of the flow based domain, derived from the FB paramterters created by create_flowbased_parameters().

The FB parameters are zonal PTDF and RAMs for each timestep, the number of zones defines the width of the matrix, the length is determined by the number of lines defined as cb (critical branch) and co (critical outages).

To create a 2D plot, the x and y axis represent commercial exchange between two market areas, thereby the whole system remains balanced for each point in the graph. The methods create the necessary data for each domain plot and stores them as an instance of the FBDomain in the fbmc_plots attribute.

Parameters:
wdirpathlib.Path

POMATO working directory.

dataDataManagement

Instance of POMATO data management.

flowbased_parameterspd.DataFrame

FB parameters, as derived from FBMCModule.

Methods

zonal_ptdf_projection(domain_x, domain_y, A)

The zonal PTDF has to be projected into 2D to be visualized as a domain plot.

create_domain_plot(A, b, indices[, plot_limits])

Create linear equations of the FB domain.

create_feasible_region_vertices(A, b)

Calculate vertices of the FB domain feasible region.

generate_flowbased_domains(domain_x, domain_y)

Create FB domains for all timesteps of the supplied FB parameters.

generate_flowbased_domain(domain_x, ...[, ...])

Create FB Domain for specified zones and timesteps.

create_domain_plot(A, b, indices, plot_limits=None)

Create linear equations of the FB domain.

Create 2D equation from the 2D projection of the zonal PTDF, suitable to for a line plot in the form axis.plot(plot_equations[i][0], plot_equations[i][1]) for each linear inequation that represents a specific line under contingency.

The indices represent a subset of equations to be plottet if the size of A is too high.

Parameters:
Anp.array Projected zonal PTDF with width 2. bnp.array Vector of RAMs indices :

list-like List of indices that compose the domain plot.

Returns:
plot_equationslist of [[x1;x2],[y1;y2]] Each plot consists of two x and y coordinates.
create_feasible_region_vertices(A, b)

Calculate vertices of the FB domain feasible region.

To plot the feasible region of the domain, this method find all vertices linear inequalities A x <= b that make up the domain and sorts them clockwise.

Parameters:
Anp.array,

2-dimensional projection of zonal PTDF.

bnp.array

Vector of RAMs.

Returns:
verticesarray

Vertices in a CBCO x 2 array.

generate_flowbased_domain(domain_x, domain_y, timestep, result=None, shift2MCP=True, include_cc_margin=True, title=None, plot_limits=None, filename_suffix=None)

Create FB Domain for specified zones and timesteps.

Parameters:
domain_x2-element, list-like

Two-element list-like of market areas whose commercial exchange is depicted on the x-axis, where positive values indicate a commercial exchange from element one to element two.

domain_y2-element, list-like

Analogue to domain_x, just for the y-axis of the 2 dimensional plot.

timestepstring,

Timestep for which the domain is generated.

result: :class:`~pomato.data.Results`,

Market Result to include model result information, e.g. MCP in domain plot or CC Margin.

shift2MCP: bool,

Shift Domain to market clearing point.

include_cc_margin: bool,

Include Chance Constraints in Domain Plot as CC Margin on FB constraints.

filename_suffixstring, optional

Optionally append to the resulting filename a suffix that makes it easier to identify when domains for more scenarios are created, by default None.

generate_flowbased_domains(domain_x, domain_y, filename_suffix=None, shift2MCP=True, timesteps=None)

Create FB domains for all timesteps of the supplied FB parameters.

This method is based on generate_flowbased_domain(), which create the domain plot for a specific timestep using the same arguments.

set_xy_limits_forall_plots()

For each fbmc plot object, set x and y limits

zonal_ptdf_projection(domain_x, domain_y, A)

The zonal PTDF has to be projected into 2D to be visualized as a domain plot.

The input matrix A is projected into 2D. The x,y axis represent commercial exchange between two market areas define in the domain_x and domain_y input arguments, therefore are net zero.

class pomato.visualization.FBDomain(domain_information, domain_equations, feasible_region_vertices, domain_data, volume)

Individual FB Domain plot.

This class bundles all data of an individual domain plot and the plotting functionality. It gets instantiated into the fbmc_plots of the FBDomainPlots

Parameters:
domain_informationdict

Dictionary with general domain information.

domain_equationsarray

Equations to be plottet in the domain.

feasible_region_verticesarray

Array of the domain’s feasible region vertices.

domain_datapandas.DataFrame

The raw data from which the plot is derived.