Description Usage Arguments Value Examples
Solve the model
1 |
model |
a named list with params, variables and equations. |
start |
a vector with start values for undefined variables. If NULL, the currente value will be used. |
method |
the solver to be used: BB or nleqslv |
... |
the other arguments to be passed into the solver control argument. |
Returns data and information about the model and its solution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(emr)
sa_model <- simple_armington(
v0 = c(60, 30, 10),
eps = c(1, 10, 10),
eta = -1,
sigma = 4,
regions = c("dom", "sub", "nsub")
)
# tau is the power tariff change
# Increase the tariff in 10 percent for the sub region
sa_model$params$tau$value['sub'] <- 1.1
sol <- solve_emr(sa_model)
sol$variables
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.