LIST-LUXEMBOURG / iguess

iGuess 1.0 - The iGuess implementation in Rails
GNU General Public License v3.0
6 stars 0 forks source link

Scenario overview page shows wrong time period in the subtitle #196

Closed uleopold closed 9 years ago

uleopold commented 9 years ago

The overview page subtitle shows the wrong time period of a scenario.It typically adds 5 years more than the scenario is configured for.

Just grab the BASE_YEAR and END_YEAR of the scenario, where END_YEAR is computed as follows:

END_YEAR = BASE_YEAR + (TIME_STEP *( N_PERIODS - 1))

Here 1 is the BASE_YEAR which needs to be subtracted from N_PERIODS to arrive at the correct scenario time span.

Here an example for BASE_YEAR = 2010 TIME_STEP = 5 N_PERIODS = 10

2050 = 2010 + (5 * (9 -1))