Class: MinContinousFunction

Inherits:
FeldtRuby::Optimize::Objective show all
Defined in:
lib/feldtruby/optimize/problems/single_objective_problems.rb

Direct Known Subclasses

MinSingleObjectiveFunc

Instance Attribute Summary

Attributes inherited from FeldtRuby::Optimize::Objective

#best_candidate, #current_version, #global_max_values_per_goal, #global_min_values_per_goal

Attributes included from FeldtRuby::Logging

#logger

Instance Method Summary collapse

Methods inherited from FeldtRuby::Optimize::Objective

#aggregated_quality, #calculate_sub_qualities_of, #goal_methods, #hat_compare, #initialize, #invalidate_quality_of, #is_better_than?, #is_better_than_for_goal?, #is_goal_method?, #is_min_goal?, #is_min_goal_method?, #map_candidate_to_object_to_be_evaluated, #note_end_of_optimization, #num_goals, #quality_of, #rank_candidates, #sub_qualities_of, #weights, #weights=

Methods included from FeldtRuby::Logging

#__find_logger_set_on_instance_vars, #new_default_logger, #setup_logger_and_distribute_to_instance_variables

Constructor Details

This class inherits a constructor from FeldtRuby::Optimize::Objective

Instance Method Details

#dimensionsObject

Subclasses should fix this value.



5
6
7
# File 'lib/feldtruby/optimize/problems/single_objective_problems.rb', line 5

def dimensions
  @dimensions
end

#domain_as_mins_maxsObject

For more complex domains sub-classes can override this method.



17
18
19
# File 'lib/feldtruby/optimize/problems/single_objective_problems.rb', line 17

def domain_as_mins_maxs
  [domain_per_dimension] * self.dimensions
end

#domain_per_dimensionObject

Domain (min, max) per dimension. Override this (or just override search_space or domain_as_mins_maxs directly) so that a typical/valid search space can be created.

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/feldtruby/optimize/problems/single_objective_problems.rb', line 12

def domain_per_dimension
  raise NotImplementedError
end

#search_spaceObject

Create a valid search space. Default is to use the domain_per_dimension a dimension number of times.



23
24
25
# File 'lib/feldtruby/optimize/problems/single_objective_problems.rb', line 23

def search_space
  FeldtRuby::Optimize::SearchSpace.new_from_min_max_per_variable domain_as_mins_maxs
end