10
11
12
13
14
15
|
# File 'lib/sa.rb', line 10
def simulated_annealing(unit, options)
opts = options.each_with_object({}) {|kv, r| r[kv.first.to_sym] = kv.last }
ctx = SA::Context.new
ctx.annealing(unit, opts[:temp], opts[:stop_temp], opts[:cool])
return unit
end
|