KTH-dESA / OSeMOSYS_step

Scripts to conduct myopic runs with OSeMOSYS models
MIT License
0 stars 2 forks source link

Limits clashing with solver tolerance #36

Closed HauHe closed 1 year ago

HauHe commented 2 years ago

When passing the installed capacity from one step to the next OSeMOSYS might crash if the installed capacity passed is slightly higher than implemented limits due to the tolerance of solvers.

HauHe commented 1 year ago

Hi @trevorb1, I'm not sure if we discussed this issue. I had fixed it in the code before you started working, but I think I didn't mention it to you and in your code I couldn't find if you consider this. The issue is that solvers have a bit of a tolerance, i.e., if I have for example a TotalAnnualCapacityLimit of 5 the solution might indicate 5.0000001. I fixed this issue by rounding the NewCapacity to 4 digits.

trevorb1 commented 1 year ago

@HauHe, did you want to check that the solution in PR #58 is what you had intended, please!

HauHe commented 1 year ago

Thanks for the quick fix! Looks good!