residence 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/residence.rb +19 -19
- data/residence.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/residence.rb
CHANGED
@@ -27,7 +27,7 @@ module BrighterPlanet
|
|
27
27
|
characteristics[:reported_annual_fuel_oil_consumption] * (timeframe / timeframe.year)
|
28
28
|
end
|
29
29
|
quorum 'from research', :needs => [:predicted_annual_fuel_oil_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
30
|
-
(characteristics[:predicted_annual_fuel_oil_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:fuel_oil]).joules.to(:litres_of_fuel_oil) ) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
30
|
+
(characteristics[:predicted_annual_fuel_oil_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:fuel_oil]).joules.to(:litres_of_fuel_oil) ) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -36,7 +36,7 @@ module BrighterPlanet
|
|
36
36
|
characteristics[:reported_annual_natural_gas_consumption] * (timeframe / timeframe.year)
|
37
37
|
end
|
38
38
|
quorum 'from research', :needs => [:predicted_annual_natural_gas_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
39
|
-
(characteristics[:predicted_annual_natural_gas_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:natural_gas])) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
39
|
+
(characteristics[:predicted_annual_natural_gas_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:natural_gas])) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -45,7 +45,7 @@ module BrighterPlanet
|
|
45
45
|
characteristics[:reported_annual_propane_consumption] * (timeframe / timeframe.year)
|
46
46
|
end
|
47
47
|
quorum 'from research', :needs => [:predicted_annual_propane_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
48
|
-
(characteristics[:predicted_annual_propane_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:propane]).joules.to(:litres_of_propane)) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
48
|
+
(characteristics[:predicted_annual_propane_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:propane]).joules.to(:litres_of_propane)) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -54,7 +54,7 @@ module BrighterPlanet
|
|
54
54
|
characteristics[:reported_annual_biomass_consumption] * (timeframe / timeframe.year)
|
55
55
|
end
|
56
56
|
quorum 'from research', :needs => [:predicted_annual_biomass_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
57
|
-
(characteristics[:predicted_annual_biomass_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:biomass])) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
57
|
+
(characteristics[:predicted_annual_biomass_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:biomass])) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -63,7 +63,7 @@ module BrighterPlanet
|
|
63
63
|
characteristics[:reported_annual_kerosene_consumption] * (timeframe / timeframe.year)
|
64
64
|
end
|
65
65
|
quorum 'from research', :needs => [:predicted_annual_kerosene_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
66
|
-
(characteristics[:predicted_annual_kerosene_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:kerosene]).joules.to(:litres_of_kerosene)) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
66
|
+
(characteristics[:predicted_annual_kerosene_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:kerosene]).joules.to(:litres_of_kerosene)) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -72,7 +72,7 @@ module BrighterPlanet
|
|
72
72
|
characteristics[:reported_annual_coal_consumption] * (timeframe / timeframe.year)
|
73
73
|
end
|
74
74
|
quorum 'from research', :needs => [:predicted_annual_coal_consumption, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
75
|
-
(characteristics[:predicted_annual_coal_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:coal]).joules.to(:kilograms_of_coal)) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
75
|
+
(characteristics[:predicted_annual_coal_consumption] + (characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:coal]).joules.to(:kilograms_of_coal)) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
@@ -84,7 +84,7 @@ module BrighterPlanet
|
|
84
84
|
|
85
85
|
committee :green_electricity do
|
86
86
|
quorum 'default' do
|
87
|
-
fallback.green_electricity
|
87
|
+
::Pet.fallback.green_electricity
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
@@ -100,7 +100,7 @@ module BrighterPlanet
|
|
100
100
|
end
|
101
101
|
|
102
102
|
quorum 'from research', :needs => [:predicted_annual_electricity_use, :predicted_fuel_shares, :missing_annual_energy, :occupation] do |characteristics, timeframe|
|
103
|
-
(characteristics[:predicted_annual_electricity_use] + ((characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:electricity]).joules.to(:kilowatt_hours))) * (timeframe / timeframe.year) * characteristics[:occupation] / fallback.occupation
|
103
|
+
(characteristics[:predicted_annual_electricity_use] + ((characteristics[:missing_annual_energy] * characteristics[:predicted_fuel_shares][:electricity]).joules.to(:kilowatt_hours))) * (timeframe / timeframe.year) * characteristics[:occupation] / ::Pet.fallback.occupation
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
@@ -166,7 +166,7 @@ module BrighterPlanet
|
|
166
166
|
|
167
167
|
committee :occupation do
|
168
168
|
quorum 'default' do
|
169
|
-
fallback.occupation
|
169
|
+
::Pet.fallback.occupation
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
@@ -176,7 +176,7 @@ module BrighterPlanet
|
|
176
176
|
end
|
177
177
|
|
178
178
|
quorum 'default' do
|
179
|
-
fallback.residents_before_type_cast
|
179
|
+
::Pet.fallback.residents_before_type_cast
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
@@ -238,7 +238,7 @@ module BrighterPlanet
|
|
238
238
|
end
|
239
239
|
|
240
240
|
quorum 'default' do
|
241
|
-
fallback.annual_fuel_oil_volume_estimate
|
241
|
+
::Pet.fallback.annual_fuel_oil_volume_estimate
|
242
242
|
end
|
243
243
|
end
|
244
244
|
|
@@ -267,7 +267,7 @@ module BrighterPlanet
|
|
267
267
|
end
|
268
268
|
|
269
269
|
quorum 'default' do
|
270
|
-
fallback.monthly_natural_gas_volume_estimate * 12
|
270
|
+
::Pet.fallback.monthly_natural_gas_volume_estimate * 12
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
@@ -296,7 +296,7 @@ module BrighterPlanet
|
|
296
296
|
end
|
297
297
|
|
298
298
|
quorum 'default' do
|
299
|
-
fallback.annual_propane_volume_estimate
|
299
|
+
::Pet.fallback.annual_propane_volume_estimate
|
300
300
|
end
|
301
301
|
end
|
302
302
|
|
@@ -312,7 +312,7 @@ module BrighterPlanet
|
|
312
312
|
end
|
313
313
|
|
314
314
|
quorum 'default' do
|
315
|
-
fallback.annual_kerosene_volume_estimate
|
315
|
+
::Pet.fallback.annual_kerosene_volume_estimate
|
316
316
|
end
|
317
317
|
end
|
318
318
|
|
@@ -328,7 +328,7 @@ module BrighterPlanet
|
|
328
328
|
end
|
329
329
|
|
330
330
|
quorum 'default' do
|
331
|
-
fallback.annual_wood_volume_estimate
|
331
|
+
::Pet.fallback.annual_wood_volume_estimate
|
332
332
|
end
|
333
333
|
end
|
334
334
|
|
@@ -340,7 +340,7 @@ module BrighterPlanet
|
|
340
340
|
|
341
341
|
committee :predicted_annual_coal_consumption do # returns kg
|
342
342
|
quorum 'default' do
|
343
|
-
fallback.annual_coal_volume_estimate
|
343
|
+
::Pet.fallback.annual_coal_volume_estimate
|
344
344
|
end
|
345
345
|
end
|
346
346
|
|
@@ -438,7 +438,7 @@ module BrighterPlanet
|
|
438
438
|
end
|
439
439
|
|
440
440
|
quorum 'default' do
|
441
|
-
fallback.monthly_electricity_use_estimate * 12
|
441
|
+
::Pet.fallback.monthly_electricity_use_estimate * 12
|
442
442
|
end
|
443
443
|
end
|
444
444
|
|
@@ -466,14 +466,14 @@ module BrighterPlanet
|
|
466
466
|
|
467
467
|
# This is kindof "hacky"
|
468
468
|
# As implemented, this needs to be above floorspace committee or else cohort will always
|
469
|
-
# use the fallback
|
469
|
+
# use the ::Pet.fallback
|
470
470
|
committee :floorspace_estimate do
|
471
471
|
quorum 'from cohort', :needs => :cohort do |characteristics|
|
472
472
|
characteristics[:cohort].weighted_average :floorspace
|
473
473
|
end
|
474
474
|
|
475
475
|
quorum 'default' do
|
476
|
-
fallback.floorspace_estimate
|
476
|
+
::Pet.fallback.floorspace_estimate
|
477
477
|
end
|
478
478
|
end
|
479
479
|
|
data/residence.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{residence}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andy Rossmeissl", "Seamus Abshere", "Ian Hough", "Matt Kling"]
|