-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance v0.11.0 #1015
base: main
Are you sure you want to change the base?
Conversation
Benchmark ResultsBenchmark in progress... |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
==========================================
+ Coverage 95.22% 95.24% +0.01%
==========================================
Files 29 29
Lines 1152 1156 +4
==========================================
+ Hits 1097 1101 +4
Misses 55 55 ☔ View full report in Codecov by Sentry. |
48bfb7a
to
f3cda08
Compare
I don't know what is the error in the benchmark, but it doesn't seem related to the cancellation due to exceeded time. Does it run the benchmark locally? |
f3cda08
to
c99898e
Compare
I forgot to update the duration for the incoming inflows. I fixed and it runs locally. The results in v0.10.4 are here: #1013 (comment) I expect this Benchmark to be around the same time, which is good since we achieve more or less the same performance we got in that version, but...20min to create the model is too much :/ Especially since the hourly problem of the whole year (a bigger problem) takes around 5 minutes to create. The bottleneck is this function |
That's the counterpart of https://github.com/TulipaEnergy/TulipaEnergyModel.jl/pull/987/files#diff-43e9d15ce9a457e188412a614efc15efee4860e85525d1b47ef2892074e90d43, right? Hopefully something similar to what was done there, i.e., change the loops to use DuckDB tables and explicit mark some parts with types. I used Cthulhu and |
So, to recap (for myself and having things clear), we have identified two bottlenecks:
The first point leaves us at a similar performance level to v0.10.4 (which is still slow for the use cases we are solving now). The second point is challenging, but it feels the way to go. I will try to think about it, too, but if you have time between the multi-year refactor and this, it would be appreciated. Thanks! |
I will try to spend some time on it |
JuMP.add_to_expression!
andsubset
when creating the constraints over clustered year (inter-temporal constraints) to improve efficiency.Related issues
Closes #1014
Checklist
I am following the contributing guidelines
Tests are passing
Lint workflow is passing
Docs were updated and workflow is passing