Find which other variables each variable is dependent on.
Arguments
- sfm
Stock-and-flow model, object of class sdbuildR_xmile.
- reverse
If FALSE, list for each variable X which variables Y it depends on for its equation definition. If TRUE, don't show dependencies but dependents. This reverses the dependencies, such that for each variable X, it lists what other variables Y depend on X.
Value
List, with for each model variable what other variables it depends on, or if reverse = TRUE, which variables depend on it
See also
Other build:
as.data.frame.sdbuildR_sim()
,
as.data.frame.sdbuildR_xmile()
,
build()
,
debugger()
,
get_build_code()
,
header()
,
macro()
,
plot.sdbuildR_xmile()
,
print.summary.sdbuildR_xmile()
,
summary.sdbuildR_xmile()
,
xmile()
Examples
sfm <- xmile("SIR")
find_dependencies(sfm)
#> $Susceptible
#> character(0)
#>
#> $Infected
#> character(0)
#>
#> $Recovered
#> character(0)
#>
#> $Beta
#> [1] "Effective_Contact_Rate" "Total_Population"
#>
#> $Total_Population
#> character(0)
#>
#> $Effective_Contact_Rate
#> character(0)
#>
#> $Delay
#> character(0)
#>
#> $Lambda
#> [1] "Beta" "Infected"
#>
#> $Infection_Rate
#> [1] "Susceptible" "Lambda"
#>
#> $Recovery_Rate
#> [1] "Infected" "Delay"
#>