Skip to contents

Package Documentation

windfarmGA_
windfarmGA

Run an Optimization

genetic_algorithm()
Run a Genetic Algorithm to optimize a wind farm layout

Genetic Algorithm Components

Main components of the genetic algorithm

init_population()
Create a random initial Population
selection()
Selection Method
fitness()
Evaluate the Individual Fitness values
crossover()
Crossover Method
mutation()
Mutation Method
trimton()
Adjust the amount of turbines per windfarm

Topographic Model

terrain_model()
Get topographic rasters

Wind Energy Calculation Functions

barometric_height()
Calculates Air Density, Air Pressure and Temperature according to the Barometric Height Formula
get_dist_angles()
Calculate distances and angles of possibly influencing turbines
turbine_influences()
Find potentially influencing turbines
calculate_energy()
Calculate Energy Outputs of Individuals
circle_intersection()
Get area of intersecting circles

Randomization

random_search()
Randomize the output of the Genetic Algorithm
random_search_single()
Randomize the location of a single turbine
plot_random_search()
Plot the result of a randomized output.

Plotting Functions

plot_cloud()
Plot outputs of all generations with standard deviations
plot_development()
Plot the progress of populations
plot_evolution()
Plot the evolution of fitness values
plot_fitness_evolution()
Plot the changes of min/mean/max fitness values
plot_leaflet()
Plot a wind warm with leaflet
plot_parkfitness()
Plot the genetic algorithm results
plot_random_search()
Plot the result of a randomized output.
plot_result()
Plot the best results
plot_viewshed()
Plot visibility
plot_windfarmGA()
Plot the results of an optimization run
plot_windrose()
Plot a Windrose

Viewshed Analysis Functions

plot_viewshed()
Plot visibility

Helper Functions

get_grids()
Get the Grid-IDs from binary matrix
grid_area()
Make a grid from a Simple Feature Polygon
hexa_area()
Polygon to Hexagonal Grids
windata_format()
Transform Winddata
isSpatial()
Transform to Simple Feature Polygons
permutations()
Enumerate the Combinations or Permutations of the Elements of a Vector
readinteger()
Check Input Crossover Method
readintegerSel()
Check Input Selection Method
splitAt()
Split matrices or numeric vectors at specific indices
is_foreach_installed() is_parallel_installed() is_doparallel_installed() is_ggplot2_installed() is_leaflet_installed() is_gstat_installed() is_elevatr_installed()
Is the package installed or not

Datasets

Results and Shapefiles included in the package.

resultrect
A resulting matrix of genetic_algorithm with 200 iterations and a rectangular grid derived from sp_polygon
resulthex
A resulting matrix of genetic_algorithm with 10 iterations and a hexagonal grid derived from sp_polygon
sp_polygon
The rectangular POLYGON used to create resultrect & resulthex
big_shape
A POLYGON with an area of ~70 km2
hole_shape
A POLYGON with a hole
multi_shape
A MULTIPOLYGON with 3 Polygons