PlotResult | R Documentation |
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).
PlotResult(Result, ImageData = NULL, DoLabels = FALSE, Labels = "IDs")
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 |
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.
PlotResult
returns nothing.
Carsten Croonenbroeck
Use Profit
to obtain an optimization result.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.