set_components {pysd2r}R Documentation

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

## 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)

## End(Not run)

[Package pysd2r version 0.1.0 Index]