This is a wrapper for the more interesting parts of the electrical building blocks It creates both matrices as they almost always both need to be created and they take time so producing together is more efficient than producing each one on its own.

ImpPTDF(
  g,
  SlackRef,
  AZero,
  LineProperties,
  EdgeName = "Link",
  VertexName = "name",
  PTDF_only = FALSE
)

Arguments

g

An igraph object representing a power-grid

SlackRef

The slack node for the power-grid, A character vector

AZero

a matrix. This is created by the 'CreateTransmission' function

LineProperties

a matrix This is created by the LinePropertiesMatrix function

EdgeName

the variable that holds the edge names, a character string.

VertexName

the variable that holds the names of the nodes, to identify the slack ref. a character string

PTDF_only

Logical. This option shows whether the only the PTDF will be generated and is used in certain situations to increase speed

See also

attack_the_grid,CreateTransmission, LinePropertiesMatrix

Examples

g2 <-make_ego_graph(g, 2, "AXMI")[[1]]
#> Error in make_ego_graph(g, 2, "AXMI"): could not find function "make_ego_graph"
ImpPTDF(g, SlackRef)
#> Error in "igraph" %in% class(graph): object 'g' not found