feldtruby 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad952a39bbe9677ec2b77ad2c6e31fc5f36bf0a1
4
- data.tar.gz: b56013ccf611756359d1d5b693fd6fb2bbbad34b
3
+ metadata.gz: f017a746cfb0c942893d7207ddcd0ec3d3a2a252
4
+ data.tar.gz: 475222949c01be1ae9dbb5678b4f2da00bf5a877
5
5
  SHA512:
6
- metadata.gz: cb3b0858ec241137b537d803cd451a53266b0e19d41fe230b7e2372992cd1841b19e1b1f4b2eb1467f57852f3eeaca9fb20d19d7b5d6e8f0c9af9631dfd30309
7
- data.tar.gz: 65bc21364e93321ed1f7f87d8d93225a7a390ae96efd0bd7912add8170500588e5deb9ab4d2af1c6df529bf150112823b85221f001a3eb6635af517e539246e0
6
+ metadata.gz: b85a1f419930ec29d072227bfa3423b3088f2befc4755d60df2cf8f870407d35cb84b2684074917c38aa3904e697476bc6ea9d5ecb633e0692e9a2c274fb6c02
7
+ data.tar.gz: f825a6ee4384822a133f39df4f8c1867f42e611e2cdb307bcf2eaf3771860435f2ed1cd7440210b0841c2040f83e4affd1744023350154e40095dd272679b6d1
@@ -9,7 +9,7 @@ module FeldtRuby
9
9
  class Logger
10
10
  DefaultParams = {
11
11
  :verbose => false,
12
- :printFrequency => 0.0 # Minimum seconds between consecutive messages printed for the same event type
12
+ :printFrequency => 0.4 # Minimum seconds between consecutive messages printed for the same event type
13
13
  }
14
14
 
15
15
  UnixEpoch = Time.at(0)
@@ -67,7 +67,7 @@ class DEOptimizerBase < EvolutionaryOptimizer
67
67
  "Trial Quality" => @objective.quality_of(trial),
68
68
  "Target" => target,
69
69
  "Target Quality" => @objective.quality_of(target)
70
- }, "DE (step #{@num_optimization_steps}): Trial vector was better than target vector"
70
+ }, "DE (step #{@num_optimization_steps}): Trial vector was better than target vector", true
71
71
  update_candidate_in_population(target_index, trial)
72
72
  feedback_on_trial_vs_target(trial, target, true)
73
73
  else
@@ -262,7 +262,7 @@ class Objective
262
262
  max = @global_max_values_per_goal[index]
263
263
 
264
264
  return unless qValue
265
-
265
+
266
266
  if qValue < min
267
267
 
268
268
  @global_min_values_per_goal[index] = qValue
@@ -462,7 +462,7 @@ class QualityValue
462
462
  end
463
463
 
464
464
  def to_s
465
- subqs = sub_qualities.map {|f| f.to_significant_digits(3)}
465
+ subqs = sub_qualities.map {|f| f ? f.to_significant_digits(3) : nil}
466
466
  # Note! We ask for the value first which guarantees that we then have a version number.
467
467
  qstr = "#{value.to_significant_digits(4)}"
468
468
  "#{qstr} (SubQs = #{subqs.inspect}, ver. #{@version})"
@@ -1,3 +1,3 @@
1
1
  module FeldtRuby
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
@@ -492,9 +492,11 @@ describe "Can handle objectives that return nil" do
492
492
  q1 = o.quality_of([1])
493
493
  q1.sub_qualities.must_equal [1]
494
494
  q1.value.must_equal 0.0 # Perfect score
495
+ q1.to_s.must_equal "0.0 (SubQs = [1.0], ver. 2)"
495
496
 
496
497
  q2 = o.quality_of([])
497
498
  q2.sub_qualities.must_equal [nil]
498
499
  q2.value.must_equal 1000.0 # Max penalty
500
+ q2.to_s.must_equal "1000.0 (SubQs = [nil], ver. 2)"
499
501
  end
500
502
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feldtruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Feldt