We have a use case for adaptive where the function parameter is a slowly changable physical parameter like the orientation angle of a polarization filter. The simple approach with the SequentialExecutor works but spends by far most of the time re-oriening the filter due to basically worst-case ordering of points.
One can maybe formulate the problem like this: There exists a maximal reasonable distance between sample points above which the measurement time is dwarfed by some "manipulation" time.
Our current hack is to implement a BatchExecutor which starts the evaluation after the first point is requested and can re-order all points submitted so far. By setting ntasks to a reasonable number which sadly depends on the concrete boundary conditions the wasted time can be greatly reduced. You can find the implementation here. If there is interest I can create a pull request to included it in adaptive.
Is there a different less hacky solution for the problem? Is there some previous discussion or some place in the documentation that I overlooked?
We have a use case for adaptive where the function parameter is a slowly changable physical parameter like the orientation angle of a polarization filter. The simple approach with the
SequentialExecutorworks but spends by far most of the time re-oriening the filter due to basically worst-case ordering of points.One can maybe formulate the problem like this: There exists a maximal reasonable distance between sample points above which the measurement time is dwarfed by some "manipulation" time.
Our current hack is to implement a
BatchExecutorwhich starts the evaluation after the first point is requested and can re-order all points submitted so far. By settingntasksto a reasonable number which sadly depends on the concrete boundary conditions the wasted time can be greatly reduced. You can find the implementation here. If there is interest I can create a pull request to included it in adaptive.Is there a different less hacky solution for the problem? Is there some previous discussion or some place in the documentation that I overlooked?