Friday, July 17, 2009

How Bad Is Nitrous For You?

Simulated annealing

The other day I left the issue of proc Edimientos algorithms for solving combinatorial optimization problems pending pick up the thread. I'll take the yarn, to see if the unwinding ...

turns out that there is a type of problems where it is supposed to have one (or several) optimal solutions, but there are a large number of possible options solution to analyze each and choose the best.

Imagine a city where we distribute in the streets the minimum subway station that services to all inhabitants, but optimizing the parameter of "appreciation of closeness of the service" by the citizens so that the overall level of satisfaction offered is the highest possible.

.

.

A meta-heuristic algorithmic procedure could be applied to obtain the best theoretical solution to this combinatorial optimization problem is called "simulated annealing, or tempering simulation.

consists, first, to obtain an expression of "cost function" of each possible solution. The cost function for the present case, it would uramente sec the "global assessment score of the closeness of service", which would take into account "ingredients" and variables for each city, as the distance from home to the nearest metro station, possibly the slope parameters would weigh as / slope of the streets, according to the age of each ... and we would add a factor of care for people with reduced mobility. It also would add criteria for "what level of service" is perceived (or expected) to be satisfactory for every citizen on the basis of whether he lives in a residential area with a high density vertical, or if otherwise lives in a suburb of detached houses. Adding the satisfaction level of appreciation of each citizen, to every distribution solution of a number of p located underground plowed by the town would get the value of "cost function" for this little problem.

From here, leave aside cap "municipal technical" and take the cap of "mathematical analyst" to begin taking smoke into the cost function using the algorithm of yore of simulated annealing. This technique comes from the analogy drawn between the problems of statistical mechanics to find the baseline of a system of several bodies-a liquid, for example-and to find a minimum (or maximum) of a global cost function in an optimization problem com binatoria.

If the temperature of the molecular interaction in a liquid to freeze at once, the result could be a complete mess lens with a higher energy than the crystalline state the correct base. In fact, the molecules found in a local minimum of energy.

However, if the temperature of the liquid is reduced body slowly (annealing) tends towards equilibrium and the liquid freezes through a cooling process that leads to a crystalline state of global energy minimum.

In the analogy made to the combinatorial optimization problem, the variable parameters (where we put the metro stations and how to put the overall cost is minimal) are equated with the atomic positions of the fluid and energy id Intifada is the cost function to optimize (the "global assessment score of the closeness of Service"). The temperature parameter is defined as an algorithmic process control and is related to the probability of changing to a state of lower cost has to be accepted in order to avoid falling into a local minimum.

The simulation algorithm mettle accept a change of solution (or state) when the result of the cost function associated with the new solution is higher. Logical. But if the result of the cost function in the new solution is smaller, the change is accepted with some probability that depends on the temperature that controls the system and decrease the value of the cost function, using a negative exponential function .

The process of algorithm an initial solution c nyone and an initial temperature "environment." Gets the cost function and explores, in a suitable number of iterations, the state space environment. The environment is analyzed by making a basic disturbance in the current solution and applying the criterion of acceptance of the new proposed solution according to the probability defined.

Initially, when the temperature is relatively high nte , accepted changes in solution despite the declines in the cost function are important. Then, as the temperature decreases, deteriorations are accepted increasingly smaller. This feature of the algorithm is what allows you to be able to escape the local minimum and ensure a good convergence of the method in a large class of problems and state space. One of the keys to the success of this meta-heuristic method.

.

The temperature decreases slightly, and the algorithmic system is cooled to a stop when it meets one of the criteria for final calculation (a few changes accepted, no result has increased the cost function in the last temperature, etc..) So, is chosen as the best result this solution, all the states where he has spent the algorithm, the greatest cost function or global assessment score of the closeness of service "has given us.

algorithm simulating the temple, but has not gone through all the nearly infinite state space solutions, has a high degree success and adaptability to many combinatorial optimization problems. The method ensures a good convergence towards the global optimal solution in a number of iterations assumable be calculated by a computer program in an acceptable computing time and in accordance with the magnitude of the problem at hand.