OSeMOSYS / OSeMOSYS_Pyomo

The Pyomo implementation of OSeMOSYS
Apache License 2.0
15 stars 15 forks source link

Missing RE Production Target constraints #8

Closed willu47 closed 4 years ago

willu47 commented 4 years ago

@ThomasHeggarty that, along with the storage constraints (see #1 and #2 ), the pyomo code is also missing the "RE Production Target constraints", despite being in the official OSeMOSYS problem description. I do not know if this is deliberate; @ThomasHeggarty has written the associated pyomo code and can upload it if need be.

willu47 commented 4 years ago

@ThomasHeggarty - if you can submit a pull request with these constraints included, that would be great, thank you!

ThomasHeggarty commented 4 years ago

Hi @willu47 - As requested, see #9 I have used the new code formatting you have proposed for constraints, which certainly enhances code readability. To improve it yet further, I would suggest removing the two carriage returns between a rule definition and its association to a constraint, as these are non dissociable concepts.

I will gladly perform this reformating if need be; I can also spend some time solving format inconsistencies (e.g. order in which sets appear in parameter, variable and constraint definitions).

willu47 commented 4 years ago

Hi @ThomasHeggarty - I used an automatic code linter called Black to reformat the code. It is possible to automate the formatting on every commit to git, and also to configure this - a lot easier than manually formatting.