This fixes the bug where deviation from the target was not calculated properly upon resuming.
The code now resets the count whenever it reaches a new stage, and it keeps track of the histogram count when the equilibrium stage is reached. I also set the criterion to switch to equilibrium to be less tight.
This fixes the bug where deviation from the target was not calculated properly upon resuming.
The code now resets the count whenever it reaches a new stage, and it keeps track of the histogram count when the equilibrium stage is reached. I also set the criterion to switch to equilibrium to be less tight.