[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GT] Missing dependencies in calculate_interval



Earlier this year there was some lamenting that the calculate_interval
function, when dependencies were not fulfilled at the first day, would
just return without any results, albeit the dependencies might be
fulfilled later on.

This results in that the user will have to guess how many periods of
dependencies are required and start the graph or analysis at a date
where that many periods are available.

I have worked out a solution where calculate_interval, rather than just
quitting, will search for the first day where the dependencies are
satisfied, and calculate the indicator values for the requested periods
from that day on. 

I am willing to develop this change completely, if there is interest.

To take advantage of this feature, all scripts would have to be
modified, as the potentially updated start and end dates have to be
passed back to the script from calculate_interval. Of course, all
indicators that use calculate_interval would also have to be modified.

Some additional observations:

1. Currently calculate and calculate_interval behave differently in that
(i) calculate will continue throughout the selected interval and will
output values for those periods where the dependencies are satisfied
(that is, there may be some undefined values and some result values for
the indicator), but (ii) calculate_interval will generate no results if
the first period has unsatisfied dependencies.

2. On the proposed scheme above these would still behave differently in
that calculate_interval would now generate the requested number of
periods from the first date where the dependencies are satisfied.

3. We could make these two indicators behave the same, either by having
both search for the first date with satisfied dependencies, or by having
both generate the results for the requested period but generate all
values.

Any opinions?

Th.