Closed averbraeck closed 5 months ago
Calculation has been included. See snippet below:
var cumulativeNewsEffects = CumulativeNewsEffects.readCumulativeNewsEffects(data.getDataSource(),
data.getScenario(), data.getCurrentRoundNumber());
for (var community : communityMap.keySet())
{
List<TaxRecord> taxList =
dslContext.selectFrom(Tables.TAX).where(Tables.TAX.COMMUNITY_ID.eq(community.getId())).fetch();
taxMap.put(community, 1000);
// tax change based on measures
int txc = (int) cumulativeNewsEffects.get(community.getId()).getTaxChange();
for (TaxRecord tax : taxList)
{
int nr = communityMap.get(community);
if (nr >= tax.getMinimumInhabitants() && nr <= tax.getMaximumInhabitants())
{
taxMap.put(community, tax.getTaxCost().intValue() + txc);
break;
}
}
}
Note that the database needs to change the round 4 tax effects to:
The 5000 value instead of 5 has been changed in the database for all scenarios.
This is now correctly applied:
The tax increase (or reduction) as a result of a measure needs to be implemented in the tax calculation in the facilitator app.