Last chance! 50% off unlimited learning
Sale ends in
Simulates and maps system performance using climate scenarios generated using scenarioGenerator
. Currently only visualises 2D panels.
performanceSpaces(data = NULL,
plotTag = NULL,
plotArgs = NULL,
systemModel = NULL,
systemArgs = NULL,
simDirectory = "Simulation1",
performance=NULL,
IOmode="suppress"
)
A list containing data frames of the form Year Month Day P Temp output from scenarioGenerator
A character vector which designates how the performance space is visualised. Options are: "Heat", "Contours" or "OAT".
A list controlling how the performance space is visualised with the following components:
a string that is used as the title label.
a string that is used to label the legend.
x axis limits.
y axis limits.
z axis limits.
a string specifying the colour for lower values of performance. Default is "red". For use with plotTag="Heat".
a string specificying the colour for the high values of performance. Default is "yellow". A colour ramp will be created between this and the lowfill. For use with plotTag="Heat".
a TRUE/FALSE toggle for whether or not contour lines are overlaid. Default is TRUE. For use with plotTag="Heat".
a vector specifying the levels at which controus will be drawn. For use with plotTag = "Contours".
a function name. The function name of the system model used to generate system performance. The system model must have the arguments data and systemArgs.
A list containing all the arguments that are required to control the system model.
A string used to label the output directory.
A vector of performance values from an external system model.
A string that specifies the input-output mode for the scenarios = "verbose", "dev" or "suppress".
Returns a 2D plot of system performance.
See Also: scenarioGenerator
and plotLayers
# NOT RUN {
data(tankSimpleScale)
# tank_simple_scenarios<-scenarioGenerator(obs=tank_obs,
# modelTag = modelTag,
# attPerturb=attPerturb,
# exSpArgs = exSpArgs)
# Example 1: Heat Map Example
systemArgs<-list(roofArea=100,
nPeople=1,
tankVol=2000,
firstFlush=1,
write.file=FALSE,
metric="reliability")
plotArgs=list(title="Scenario Neutral Space",
legendtitle="Reliability",
xlim=c(-2,2),
ylim=c(0.7,1.3),
performancelimits=c(0.6,0.85))
plot<-performanceSpaces(data=tank_simple_scenarios,
plotTag="Heat",
systemModel = tankWrapper,
systemArgs = systemArgs)
plot$plot
# Note options
# plotArgs$contour=FALSE
# plotArgs$lowfill="antiquewhite" ###From supported R colour names
# plotArgs$highfill="#88CCEE" ###Hexidecimal specification also okay
# }
# NOT RUN {
# }
# NOT RUN {
#Example 2
result<-performanceSpaces(data=tank_simple_scenarios,
plotTag = "Contours",
plotArgs=plotArgs,
systemModel = tankWrapper,
systemArgs = systemArgs)
result$plot
# }
# NOT RUN {
#Example 3
# }
# NOT RUN {
plotArgs$contourlevels=c(0.67,0.71)
result<-performanceSpaces(data=tank_simple_scenarios,
plotTag = "Contours",
plotArgs=plotArgs,
systemModel = tankWrapper,
systemArgs = systemArgs)
result$plot
# }
# NOT RUN {
# }
# NOT RUN {
###Example 4 - One-at-a-time/"OAT" plot
data(oatScenarios)
systemArgs=list(roofArea=50,
nPeople=1,
tankVol=3000,
firstFlush=1,
write.file=FALSE,
metric="reliability")
plotArgs=list(title="Scenario Neutral Space",
legendtitle="Reliability",
xlim=c(-2,2),
ylim=c(0.7,1.3),
performancelimits=c(0.6,0.85))
oat_plot=performanceSpaces(data=oat_out,
plotTag = "OAT",
plotArgs=plotArgs,
systemModel = tankWrapper,
systemArgs = systemArgs)
oat_plot
# }
Run the code above in your browser using DataLab