quintel / merit

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

Make LoadProfiles area-dependent #95

Closed dennisquintel closed 10 years ago

dennisquintel commented 10 years ago

Before, Merit was indifferent to which area it was calculating. Now, @AlexanderWirtz and @Richard-Deuchler have requested to make the LoadProfiles differ per country. Still, within one Merit Order calculation everything will still happen for the same area.

Now we can do the following in etengine:

Merit.within_area(:eu) do
  o = Merit::Order.new
  o.calculate
end

Calling Merit:Order outside of the block still works, and defaults to the Netherlands. That keeps testing easy (although we could add an around block as a default to every test).

dennisquintel commented 10 years ago

Assigned @antw to review.

antw commented 10 years ago

:+1: Looks good to me. Merged!