plotPerformanceOAT {foreSIGHT}R Documentation

Plots performance for one-at-a-time (OAT) perturbations in attributes

Description

plotPerformanceOAT uses the system model performance calculated using the function runSystemModel and the summary of the simulation generated using the function generateScenarios & getSimSummary as input. The function creates line plots, each panel shows the variations in performance with perturbations in a single attribute. The function is intended for use with simulations with attributes perturbed on a one-at-a-time (OAT) grid.

Usage

plotPerformanceOAT(
  performance,
  sim,
  metric = NULL,
  topReps = NULL,
  col = NULL,
  ylim = NULL
)

Arguments

performance

a named list; contains the system model performance calculated using runSystemModel. If the list contains more than one performance metric, the first metric will be plotted.

sim

a list; a summary of a simulation containing the scenarios generated using the function generateScenarios that is used to run the system model using runSystemModel. The summary may be obtained using the function getSimSummary

metric

a string; the name of the performance metric to be plotted. The argument can be used to select a metric from performance for plotting.

topReps

an integer (default = NULL); the number of "top" replicates to be used. The "top" replicates will be identified for each target based on the simulation fitness. The average performance across topReps replicates will be plotted.

col

a colour; the colour of the lines. If NULL, the a default colour is used.

ylim

a vector of 2 values; the minimum and maximum limits of the y-axis (performance) scale.

Details

The plots show the mean value of performance across replicates. The ranges between the minimum and maximum values of performance across replicates are shaded. The function is intended for use with simulations containing attributes perturbed on an "OAT" grid. If the perturbations are on a "regGrid", this function will subset OAT perturbations, if available, to create the plots. The function creates separate plots for perturbations in attributes of temperature and other variables. The function may be called with performance argument specifying the metric to be plotted to plot other metrics.

Value

The plot of the performance space and the ggplot object.

See Also

runSystemModel, generateScenarios, plotPerformanceSpace, getSimSummary

Examples

# load example datasets
data("egSimSummary")
data("egSimPerformance")
plotPerformanceOAT(egSimPerformance[2], egSimSummary)
plotPerformanceOAT(egSimPerformance[1], egSimSummary)
# using the metric argument
plotPerformanceOAT(egSimPerformance, egSimSummary, metric = "Reliability (-)")

[Package foreSIGHT version 1.2.0 Index]