Skip to content

Commit

Permalink
Minor code refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Nov 14, 2024
1 parent 1cf80b3 commit 1f28857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
6 changes: 3 additions & 3 deletions ReportUtilityBills/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>report_utility_bills</name>
<uid>ca88a425-e59a-4bc4-af51-c7e7d1e960fe</uid>
<version_id>31b1e987-41c7-4d52-965d-a902f73bcd90</version_id>
<version_modified>2024-10-31T03:05:02Z</version_modified>
<version_id>6b3c51ee-095b-455c-b1f1-a1cb47e3b4a8</version_id>
<version_modified>2024-11-14T00:26:10Z</version_modified>
<xml_checksum>15BF4E57</xml_checksum>
<class_name>ReportUtilityBills</class_name>
<display_name>Utility Bills Report</display_name>
Expand Down Expand Up @@ -318,7 +318,7 @@
<filename>util.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>22F928DB</checksum>
<checksum>2D0AE661</checksum>
</file>
<file>
<filename>Contains Demand Charges.json</filename>
Expand Down
15 changes: 1 addition & 14 deletions ReportUtilityBills/resources/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,7 @@ def initialize(meters: [], units:)
class UtilityRate
def initialize()
@flat_rate = 0.0
@real_time_prices = nil

@fixed_charge_monthly = nil
@fixed_charge_daily = nil

@min_charge_monthly = 0.0
@min_charge_annual = nil

@net_metering_excess_sellback_type = nil
@net_metering_user_excess_sellback_rate = nil

@feed_in_tariff_rate = nil

@energy_rate_structure = []
@energy_weekday_schedule = []
@energy_weekend_schedule = []
Expand All @@ -46,13 +34,12 @@ def initialize()
@annual_energy_charge = 0.0
@annual_fixed_charge = 0.0
@annual_total = 0.0
@annual_production_credit = 0.0

@monthly_energy_charge = [0.0] * 12
@monthly_fixed_charge = [0.0] * 12
@monthly_total = [0.0] * 12

@monthly_production_credit = [0] * 12
@annual_production_credit = 0.0
end
attr_accessor(:annual_energy_charge, :annual_fixed_charge, :annual_total,
:monthly_energy_charge, :monthly_fixed_charge, :monthly_total,
Expand Down

0 comments on commit 1f28857

Please sign in to comment.