odatse.algorithm.min_search module#
- class odatse.algorithm.min_search.Algorithm(info: Info, runner: Runner = None, domain=None, run_mode: str = 'initial')[source]#
Bases:
AlgorithmBaseAlgorithm class for performing minimization using scipy.optimize.minimize.
The optimization method is selected by the
methodparameter in the[algorithm.minimize]section (default: “Nelder-Mead”). All other entries of the section except ODAT-SE-specific keys are passed through to scipy.optimize.minimize as itsoptionsargument.Setting
basinhopping(a boolean, or a[algorithm.minimize.basinhopping]table whose entries are passed to scipy.optimize.basinhopping) switches to global optimization by basin hopping, with the configured method serving as the local minimizer.Initialize the Algorithm class.
- Parameters:
info (Info) – Information object containing algorithm settings.
runner (Runner) – Runner object for submitting jobs.
domain – Domain object defining the search space.
run_mode (str) – Mode of running the algorithm.
- __init__(info: Info, runner: Runner = None, domain=None, run_mode: str = 'initial') None[source]#
Initialize the Algorithm class.
- Parameters:
info (Info) – Information object containing algorithm settings.
runner (Runner) – Runner object for submitting jobs.
domain – Domain object defining the search space.
run_mode (str) – Mode of running the algorithm.
- _initialize() None[source]#
Set up initial state for a fresh run.
Nelder-Mead does not use checkpointing, so this is a no-op. The simplex initialisation is done in
_prepare().
- class odatse.algorithm.min_search._ClippedRandomDisplacement(rng, stepsize, min_list, max_list)[source]#
Bases:
objectRandom displacement for basinhopping, clipped to the search region.
The default take_step of scipy’s basinhopping may propose points outside [min_list, max_list], which would only waste solver evaluations on the inf-penalty. Clipping keeps every hop inside the region. The
stepsizeattribute is exposed so that basinhopping’s adaptive stepsize adjustment keeps working.