rte-france / challenge-roadef-2020

Apache License 2.0
20 stars 7 forks source link

Questionable value override in `compute_risk_distribution` #2

Closed bgraf closed 4 years ago

bgraf commented 4 years ago

https://github.com/rte-france/challenge-roadef-2020/blob/d9a599f2440aca4fefa76e7cf72358ba92ec719a/RTE_ChallengeROADEF2020_checker.py#L137

The current code replaces the risk at time with the risk induced by the current intervention instead of adding the intervention's risk to the total risk. Hence, risk[time] is simply the risk of most recent intervention considered running at time.

I suggest the following change:

        for time in range(start_time_idx, start_time_idx + delta):
            for i, additional_risk in enumerate(intervention_risk[str(time + 1)][str(start_time)]):
                risk[time][i] += additional_risk
klorel commented 4 years ago

Hi Benjamin, Thank you for having checked this part!