Description Usage Arguments Details Value Examples
A factory function that creates sdModelClass
,
sdCoupledModelClass
or sdStaticModelClass
object
from a XML file or from the package
repository (see the available models in the sdRepository
documentation).
1 | sdLoadModel(file, repository = F, timeSeriesDirectory = "")
|
file |
The XML file name with the model specification. If
repository = TRUE, |
repository |
logical. If TRUE will use the |
timeSeriesDirectory |
The directory where time series inputs are stored (when passing the time series inputs via external files). |
The XML file must be created with the models object method '$saveToXml' to garantee that it will be correctly loaded and validated (by checking the sdsim prefix).
A sdModelClass
, a sdCoupledModelClass
or
a sdStaticModelClass
object.
1 2 3 4 5 6 7 8 9 10 | # Load the Bouncing Ball model from the sdsim repository
bb <- sdLoadModel(file = "BouncingBall", repository = TRUE)
# simulate the model and plot the results
outbb <- sdSimulate(model = bb)
outbb$plot("height speed", multipleYAxis = TRUE, units = TRUE)
# save the model to a XML file and reload it
bb$saveToXml(file = "bb.xml")
bb <- sdLoadModel(file = "bb.xml")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.