View source: R/utilities-output-schema.R
setOutputInterval | R Documentation |
Clears the output interval from the simulation and adds a new one.
setOutputInterval(
simulation,
startTime,
endTime,
resolution,
intervalName = NULL
)
simulation |
Simulation for which a new interval should be created |
startTime |
Start time of the interval in min |
endTime |
End time of the interval in min |
resolution |
resolution in points/min |
intervalName |
Optional Name of interval. If not specified, a unique name will be assigned. |
Returns the interval created.
This is essentially a shortcut for clearOutputIntervals
followed by addOutputInterval
simPath <- system.file("extdata", "simple.pkml", package = "ospsuite")
# Load the simulation
sim <- loadSimulation(simPath, addToCache = FALSE, loadFromCache = FALSE)
# Adds a new interval starting at 1h and ending at 10h with a resolution of 10 points per hour
setOutputInterval(sim, 1 * 60, 10 * 60, 1 / 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.