public void Run(Clock clock, IImpactDeathMorbidityState state, IDimensions dimensions)
        {
            var s = state;
            var t = clock.Current;

            if (clock.IsFirstTimestep)
            {
            }
            else
            {
                foreach (var r in dimensions.GetValues <Region>())
                {
                    double ypc = s.income[t, r] / s.population[t, r] * 1000.0;

                    s.dead[t, r] = s.dengue[t, r] + s.schisto[t, r] + s.malaria[t, r] + s.cardheat[t, r] + s.cardcold[t, r] + s.resp[t, r] + s.diadead[t, r] + s.hurrdead[t, r] + s.extratropicalstormsdead[t, r];
                    if (s.dead[t, r] > s.population[t, r] * 1000000.0)
                    {
                        s.dead[t, r] = s.population[t, r] / 1000000.0;
                    }

                    s.yll[t, r] = s.d2ld[r] * s.dengue[t, r] + s.d2ls[r] * s.schisto[t, r] + s.d2lm[r] * s.malaria[t, r] + s.d2lc[r] * s.cardheat[t, r] + s.d2lc[r] * s.cardcold[t, r] + s.d2lr[r] * s.resp[t, r];

                    s.yld[t, r] = s.d2dd[r] * s.dengue[t, r] + s.d2ds[r] * s.schisto[t, r] + s.d2dm[r] * s.malaria[t, r] + s.d2dc[r] * s.cardheat[t, r] + s.d2dc[r] * s.cardcold[t, r] + s.d2dr[r] * s.resp[t, r] + s.diasick[t, r];

                    s.vsl[t, r]      = s.vslbm * Math.Pow(ypc / s.vslypc0, s.vslel);
                    s.deadcost[t, r] = s.vsl[t, r] * s.dead[t, r] / 1000000000.0;
                    // deadcost:= vyll*ypc*yll/1000000000;

                    s.vmorb[t, r]    = s.vmorbbm * Math.Pow(ypc / s.vmorbypc0, s.vmorbel);
                    s.morbcost[t, r] = s.vmorb[t, r] * s.yld[t, r] / 1000000000.0;
                }
            }
        }
        public void Run(Clock clock, IImpactDeathMorbidityState state, IDimensions dimensions)
        {
            var s = state;
            var t = clock.Current;

            if (clock.IsFirstTimestep)
            {

            }
            else
            {
                foreach (var r in dimensions.GetValues<Region>())
                {
                    double ypc = s.income[t, r] / s.population[t, r] * 1000.0;

                    s.dead[t, r] = s.dengue[t, r] + s.schisto[t, r] + s.malaria[t, r] + s.cardheat[t, r] + s.cardcold[t, r] + s.resp[t, r] + s.diadead[t, r] + s.hurrdead[t, r] + s.extratropicalstormsdead[t, r];
                    if (s.dead[t, r] > s.population[t, r] * 1000000.0)
                        s.dead[t, r] = s.population[t, r] / 1000000.0;

                    s.yll[t, r] = s.d2ld[r] * s.dengue[t, r] + s.d2ls[r] * s.schisto[t, r] + s.d2lm[r] * s.malaria[t, r] + s.d2lc[r] * s.cardheat[t, r] + s.d2lc[r] * s.cardcold[t, r] + s.d2lr[r] * s.resp[t, r];

                    s.yld[t, r] = s.d2dd[r] * s.dengue[t, r] + s.d2ds[r] * s.schisto[t, r] + s.d2dm[r] * s.malaria[t, r] + s.d2dc[r] * s.cardheat[t, r] + s.d2dc[r] * s.cardcold[t, r] + s.d2dr[r] * s.resp[t, r] + s.diasick[t, r];

                    s.vsl[t, r] = s.vslbm * Math.Pow(ypc / s.vslypc0, s.vslel);
                    s.deadcost[t, r] = s.vsl[t, r] * s.dead[t, r] / 1000000000.0;
                    // deadcost:= vyll*ypc*yll/1000000000;

                    s.vmorb[t, r] = s.vmorbbm * Math.Pow(ypc / s.vmorbypc0, s.vmorbel);
                    s.morbcost[t, r] = s.vmorb[t, r] * s.yld[t, r] / 1000000000.0;

                }
            }
        }