Simulated Annealing Methods¶
JobShopLib includes a simulated annealing solver for job-shop scheduling. The OptPilot example does not reimplement that solver and does not generate solver code. It wraps JobShopLib as a method that emits complete schedule solutions.
In upstream JobShopLib, simulated annealing lives under job_shop_lib.metaheuristics alongside the annealer, neighbor generators, and objective helpers. The bundled OptPilot wrapper uses SimulatedAnnealingSolver directly and keeps all of that dependency on the method side.
The included method is:
It targets:
Install Optional Dependency¶
JobShopLib is intentionally an example dependency, not a core OptPilot dependency:
Run It¶
uv sync --extra examples
uv run optpilot validate examples/studies/job_shop_simulated_annealing.yaml
uv run optpilot run examples/studies/job_shop_simulated_annealing.yaml
What The Method Produces¶
The method reads the shared validation case references from methodContext.references, runs SimulatedAnnealingSolver for each case, and emits:
Candidate spec payload fragment:
The method settings control the annealer:
Method settings fragment:
The environment validates the returned schedules and records the metrics.
Boundary¶
JobShopLib owns:
- the simulated annealing implementation
- the schedule representation used by the solver
- the neighborhood and objective behavior
OptPilot owns:
- launching the method
- exposing the validation case references to the method
- storing the schedule-solution candidate
- calling the environment evaluator
- recording evidence
This demonstrates the intended integration pattern for existing optimization libraries: keep the external method intact, let the method produce a candidate shape the environment accepts, and keep the evaluator independent from the solver library.