PlotResult {wflo} | R Documentation |
Visualizes the wind farm layout optimization result.
Description
This function draws the adjusted yields of the wind farm under investigation using image
, superimposes a contour plot using contour
and arrows for the wind directions using ImposeVectorField
and then draws the points for the turbines' locations (aligned to their respective raster grid centers).
Usage
PlotResult(Result, ImageData = NULL, DoLabels = FALSE, Labels = "IDs")
Arguments
Result |
must be an optimization result as returned by an optimizer such as |
ImageData |
a matrix containing the data for the background, processed via |
DoLabels |
a boolean that indicates whether labels should be plotted next to the points. Defaults to FALSE. |
Labels |
a vector of length n = N / 2, can be numeric values or strings. Defines the labels to be shown if |
Details
For maximum convenience and compatibility with numeric optimizers of most kinds, this function expects nothing but the usual optimization result list
. This, however, requires that the FarmData
dataset as well as the FarmVars
object is present defining additional settings.
Value
PlotResult
returns nothing.
Author(s)
Carsten Croonenbroeck
See Also
Use Profit
to obtain an optimization result.
Examples
#Will not provide a very good result
NumTurbines <- 4
set.seed(1357)
Result <- optim(par = runif(NumTurbines * 2), fn = Profit,
method = "L-BFGS-B", lower = rep(0, NumTurbines * 2),
upper = rep(1, NumTurbines * 2))
Result
PlotResult(Result)