View source: R/allocate_functions.R
allocate_time | R Documentation |
Given knowledge of the irrigation system and simple heuristics for relative returns to labor spent farming and maintaining infrastructure, households solve a constrained optimization problem [@david2015effect] to determine the proportion of available time they should devote to each activity so as to maximize their expected utility.
allocate_time( households, total_labor = 1, j = 0.2, k = 0.6, psi = 0.2, epsilon = 0.18 )
households |
Tibble of household agents. |
psi |
The proportion of a household's labor needed to keep irrigation infrastructure at half capacity, defaults to 0.2. |
epsilon |
The scalability of irrigation infrastructure, defaults to 0.18. |
maintainance_labor |
The proportion of total labor allocated to maintaining infrastructure. |
max_irrigation |
Maximum irrigation, defaults to 1. |
#' Infrastructure performance
This function calculates the performance of irrigation infrastructure, given an amount of maintainance labor and parameters controling the scalability of the infrastructure. The performance of infrastructure is a piecewise linear function of labor inputs. Two parameters ψ and ε determine how much labor is required to keep irrigation infrastructure working at maximum capacity. By default, ψ \approx ε to make the infrastructure scalable, that is the agents can spend more or less time maintaining infrastructure and still be assured of at least some water. This equation is derived from [@david2015effect].
infrastructure_performance(maintainance_labor = 0.5) create_households(5) %>% mutate(runoff = )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.