Closed lubo93 closed 4 years ago
Since the overleaf doc may change in the future, can you write what changes were made to the diurnal modulation functions here?
The functions "cos4_diurnal_modulation" and "cos2_diurnal_modulation" are now based on the following structure: np.maximum(np.minimum(cmin_i, cmin_j), np.minimum(cmax_i, cmax_j) .... )
Ah yes, I see that the new function is contact-specific
@lubo93 does it make sense to keep the non-specific version for this PR? I don't think we can simulate contact-specific modulations, even if we have this small function available. What do you think?
@lubo93 it looks like we don't need new code for this function either. Am I correct that simply defining
minimum = min(λj_min, λi_min)
and
maximum = min(λj_max, λi_max)
plus a new parameter normalization
(or something) produces the same function as before?
We could still use the previous \lambda_ji in another function (to model a "global contact rate"). For future code versions, it would be good if we also start transitioning towards node-specific lambdas. We need arrays of \lambdas for our intervention simulations.
@lubo93 that's fine --- except that we dont need arrays of lambdas. As far as I can tell, we can use a list of DiurnalMeanContactRate
instead. Won't this work?
@lubo93 it looks like we don't need new code for this function either. Am I correct that simply defining
minimum = min(λj_min, λi_min)
and
maximum = min(λj_max, λi_max)
plus a new parameter
normalization
(or something) produces the same function as before?
Yes, right. We could also keep the old version and define a maximum and minimum function.
Hmm, ok, maybe I don't completely understand what is needed. It looks to me like this function has exactly the same mathematical form as the previous object; it is simply that we are going to need n_contacts
instances of DiurnalMeanContactRate
, rather than just 1 as we are currently using.
@lubo93 that's fine --- except that we dont need arrays of lambdas. As far as I can tell, we can use a list of
DiurnalMeanContactRate
instead. Won't this work?
This would be something for the meeting tomorrow. It depends on how we want to model interventions. One way would be to reduce lambda_min and lambda_max of a specific node.
Hmm, ok, maybe I don't completely understand what is needed. It looks to me like this function has exactly the same mathematical form as the previous object; it is simply that we are going to need
n_contacts
instances ofDiurnalMeanContactRate
, rather than just 1 as we are currently using.
Agree with you. This would work.
This would be something for the meeting tomorrow. It depends on how we want to model interventions. One way would be to reduce lambda_min and lambda_max of a specific node.
Okay, I see. In that case, we'd have to re-instantiate the DiurnalMeanContactRate
that are connected to a self-isolating node, and recompute its parameters. Using the other abstraction, we only need to change one number in an array.
This would be something for the meeting tomorrow. It depends on how we want to model interventions. One way would be to reduce lambda_min and lambda_max of a specific node.
Okay, I see. In that case, we'd have to re-instantiate the
DiurnalMeanContactRate
that are connected to a self-isolating node, and recompute its parameters. Using the other abstraction, we only need to change one number in an array.
Yes, we need that capability to model individual-level interventions.
This PR adds to the previous NYC example and makes the following changes:
ToDos: Simulations on larger networks.
First results on a 1,000 node network: