Skip to content
Projects

Designs

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

rank

functionsource

Return the sort key of the searches: lower is better.

rank
rank={(0,f)feasible(1,v)ok but infeasible(2,0)failed or unconverged,v=∑imax⁡(gi,0)\text{rank} = \begin{cases} (0, f) & \text{feasible} \\ (1, v) & \text{ok but infeasible} \\ (2, 0) & \text{failed or unconverged} \end{cases}, \qquad v = \sum_i \max(g_i, 0)
Assumes
  • ok: converged, no failure, finite objectives; feasible: ok and every constraint gi≤0g_i \le 0; a NaN constraint counts as v=∞v = \infty
  • sorted lexicographically, lower is better: a penalised evaluation never ranks before a feasible one