D, S and R calculations are not taking in account RESET events in the repetition history. Improve the code to detect these events and despise previous repetitions in the estimation of the memory status. <img width="700" alt="Image" src="https://github.com/user-attachments/assets/bff8532a-e729-4949-b3ba-20703184cc53" /> <img width="800" alt="Image" src="https://github.com/user-attachments/assets/f2f3666c-527e-4205-a7d5-e8de1644a0a7" />