Research Article

Exact and Heuristic Solutions to Minimize Total Waiting Time in the Blood Products Distribution Problem

Algorithm 3

The outline of simulated annealing.
Input: Initial solution 𝑥
Select an initial temperature 𝑇 > 0 ;
Repeat
Local search: ́ 𝑥 a r g m i n 𝑁 ( 𝑥 ) ;
Calculate Δ = 𝑓 ( ́ 𝑥 ) 𝑓 ( 𝑥 ) ;
If Δ < 0 then 𝑥 ́ 𝑥 ;
Elseif random(0,1) < 𝑒 Δ / 𝑇 , then 𝑥 ́ 𝑥 ;
Else
Reject ́ 𝑥 ;
𝑇 = 𝑇 ( 𝑐 ) ;
Until stopping condition is met;