Average calculation time
On our optimization API, each calculation request takes a time that is predictable as it depends on the number of points per calculation.
The calculation formula is a simple polynomial of the second degree. Let x be the number of points per computation.
time_seconds = 0.25 x2 + 0.2 x
Be careful, this formula is obtained empirically by observing the average time of calculation on our infrastructure. It can evolve over time, in particular due to the improvement of our infrastructure or our calculation algorithms.
Time to restart a calculation
The above formula refers to the average time taken by our infrastructure. It can be completely false if you re-run a calculation a second time after you have run it once, because we retain some cached data, which greatly speeds up processing.
Even for large optimisation problems, restarting a calculation takes little more than a few seconds.
Method for a progress bar
With the above information in mind, the correct method to implement a progress bar in your applications seems to be to use the above formula as the maximum time that the calculation can take. If the result is obtained before, you will only have to interrupt the progress bar. If the result is obtained afterwards, which must be very rare, you can freeze your progress bar at 99% by the time everything ends.