public void Run(Clock clock, IImpactVectorBorneDiseasesState state, IDimensions dimensions) { var s = state; var t = clock.Current; foreach (var r in dimensions.GetValues <Region>()) { double ypc = 1000.0 * s.income[t, r] / s.population[t, r]; double ypc90 = s.gdp90[r] / s.pop90[r] * 1000.0; s.dengue[t, r] = s.dfbs[r] * s.population[t, r] * s.dfch[r] * Math.Pow(s.temp[t, r], s.dfnl) * Math.Pow(ypc / ypc90, s.vbel); s.schisto[t, r] = s.smbs[r] * s.population[t, r] * s.smch[r] * Math.Pow(s.temp[t, r], s.smnl) * Math.Pow(ypc / ypc90, s.vbel); if (s.schisto[t, r] < -s.smbs[r] * s.population[t, r] * Math.Pow(ypc / ypc90, s.vbel)) { s.schisto[t, r] = -s.smbs[r] * s.population[t, r] * Math.Pow(ypc / ypc90, s.vbel); } s.malaria[t, r] = s.malbs[r] * s.population[t, r] * s.malch[r] * Math.Pow(s.temp[t, r], s.malnl) * Math.Pow(ypc / ypc90, s.vbel); } }
public void Run(Clock clock, IImpactVectorBorneDiseasesState state, IDimensions dimensions) { var s = state; var t = clock.Current; foreach (var r in dimensions.GetValues<Region>()) { double ypc = 1000.0 * s.income[t, r] / s.population[t, r]; double ypc90 = s.gdp90[r] / s.pop90[r] * 1000.0; s.dengue[t, r] = s.dfbs[r] * s.population[t, r] * s.dfch[r] * Math.Pow(s.temp[t, r], s.dfnl) * Math.Pow(ypc / ypc90, s.vbel); s.schisto[t, r] = s.smbs[r] * s.population[t, r] * s.smch[r] * Math.Pow(s.temp[t, r], s.smnl) * Math.Pow(ypc / ypc90, s.vbel); if (s.schisto[t, r] < -s.smbs[r] * s.population[t, r] * Math.Pow(ypc / ypc90, s.vbel)) s.schisto[t, r] = -s.smbs[r] * s.population[t, r] * Math.Pow(ypc / ypc90, s.vbel); s.malaria[t, r] = s.malbs[r] * s.population[t, r] * s.malch[r] * Math.Pow(s.temp[t, r], s.malnl) * Math.Pow(ypc / ypc90, s.vbel); } }