Class: MetaheuristicAlgorithms::FunctionWrappers::RosenbrookFunctionWrapper

Inherits:
AbstractWrapper
  • Object
show all
Defined in:
lib/metaheuristic_algorithms/function_wrappers/rosenbrook_function_wrapper.rb

Instance Method Summary collapse

Instance Method Details

#initial_decision_variable_value_estimatesObject



19
20
21
# File 'lib/metaheuristic_algorithms/function_wrappers/rosenbrook_function_wrapper.rb', line 19

def initial_decision_variable_value_estimates
  [BigDecimal('2'), BigDecimal('2')]
end

#maximum_decision_variable_valuesObject



7
8
9
# File 'lib/metaheuristic_algorithms/function_wrappers/rosenbrook_function_wrapper.rb', line 7

def maximum_decision_variable_values
  [BigDecimal('5'), BigDecimal('5')]
end

#miminum_decision_variable_valuesObject



11
12
13
# File 'lib/metaheuristic_algorithms/function_wrappers/rosenbrook_function_wrapper.rb', line 11

def miminum_decision_variable_values
  [BigDecimal('-5'), BigDecimal('-5')]
end

#objective_function_value(decision_variable_values) ⇒ Object



15
16
17
# File 'lib/metaheuristic_algorithms/function_wrappers/rosenbrook_function_wrapper.rb', line 15

def objective_function_value(decision_variable_values)
  (BigDecimal('1') - decision_variable_values[0]).power(2) + BigDecimal('100') * (decision_variable_values[1] - decision_variable_values[0].power(2)).power(2)
end