plot_result: Plot the best results

View source: R/plots.R

plot_resultR Documentation

Plot the best results

Description

Draw the best layout(s) on the site. Turbine labels are the total wake in percent. Default is the single best energy layout.

Usage

plot_result(
  result,
  area,
  best = 1,
  plot_en = 1,
  terrain = FALSE,
  plot_grid = TRUE,
  ccl_roughness = NULL,
  ccl = NULL,
  weibull_src = NULL
)

Arguments

result

The output of genetic_algorithm

area

Site polygon (sf, SpatialPolygons, or coordinate matrix). Must be projected in metres.

best

How many distinct best layouts to draw. Default is 1.

plot_en

A numeric value that indicates if the best energy or efficiency output should be plotted. 1 plots the best energy solutions and 2 plots the best efficiency solutions

terrain

Draw terrain rasters for the best layout. Reuses result$terrainModel when present; TRUE downloads only if nothing is stored. A DEM raster rebuilds the model.

plot_grid

If TRUE (default) the used grid is added. You can also pass another Simple Feature object

ccl_roughness

Path to the CLC legend CSV (Rauhigkeit_z column).

ccl

Path to a Corine Land Cover raster when terrain is on.

weibull_src

list(k, a) shape and scale rasters (e.g. Global Wind Atlas combined-Weibull-k / combined-Weibull-A).

Value

Returns a data.frame of the best (energy/efficiency) individual during all iterations

See Also

Other Plotting Functions: generation_layouts(), plot_cell_heatmap(), plot_cloud(), plot_development(), plot_evolution(), plot_generation(), plot_parkfitness(), plot_population(), plot_windfarmGA(), plot_windrose(), population_census(), random_search_single()

Examples

## Not run: 
## Add some data examples from the package
library(sf)
area <- sf::st_as_sf(sf::st_sfc(
  sf::st_polygon(list(cbind(
    c(4498482, 4498482, 4499991, 4499991, 4498482),
    c(2668272, 2669343, 2669343, 2668272, 2668272)
  ))),
  crs = 3035
))

## Plot the results of a hexagonal grid optimization
plot_result(resulthex, area, best = 1, plot_en = 1, terrain = FALSE)

## Plot the results of a rectangular grid optimization
plot_result(resultrect, area, best = 1, plot_en = 1, terrain = FALSE)

## End(Not run)

windfarmGA documentation built on Sept. 14, 2026, 9:08 a.m.