Learn R Programming

windfarmGA (version 2.2.3)

plot_windfarmGA: Plot the results of an optimization run

Description

Plot the results of a genetic algorithm run with given inputs. Several plots try to show all relevant effects and outcomes of the algorithm. 6 plot methods are available that can be selected individually.

Usage

plot_windfarmGA(result, Polygon1, GridMethod = "r", whichPl = "all",
  best = 1, plotEn = 1, Projection, weibullsrc)

Arguments

result

The output of windfarmGA or genetic_algorithm

Polygon1

The area as shapefile.

GridMethod

Which grid spacing method was used. Default is "rectangular". If hexagonal grid cells were used, assign any of the following arguments: "h","hexa", "hexagonal"

whichPl

Which plots should be shown: 1-6 are possible. The default is "all" which shows all available plots

best

A numeric value indicating how many of the best individuals should be plotted

plotEn

A numeric value that indicates if the best energy or efficiency output is plotted. If (plotEn==1) plots the best energy solutions and (plotEn==2) plots the best efficiency solutions

Projection

A desired Projection can be used instead of the default Lambert Azimuthal Equal Area Projection

weibullsrc

A list of Weibull parameter rasters, where the first list item must be the shape parameter raster `k` and the second item must be the scale parameter raster `a` of the Weibull distribution. If no list is given, then rasters included in the package are used instead, which currently only cover Austria.

See Also

Other Plotting Functions: interpol_view, plot_cloud, plot_development, plot_evolution, plot_fitness_evolution, plot_heatmap, plot_parkfitness, plot_result, plot_viewshed, plot_windrose, random_search_single

Examples

Run this code
# NOT RUN {
library(sp)
## Add some data examples from the package
load(file = system.file("extdata/resultrect.rda", package = "windfarmGA"))
load(file = system.file("extdata/resulthex.rda", package = "windfarmGA"))
load(file = system.file("extdata/polygon.rda", package = "windfarmGA"))

## Plot the results of a hexagonal grid optimization
plot_windfarmGA(resulthex, GridMethod = "h", polygon, whichPl = "all", best = 1, plotEn = 1)

## Plot the results of a rectangular grid optimization
plot_windfarmGA(resultrect, GridMethod = "r", polygon, whichPl = "all", best = 1, plotEn = 1)
# }

Run the code above in your browser using DataLab