Learn R Programming

windfarmGA (version 2.3.0)

random_search: Randomize the output of the Genetic Algorithm

Description

Perform a random search in the grid cells, to further optimize the output of the wind farm layout.

Usage

random_search(result, Polygon1, n, best, Plot, GridMethod, max_dist = 2.2)

Arguments

result

The resulting matrix of the function genetic_algorithm or windfarmGA

Polygon1

The Polygon for the wind farm area.

n

The number of random searches to be performed. Default is 20.

best

Which best individuals should be the starting conditions for a random search. The default is 1.

Plot

Should the random search be plotted? Default is FALSE

GridMethod

Should the polygon be divided into rectangular or hexagonal grid cells? The default is rectangular grid cells and hexagonal grid cells are computed when assigning "h" or "hexagon" to this input variable. The randomly generated points might be placed outside their hexagons.

max_dist

A numeric value multiplied by the rotor radius to perform collision checks. Default is 2.2

Value

Returns a list.

See Also

Other Randomization: plot_random_search(), random_search_single()

Examples

Run this code
# NOT RUN {
load(file = system.file("extdata/resultrect.rda", package = "windfarmGA"))
load(file = system.file("extdata/polygon.rda", package = "windfarmGA"))

new <- random_search(resultrect, polygon, n = 20, best = 4)
plot_random_search(resultRS = new, result = resultrect, Polygon1 = polygon, best = 2)
# }

Run the code above in your browser using DataLab