cleanUp

fun cleanUp(candidates: List<Solution>, sampleMore: (InputMap, Int) -> Solution): CleanUpResult(source)

Runs the full clean-up on the supplied candidate local optima and reports the selected best and its confidence interval.

The candidates are first hard-filtered to the response-feasible subset via ksl.simopt.evaluator.Solution.isResponseConstraintFeasible at feasibilityCILevel. Ranking and selection (screen → select) then run only on that subset, using the objective. When there are no response constraints every candidate is trivially feasible and this reduces to the unconstrained clean-up.

If no candidate is response-feasible, clean-up cannot honor the correct-selection guarantee on a feasible system, so it falls back to the least-infeasible candidate (minimum total response-constraint violation) and reports a plain confidence interval (no ± δ_C).

Return

the selected best, its confidence interval, and whether a feasible subset was used

Parameters

candidates

the local optima to clean up; must be non-empty

sampleMore

obtains a Solution carrying the requested additional replications for a point