Skip to content
Projects

Optimiser

The equations of beamtracer.optimization.search, declared on the code that implements them and checked by the tests.

optimize

functionsource

Minimize the problem's first objective with SciPy's differential evolution.

problem
min⁡p∈[l,u]f(p)subject togi(p)≤0,gpenalty(p)≤0\min_{\mathbf p \in [\mathbf l, \mathbf u]} f(\mathbf p) \quad \text{subject to} \quad g_i(\mathbf p) \le 0, \quad g_\mathrm{penalty}(\mathbf p) \le 0
seen
(f,g1,…,gm,gpenalty)={(f,g1,…,gm,0)ok (a NaN gi read as +∞)(+∞,+∞,…,+∞,1)failed or unconverged(f, g_1, \dots, g_m, g_\mathrm{penalty}) = \begin{cases} (f, g_1, \dots, g_m, 0) & \text{ok (a NaN } g_i \text{ read as } +\infty) \\ (+\infty, +\infty, \dots, +\infty, 1) & \text{failed or unconverged} \end{cases}
Assumes
  • SciPy's differential evolution with Lampinen's constraint rules: a feasible design beats an infeasible one, two feasible ones compare by ff, two infeasible ones by their violations
  • one generation per batch (updating='deferred', vectorized=True), evaluated in a process pool; no gradient polish
  • every evaluation recorded under the key of its normalised parameters, so a rerun with the same seed resumes from the record
References
Built from