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
3
votes
0 answers

How does the spinglass community detection algorithm implemented in igraph work?

I want to use community_spinglass for my research, but I cannot figure out exactly what it does. I read the reference "Statistical Mechanics of Community Detection", which states that they use simulated annealing, but not exactly how. So I would…
Freja
  • 31
  • 1
3
votes
2 answers

How to efficiently select neighbour in 1-dimensional and n-dimensional space for Simulated Annealing

I would like to use Simulated Annealing to find local minimum of single variable Polynomial function, within some predefined interval. I would also like to try and find Global minimum of Quadratic function. Derivative-free algorithm such as this is…
John
  • 5,189
  • 2
  • 38
  • 62
3
votes
1 answer

Efficient approach in the grid

Problem: we have to fill a 2D grid of size m*n with characters from the set S such that number of distinct sub-matrices in the resulting grid are close to a given number k. This question is derived from…
v78
  • 2,803
  • 21
  • 44
3
votes
2 answers

How to put mathematical constraints with GenSA function in R

I am currently trying to use Simulated Annealing package GenSA in order to minimize the function below : efficientFunction <- function(v) { t(v) %*% Cov_Mat %*% v } Where Cov_Mat is a covariance matrix obtained from 4 assets and v is a…
ArtMgn
  • 45
  • 5
3
votes
2 answers

looking for simulated annealing implementation in VB

Is anyone aware of a reasonably well documented example of simulated annealing in Visual Basic that I can examine and adapt?
Shane Miskin
  • 1,911
  • 2
  • 22
  • 30
2
votes
1 answer

How to avoid getting trapped in local minimum in 8-queens using min-conflicts heuristic

I have written the following code to solve the n-queens problem: (defun solve (board max-steps) (enforce-one-queen-per-column board) (dotimes (step max-steps) ; repeat for a max amount of times, (if (eql (get-threatened-queens…
brienna
  • 1,415
  • 1
  • 18
  • 45
2
votes
0 answers

Training Neural Network with Simulated Annealing

I am trying to train a simple neural network with simulated annealing. I have programmed a neural network with an input layer of 784 input nodes (28 x 28 pixels: I am using the MNIST database to train), 1 hidden layer with 100 nodes and an output…
user248463
  • 21
  • 2
2
votes
2 answers

Graph Coloring with using Simulated Annealing

I am trying to come up with the algorithm for a Graph Coloring problem using Simulated Annealing. There is the general algorithm online, but when i look at it, I couldn't understand how can apply this algorithm on this problem. Each node in graph…
M-Razavi
  • 3,327
  • 2
  • 34
  • 46
2
votes
1 answer

N queens problem using Simulated Annealing

I am trying to come up with the algorithm for my n queens using Simulated Annealing. There is the general algorithm online, but when i look at it, I couldn't understand how it work. My nodes only have the value about number of hit that is on the…
Roba
  • 21
  • 1
  • 2
2
votes
1 answer

Encog Simulated Annealing Parameters

I have done some extensive research on SA (Simulated Annealing). Even so, I am having a hard time understanding how to find input parameters. In all of my research it seems you just start with a shot in the dark and adjust from there. That seems…
Kenny Barker
  • 75
  • 1
  • 5
2
votes
2 answers

Simulated Annealing and Yahtzee!

I've picked up Programming Challenges and found a Yahtzee! problem which I will simplify: There are 13 scoring categories There are 13 rolls by a player (comprising a play) Each roll must fit in a distinct category The goal is to find the maximum…
atp
  • 30,132
  • 47
  • 125
  • 187
2
votes
1 answer

simulated annealing - sensor positioning in sensor networks

Hi I have a litte problem with understanding problem of localization sensors in wireless sensor networks. Based on that article http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.110.2833&rep=rep1&type=pdf I'm about to write a little…
sensorlearner
  • 51
  • 1
  • 2
2
votes
0 answers

Vehicle routing using genetic algorithm

I've the following problem: 1 vehicle to collect the maximum profit of the 7 parking meters The profit of each parking meter are fixed in a vector profit<-c(0,249,289,381,325,338,216,757) First value means the deport, the vehicle starts from…
2
votes
1 answer

I write this code of Simulated Annealing for TSP and I have been trying all day to debug it but something goes wrong

This code suppose to reduce the distance of initial tour: distan(initial_tour) < distan(best) . Can you help me plz? I 've been trying all day now. Do I need to change my swapping method? Something goes wrong and the simulated annealing does'not…
van boeren
  • 169
  • 2
  • 2
  • 9
2
votes
0 answers

calculating a good initial temperature for simulated annealing

I've done some testing of different initial temperatures in my simulating annealing algorithm and noticed the starting temperature has an affect on the performance of the algorithm. Is there any way of calculating a good initial temperature?
1 2
3
12 13