Learn R Programming

pysd2r (version 0.1.0)

set_components: Changes a model parameter

Description

set_components() calls .set_components() and changes a resulting parameter in the model

Usage

set_components(o, vals)

Arguments

o

is the ipysd S3 object

vals

contains a list with the parameter and value to be changed

Details

As it's a generic function, this call is dispatched to set_component.isdpy

Examples

Run this code
# NOT RUN {
target <- system.file("models/vensim", "Population.mdl", package = "pysd2r")
py <- pysd_connect()
py <- read_vensim(py, target)
results <- run_model(py)
l <- list("Growth Fraction"=0.02)
set_components(py,l)
out2 <- run_model(py)
# }

Run the code above in your browser using DataLab