Optimization Solver Factory
Builds a runnable Solver from an OptimizationRunConfiguration.
OptimizationSolverFactory is the runtime translation layer from the persisted, app-layer optimization spec to live engine objects. It:
constructs a ProblemDefinition from OptimizationRunConfiguration.problem, including penalty-function defaults and per-constraint overrides;
wraps OptimizationRunConfiguration.model in a ConfiguredModelBuilder that applies the template's controls and RV overrides at evaluator-build time;
creates a SolutionCacheIfc and (optional) SimulationRunCacheIfc from OptimizationRunConfiguration.evaluation;
dispatches on the SolverSpec sealed variant to the matching Solver companion-object factory method (with random-restart wrapping when SolverSpec.randomRestart is non-null);
applies the cross-cutting EvaluationSpec settings on the returned solver instance.
Validation should be performed by ksl.app.validation.OptimizationConfigurationValidator before calling build; this factory throws IllegalArgumentException / IllegalStateException from the underlying engine APIs if the configuration is internally inconsistent (e.g. unknown decision-variable names against the model). The engine itself runs ProblemDefinition.validateProblemDefinition at evaluator-construction time, so this factory does not duplicate that check.