Esempio n. 1
0
        public void Run(Clock clock, IRegionalHotellingTaxationState state, IDimensions dimensions)
        {
            var t = clock.Current;
            var s = state;

            foreach (var r in dimensions.GetValues <Region>())
            {
                var perCapitaConsumptionNow      = s.consumption[t, r] / s.population[t, r];
                var perCapitaConsumptionPrevious = s.consumption[t - 1, r] / s.population[t - 1, r];

                var perCapitaGrowthRate = perCapitaConsumptionNow / perCapitaConsumptionPrevious - 1.0;

                var discountrate = perCapitaGrowthRate * s.elasticityofmarginalutility + s.prtp;

                if (t < s.baseyear)
                {
                    s.currtax[t, r] = 0.0;
                }
                else if (t == s.baseyear)
                {
                    s.currtax[t, r] = s.basetax[r];
                }
                else
                {
                    s.currtax[t, r] = s.currtax[t - 1, r] * (1.0 + discountrate);
                }


                s.currtaxn2o[t, r] = s.currtax[t, r];
                s.currtaxch4[t, r] = s.currtax[t, r];
            }
        }
        public void Run(Clock clock, IRegionalHotellingTaxationState state, IDimensions dimensions)
        {
            var t = clock.Current;
            var s = state;

            foreach (var r in dimensions.GetValues<Region>())
            {
                var perCapitaConsumptionNow = s.consumption[t, r] / s.population[t, r];
                var perCapitaConsumptionPrevious = s.consumption[t - 1, r] / s.population[t - 1, r];

                var perCapitaGrowthRate = perCapitaConsumptionNow / perCapitaConsumptionPrevious - 1.0;

                var discountrate = perCapitaGrowthRate * s.elasticityofmarginalutility + s.prtp;

                if (t < s.baseyear)
                    s.currtax[t, r] = 0.0;
                else if (t == s.baseyear)
                    s.currtax[t, r] = s.basetax[r];
                else
                    s.currtax[t, r] = s.currtax[t - 1, r] * (1.0 + discountrate);

                s.currtaxn2o[t, r] = s.currtax[t, r];
                s.currtaxch4[t, r] = s.currtax[t, r];

            }
        }