Simulated Annealing is a probabilistic metaheuristic for global optimization that mimics the physical process of annealing, where a metal is heated and then slowly cooled to reduce defects. In an optimization context, the algorithm accepts worse solutions with a decreasing probability—governed by a temperature parameter—to escape local optima and locate the global minimum of a cost function.
Glossary
Simulated Annealing

What is Simulated Annealing?
A probabilistic technique for approximating the global optimum of a given function, widely used in logistics for solving complex routing problems with vast search spaces.
The algorithm's ability to probabilistically accept uphill moves prevents premature convergence on suboptimal solutions, making it highly effective for combinatorial optimization problems like the Vehicle Routing Problem (VRP). As the temperature cools according to a defined schedule, the search transitions from exploration to exploitation, eventually settling into a low-energy, near-optimal state.
Key Characteristics of Simulated Annealing
Simulated annealing is a probabilistic metaheuristic for global optimization that escapes local optima by occasionally accepting worse solutions. The probability of accepting an inferior state decreases over time, governed by a cooling schedule.
Metropolis Acceptance Criterion
The core probabilistic decision rule that determines whether a new candidate solution is accepted. If the new solution is better, it is always accepted. If it is worse, it is accepted with a probability of exp(-ΔE / T), where ΔE is the magnitude of the objective function degradation and T is the current temperature. This allows the algorithm to climb out of local minima early in the search when T is high.
Cooling Schedule
The function controlling the rate at which the temperature parameter T decreases over iterations. Common schedules include:
- Exponential decay: T_k = α * T_{k-1}, where α is typically between 0.8 and 0.99
- Logarithmic cooling: T_k = T_0 / log(1 + k), which guarantees convergence to the global optimum but is impractically slow
- Linear decay: T_k = T_0 - η * k The schedule directly balances exploration (high T) against exploitation (low T).
Neighborhood Generation
A problem-specific perturbation function that generates a new candidate solution from the current state. In the context of the Vehicle Routing Problem, common neighborhood operators include:
- 2-opt: Reversing a segment of a route to eliminate crossing edges
- Or-opt: Relocating a short segment of consecutive customers to a different position
- Cross-exchange: Swapping segments between two distinct routes The efficiency of the search depends heavily on the design of this operator.
Global Convergence Properties
Under a logarithmic cooling schedule, simulated annealing is proven to converge asymptotically to the global optimum with probability 1, a property derived from the theory of inhomogeneous Markov chains. In practice, faster cooling schedules are used, trading the theoretical guarantee for computational feasibility. The algorithm is particularly effective on problems with a rugged fitness landscape containing many local optima, such as VLSI circuit placement and complex scheduling.
Parameter Tuning
Critical hyperparameters that must be calibrated for effective performance:
- Initial temperature (T_0): Set high enough that approximately 80% of worse moves are initially accepted, ensuring sufficient exploration
- Final temperature (T_f): A stopping threshold where the system is considered frozen
- Iterations per temperature level: The number of neighborhood moves attempted before reducing T, often set proportional to the problem size
- Restart strategies: Reheating the system to escape deep local minima if no improvement is found after a set number of iterations
Comparison to Other Metaheuristics
Simulated annealing is distinguished from related approaches by its single-solution trajectory and explicit temperature mechanism:
- vs. Tabu Search: SA uses stochastic acceptance of worse moves, while Tabu Search uses deterministic memory structures to forbid recently visited solutions
- vs. Genetic Algorithms: SA maintains and iterates on a single solution rather than a population, making it more memory-efficient but lacking implicit parallelism
- vs. ALNS: Adaptive Large Neighborhood Search uses a destroy-and-repair paradigm with adaptive weight adjustment, while SA relies purely on perturbation and the Metropolis criterion
Simulated Annealing vs. Other Metaheuristics
Comparative analysis of Simulated Annealing against Genetic Algorithms, Tabu Search, and Adaptive Large Neighborhood Search for dynamic route optimization problems.
| Feature | Simulated Annealing | Genetic Algorithm | Tabu Search | ALNS |
|---|---|---|---|---|
Core Mechanism | Probabilistic hill-climbing with cooling schedule | Population evolution via crossover and mutation | Local search with adaptive memory structures | Iterative destroy-and-repair with adaptive selection |
Escapes Local Optima | ||||
Population-Based Search | ||||
Memory Structures | ||||
Parameter Sensitivity | High (cooling schedule critical) | High (population size, mutation rate) | Medium (tabu tenure length) | Medium (destroy/repair weights) |
Convergence Speed | Slow on large instances | Slow (evaluates many candidates) | Moderate | Fast (focused neighborhood exploration) |
Best For VRP Variants | Small to medium CVRP with tight time windows | Multi-objective routing with trade-off analysis | VRP with complex hard constraints | Large-scale DARP and PDP with many constraints |
Typical Solution Gap | 2-5% from optimal on CVRP | 1-3% from optimal on CVRP | 1-4% from optimal on CVRP | 0.5-2% from optimal on PDP |
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the simulated annealing metaheuristic, its mechanisms, and its application in solving complex combinatorial optimization problems like vehicle routing.
Simulated annealing is a probabilistic metaheuristic for global optimization that mimics the physical process of annealing in metallurgy, where a material is heated and then slowly cooled to reduce defects. The algorithm starts at a high initial temperature and iteratively explores the solution space by making random moves. Crucially, it probabilistically accepts worse solutions with a probability given by the Metropolis criterion, P = exp(-ΔE / T), where ΔE is the change in objective function value and T is the current temperature. This mechanism allows the search to escape local optima early in the process. As the temperature gradually decreases according to a defined cooling schedule, the algorithm becomes increasingly greedy, converging toward a global minimum.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Simulated Annealing is a foundational metaheuristic. Understanding its relationship to other optimization techniques is critical for selecting the right solver for dynamic routing problems.
Metaheuristic
A high-level, problem-independent algorithmic framework that guides subordinate heuristics to efficiently explore a search space. Simulated Annealing is a classic single-solution trajectory-based metaheuristic, contrasting with population-based methods like Genetic Algorithms. Metaheuristics trade guaranteed optimality for computational speed, making them essential for NP-hard routing problems where exact solvers fail to converge within operational time limits.
Genetic Algorithm
A population-based metaheuristic inspired by natural selection. Unlike Simulated Annealing's single-solution trajectory, Genetic Algorithms maintain a population of candidate routes, combining them via crossover and mutation operators.
- Exploration: Genetic Algorithms explore the search space more broadly through population diversity.
- Exploitation: Simulated Annealing's cooling schedule provides a more controlled convergence.
- Hybridization: Modern solvers often embed Simulated Annealing as a local search operator within a Genetic Algorithm framework.
Tabu Search
A deterministic metaheuristic that uses adaptive memory structures to avoid cycling back to previously visited solutions. Unlike Simulated Annealing's probabilistic acceptance of worse solutions, Tabu Search systematically prohibits recently explored moves.
- Tabu List: A short-term memory that records forbidden transitions.
- Aspiration Criteria: Overrides tabu status if a move leads to a new global best.
- Contrast: Simulated Annealing relies on stochastic escape from local optima; Tabu Search uses explicit memory to force exploration.
Adaptive Large Neighborhood Search (ALNS)
An iterative metaheuristic that repeatedly destroys and repairs parts of a solution. ALNS is particularly effective for complex Vehicle Routing Problems with many constraints.
- Destroy Operators: Remove a subset of stops from a route (e.g., random removal, worst-cost removal).
- Repair Operators: Reinsert removed stops using greedy or regret-based heuristics.
- Adaptive Layer: Tracks operator performance and selects the most effective destroy/repair pairs based on historical success.
- Synergy: Simulated Annealing is often used as the acceptance criterion within ALNS, deciding whether to keep a newly repaired solution.
Mixed-Integer Linear Programming (MILP)
An exact optimization model with a linear objective and linear constraints where some variables are restricted to integer values. Solved using algorithms like Branch and Bound.
- Guarantee: MILP solvers like Gurobi and CPLEX provide provably optimal solutions or a certified optimality gap.
- Limitation: For large-scale, real-time routing instances, MILP may fail to find a feasible solution within seconds.
- Complement: Simulated Annealing provides fast, near-optimal solutions when MILP is computationally intractable, often serving as a warm-start for exact solvers.
Multi-Objective Optimization
The process of simultaneously optimizing conflicting objectives, such as minimizing cost while maximizing service level. Simulated Annealing can be extended to multi-objective problems through several strategies:
- Weighted Sum: Combine objectives into a single scalar function with user-defined weights.
- Pareto Simulated Annealing: Maintain an archive of non-dominated solutions and use dominance-based acceptance criteria.
- Pareto Frontier: The resulting set of trade-off solutions where improving one objective degrades another, enabling decision-makers to select the optimal balance.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us