evalInter: Evaluate the shared volume of two polyhedra A and B

View source: R/getIntersectionLinesHyperplanes.R

evalInterR Documentation

Evaluate the shared volume of two polyhedra A and B

Description

This function returns and indicator between 0 and 1 where 0 means the intersection between A and B is empty and 1 means A == B. Since there is no fast metric to compute the volume of a polyhedron in high dimension, this indicator is computed by generating n points in a n-dimensonal space doing the ratio of the points in the two polyhedra and the points in at least one of the polyhedra.

Usage

evalInter(
  A,
  B,
  nbPoints = 50000,
  seed = 123456,
  draw_range = c(-15000, 15000),
  other_ranges = NULL,
  direction = NULL,
  remove_last_ptdf = T,
  uniform_volume_draw = FALSE
)

Arguments

A

data.table, fix polyhedron, data.table containing at least two ptdf columns :

  • ptdfAT : autrichian vertices

  • ptdfBE : belgium vertices

  • ptdfDE : german vertices

  • ptdfFR : french vertices

B

data.table, moving polyhedron, data.table containing at least two ptdf columns :

  • ptdfAT : autrichian vertices

  • ptdfBE : belgium vertices

  • ptdfDE : german vertices

  • ptdfFR : french vertices

nbPoints

numeric, number of points generated

seed

numeric fixed random seed, used for the weighted draw of the typical days. By default, the value is 123456

draw_range

The range in which the points for the volume assessment should be drawn

other_ranges

list Specify a named list of areas with a specific draw range. Each element of the list contains a vector indicating the draw range for the corresponding area.

direction

data.table used to provide specific directions in which the comparison should be performed. The data table must contain two columns:

  • a column "country" containing the names of the countries on which a direction is specified

  • a column "direction" containing a string which can be either "positive" to specify that only positive net positions must be considered for this country, or "negative" if only negative net positions must be considered

remove_last_ptdf

boolean Should the last PTDF be used as a hubdrop for the others?

uniform_volume_draw

boolean Should the volume evaluation be performed based on a uniform point draw?

Examples

## Not run: 
library(data.table)
polyhedra <- readRDS(system.file("testdata/polyhedra.rds", package = "fbAntares"))
A <- polyhedra[Date == "2019-02-14"]
B <- polyhedra[Date == "2019-02-15"]
nbPoints <- 50000

 evalInter(A = A, B = B, nbPoints = nbPoints)

## End(Not run)


rte-antares-rpackage/fbAntares documentation built on June 1, 2022, 6:20 p.m.