fuzzy_associative_memory 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +1 -1
- data/bin/hvac_system_example.rb +5 -15
- metadata +1 -1
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Changelog for fuzzy-associative-memory
|
2
2
|
|
3
|
-
## 1.3.
|
3
|
+
## 1.3.1, 2 September 2013
|
4
4
|
* Massive performance and efficiency effort. This version of the Gem clocks in at 3.5x the speed of my 1.1 series in synthetic benchmarks. If you use the FAM in a tight loop, this will help a lot.
|
5
5
|
|
6
6
|
## 1.2.0, 23 August 2013
|
data/bin/hvac_system_example.rb
CHANGED
@@ -38,7 +38,7 @@ hot = FuzzyAssociativeMemory::Trapezoid.new(80, 90, 90, 90)
|
|
38
38
|
|
39
39
|
temperature_in.sets = [cold, cool, just_right, warm, hot]
|
40
40
|
# Comment out if you don't have Gnuplot installed:
|
41
|
-
|
41
|
+
temperature_in.gnuplot({:logarithmic_x=>false})
|
42
42
|
|
43
43
|
# The output side -- the consequent -- expressed as a number of fuzzy sets,
|
44
44
|
# with each set representing a natural-language description. The 'resultant
|
@@ -53,7 +53,7 @@ blast = FuzzyAssociativeMemory::Triangle.new(70, 100, 130)
|
|
53
53
|
|
54
54
|
fan_speed.sets = [stop, slow, medium, fast, blast]
|
55
55
|
# Comment out if you don't have Gnuplot installed:
|
56
|
-
|
56
|
+
fan_speed.gnuplot({:logarithmic_x=>false})
|
57
57
|
|
58
58
|
# Natural-language marriage of the inputs to the outputs, e.g.
|
59
59
|
# "If the temperature is cool, the fan motor speed should be slow."
|
@@ -71,16 +71,6 @@ system.rules = [rule_1, rule_2, rule_3, rule_4, rule_5]
|
|
71
71
|
# puts "The #{system.name} determines: for #{temperature_in.name} #{n}, the #{fan_speed.name} is #{system.calculate(n)} CFM"
|
72
72
|
|
73
73
|
# Check the logic for a wide range of temps and output the results
|
74
|
-
|
75
|
-
#
|
76
|
-
|
77
|
-
(40..90).each do |n|
|
78
|
-
system.calculate(n)
|
79
|
-
#puts "The #{system.name} determines: for #{temperature_in.name} #{n}, the #{fan_speed.name} is #{system.calculate(n)} CFM"
|
80
|
-
end
|
81
|
-
end
|
82
|
-
#end
|
83
|
-
|
84
|
-
# profile_printer = JRuby::Profiler::FlatProfilePrinter.new(profile_data)
|
85
|
-
# profile_printer.printProfile(STDOUT)
|
86
|
-
|
74
|
+
(40..90).each do |n|
|
75
|
+
puts "The #{system.name} determines: for #{temperature_in.name} #{n}, the #{fan_speed.name} is #{system.calculate(n)} CFM"
|
76
|
+
end
|