# \donttest{
dst.firm <- node_new("output",
type = "CD", alpha = 1, beta = c(0.5, 0.5),
"prod", "lab"
)
dst.consumer <- node_new("utility",
type = "Leontief", a = 1, "prod"
)
B <- matrix(c(
1, 0,
0, 0
), 2, 2, TRUE)
S0Exg <- matrix(c(
NA, NA,
NA, 100
), 2, 2, TRUE)
ge <- sdm2(
A = list(dst.firm, dst.consumer), B = B, S0Exg = S0Exg,
names.commodity = c("prod", "lab"),
names.agent = c("firm", "consumer"),
priceAdjustmentVelocity = 0,
policy = list(
makePolicyTechnologyChange(agent = "firm"),
makePolicyStickyPrice(stickiness = 0, time.win = c(1, 20)),
makePolicyStickyPrice(stickiness = 0.9, time.win = c(20, Inf))
),
ts = TRUE,
maxIteration = 1,
numberOfPeriods = 40
)
par(mfrow = c(1, 2))
matplot(ge$ts.z, type = "o", pch = 20)
matplot(ge$ts.p, type = "o", pch = 20)
# }
Run the code above in your browser using DataLab