quintel / merit

A system for calculating hourly electricity and heat loads with a merit order
MIT License
3 stars 2 forks source link

It would be nice if the scaled demand curve used in a merit run is also available for download #127

Closed ChaelKruip closed 8 years ago

ChaelKruip commented 8 years ago

Right now, the load curves and the price curve are available but the demand is not shown.

antw commented 8 years ago

the scaled demand curve [should be] available for download

In which application?

ChaelKruip commented 8 years ago

In which application?

ETEngine. Would it be extra work to make it available in ETMoses too?

jorisberkhout commented 8 years ago

Assigning @grdw to pick this up as a part of the 'merit order charts' Closely related to quintel/etmodel#2076.

grdw commented 8 years ago

This sounds as though changing

def load_curves
  columns = []
  participants.producers.each do |producer|
    columns << [producer.key,
                producer.class,
                producer.output_capacity_per_unit,
                producer.number_of_units,
                producer.load_curve.to_a
               ].flatten
  end
  columns.transpose
end
def load_curves
  columns = []
  (participants.users + participants.producers).each do |producer| # <-- line that changed
     columns << [producer.key,
                 producer.class,
                 producer.output_capacity_per_unit,
                 producer.number_of_units,
                 producer.load_curve.to_a
                ].flatten
  end
  columns.transpose
end

in here.

But this is a first guess and I have no idea if load_curves is used elsewhere in other repositories.

antw commented 8 years ago

This sounds as though changing [...] in here.

If that's the case, I think just participants.each { ... } would do the trick (users + producers = participants). Might be a good opportunity to improve this by changing it to map instead?