Make storage_cost configurable
This commit is contained in:
@@ -6,8 +6,8 @@ class Cost
|
||||
attr_accessor :max_charge_kwh
|
||||
attr_reader :battery, :entsoe
|
||||
|
||||
def initialize(battery_capacity=10.0, max_charge=5.0)
|
||||
@entsoe = Entsoe.new
|
||||
def initialize(battery_capacity=10.0, max_charge=5.0, storage_cost=0.05)
|
||||
@entsoe = Entsoe.new(storage_cost)
|
||||
@max_charge_kwh = max_charge
|
||||
@battery = Battery.new(battery_capacity)
|
||||
end
|
||||
@@ -197,7 +197,7 @@ class Cost
|
||||
oxxio_rate,
|
||||
oxxio_cost]
|
||||
|
||||
p "%s,%s,%s,%s,%s,%s,%s,%0.02f,%s,%s,%s,%s,%s" % (one_hour[0..7] + one_hour[8..12].map{|c| format_cost(c)})
|
||||
p "%s,%s,%s,%s,%s,%s,%s,%0.1f,%s,%s,%s,%s,%s" % (one_hour[0..7] + one_hour[8..12].map{|c| format_cost(c)})
|
||||
result << one_hour
|
||||
|
||||
hour_start = hour_start.advance(:hours => 1)
|
||||
|
||||
Reference in New Issue
Block a user