Method: Solver#initialize
- Defined in:
- lib/solver.rb
#initialize(time_value:, lower_bound: 0.00, upper_bound: nil, guess: 10.00) ⇒ Solver
Returns a new instance of Solver.
9 10 11 12 13 14 15 16 17 |
# File 'lib/solver.rb', line 9 def initialize(time_value:, lower_bound: 0.00, upper_bound: nil, guess: 10.00) @upper_bound = upper_bound || guess @lower_bound = lower_bound @time_value = time_value.dup @time_value.i = guess @goal = time_value.fv @upper_cap_met = false @iteration_count = 0 end |