Skip to content

Commit

Permalink
Fix nil temperature error
Browse files Browse the repository at this point in the history
  • Loading branch information
3zcurdia committed Jun 17, 2020
1 parent 2c1fcef commit 6734b16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/annealing/simulator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(temperature: nil, cooling_rate: nil)
@temperature = temperature || Annealing.configuration.temperature
@cooling_rate = cooling_rate || Annealing.configuration.cooling_rate

raise 'Invalid initial temperature' if temperature.negative?
raise 'Invalid initial temperature' if @temperature.negative?

normalize_cooling_rate
end
Expand Down

0 comments on commit 6734b16

Please sign in to comment.