Questions tagged [simulated-annealing]

Simulated annealing (SA) is a generic probabilistic metaheuristic for the global optimization problem of locating a good approximation to the global optimum of a given function in a large search space.

Simulated annealing (SA) is a generic probabilistic metaheuristic for the global optimization problem of locating a good approximation to the global optimum of a given function in a large search space.

It is often used when the search space is discrete (e.g., all tours that visit a given set of cities). For certain problems, simulated annealing may be more efficient than exhaustive enumeration — provided that the goal is merely to find an acceptably good solution in a fixed amount of time, rather than the best possible solution.

The name and inspiration come from annealing in metallurgy, a technique involving heating and controlled cooling of a material to increase the size of its crystals and reduce their defects, both are attributes of the material that depend on its thermodynamic free energy. Heating and cooling the material affects both the temperature and the thermodynamic free energy. While the same amount of cooling brings the same amount of decrease in temperature it will bring a bigger or smaller decrease in the thermodynamic free energy depending on the rate that it occurs, with a slower rate producing a bigger decrease.

This notion of slow cooling is implemented in the Simulated Annealing algorithm as a slow decrease in the probability of accepting worse solutions as it explores the solution space. Accepting worse solutions is a fundamental property of metaheuristics because it allows for a more extensive search for the optimal solution.

The method was independently described by Scott Kirkpatrick, C. Daniel Gelatt and Mario P. Vecchi in 1983, and by Vlado Černý in 1985. The method is an adaptation of the Metropolis-Hastings algorithm, a Monte Carlo method to generate sample states of a thermodynamic system, invented by M.N. Rosenbluth and published in a paper by N. Metropolis et al. in 1953.

Source: Wikipedia (Simulated annealing)

194 questions
2
votes
1 answer

Deterministic Annealing Code

I would like to find an open source example of a code for deterministic annealing. It can be in almost any language: C, C++, MatLab/Octave, Fortran. I have already found a MatLab code for simulated annealing, so MatLab would be best. Here is a paper…
wade
  • 21
  • 2
2
votes
0 answers

Simulated annealing and path finding

I have been reading a lot of literature on Simulated Annealing(SA) and its effectiveness in solving the TSP. This leads me to think if SA could be used to optimize just a source to destination path finding. Basic SA pseudocode (from wiki) s ← s0; e…
2
votes
1 answer

What does T represent in simulated Annealing?

I want to use simulated annealing for different situations. Every simulated annealing algorithm in net provides the algorithm with the temperature example. Like in wiki s ← s0; e ← E(s) // Initial state,…
AtanuCSE
  • 8,832
  • 14
  • 74
  • 112
2
votes
1 answer

Simulated Annealing in C#

I am using simulated annealing to solve a cryptanalysis problem and I've hit a brick wall. I cannot for the life of me get my probability function to operate correctly, it either takes a worse solution too often (so I bounce around a score of 0.03…
doreye01
  • 490
  • 4
  • 11
2
votes
2 answers

Data structure which can revert to a previous state

I'm sorry if this has been asked before, but I'm not really sure what I'm looking for and I lack the domain knowledge to correctly frame the question which make answers rather hard to find! Anyway, I am trying to implement in Python a simulated…
Hassantm
  • 563
  • 1
  • 4
  • 14
2
votes
1 answer

Adding simulated annealing to a simple hill climbing

I've created a hill climbing algorithm which randomly generates a solution then copies that solution and mutates it a little to see if it ends up with a better solution. If it does it keeps the new solution and discards the old one. If I want to add…
Undefined
  • 1,899
  • 6
  • 29
  • 38
1
vote
1 answer

Does any body knows or has a greedy satisfiability(GSAT) and simulated annealing satisfabiilty(SA-SAT) java algorithm?

I am looking for a GSAT and SA-SAT algorithm implemented in java. Does any body know about one? Thank you.
1
vote
1 answer

Implementing Simulated Annealing

I think I understand the basic concept of simulated annealing. It's basically adding random solutions to cover a better area of the search space at the beginning then slowly reducing the randomness as the algorithm continues running. I'm a little…
1
vote
0 answers

How does the dual annealing algorithm work?

I'm using the scipy dual annealing algorithm to minimize a function and I am thinking about how this algorithm actually works in comparison to standard or generalized simulated annealing. I do not understand the maxiter parameter because the…
1
vote
0 answers

Switch positions in array and switch order

As a uni project I'm trying to implement the simulated annealing to solve the traveling salesman problem using python. I need to find the neighbors of my initial solution and I'm not quite sure how can i easily do this in python. For example i have…
1
vote
1 answer

How to design a heuristic algorithm to solve this location optimization problem?

I simplified the problem to the following description: If produce a thing, we need to go through three devices : A, B, C, and it must pass through these devices the order of A->B->C. The device to select an address (from 0 to 7) for installation…
1
vote
0 answers

How can I use GenSA package for optimizition a function that its parameters have discrate range?

I'm working on spatial sampling design. I should maximize a utility function on a grid.By grid I mean (x,y) that have {0,0.01,0.02,0.03,...,1} values. How can I define these parameter;s range in GenSA function? Thank you in advance for your…
za.samadi
  • 11
  • 1
1
vote
1 answer

Optimization variables of a neural network model with simulated annealing

I implement an MLP neural network model on the data, for optimization 4 variables a function base on the MLP model is defined, and simulated annealing run on this function. I don't know why I get this error (attached below). Neural network code: #…
1
vote
1 answer

Simulated annealing fit in Python

I am trying to getting familiar with the non linear fitting procedure: dual-annealing. To do so I generated some synthetic data and try to fit over them a basic Furth formula, see the code below: import numpy as np from numpy import savetxt from…
1
vote
1 answer

Why does Optaplanner not allow configuring the decay rate in simulated annealing?

I want to use Simulated Annealing in OptaPlanner, but I am a little baffled by the fact that there is only a setting for the initial temperature and not one for the decay rate. What is the reason for this choice?
marcotama
  • 1,991
  • 2
  • 19
  • 24