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
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 attime
.I suggest the following change: