Tunny Waits 30 Seconds Before Every Trial

I am using Tunny 0.12 in Grasshopper to optimize daylighting design through simulations with Honeybee. I sat 2 optimizations in separate windows to make 10,000 trials using NSGA III. Initially, the optimization process was running smoothly, but now I am experiencing around 35-second delay between simulations. This delay was not present at the beginning, and I only noticed it after around 7000 trials. Unfortunately, I am not sure when exactly this issue started or whether the delay gradually increased over time. Also, the two Tunny processes started at the same time, but one has completed 7750 trials, while the other has only done 7200.

Setup Details: I am running three separate optimizations at the same time: One using Wallacei, and Two using Tunny (each with a separate log file). Each trial requires a grid-based daylight simulation using Honeybee-Radiance.

Any insights or suggestions would be greatly appreciated.

1 Like

@أسامة

Thanks for using Tunny. Sorry for the delay in replying.
I will raise possible causes.

  1. Tunny by default writes the results to a log file for each trial. This is fine in the beginning, but as the number of trials increases, the log file size of the results will grow and it will gradually take more time.
    If you do not need to save every trial, it is recommended to use the InMemory mode, which saves the results after optimization is finished.

  2. If the “Ignore Duplicate Sampling” checkbox is checked in the settings, each trial will be slower than the last.
    This is because before running a trial, the algorithm compares the proposed variable combinations with all previous trials to see if there are any duplicates.
    If checked, it is recommended to uncheck it.

I hope this will help you out.