Two places in the code require the duals to be accessed, transposed, and multiplied by the time weights and model scaling factor. This is currently done with two quite slow loops. This PR replaces the loops with broadcast methods and the transpose function.
Liquid fuels currently balances supply and demand on an annual basis. These functions will need to be changed if we change this to hourly or another time basis.
Fixes issue \
No associated issue
Type of change
[x] Performance improvement
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
[x] Example_Systems/SmallNewEngland/OneZone
[x] Example_Systems/SmallNewEngland/ThreeZones
Test Configuration:
OS: Windows 10
Solver: Gurobi
Julia version: Julia 1.10.2
Solver version: 10.0
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] I have run tests with my code to avoid compatibility issues
[x] Any dependent changes have been merged and published in downstream modules
Description
Two places in the code require the duals to be accessed, transposed, and multiplied by the time weights and model scaling factor. This is currently done with two quite slow loops. This PR replaces the loops with broadcast methods and the transpose function.
Liquid fuels currently balances supply and demand on an annual basis. These functions will need to be changed if we change this to hourly or another time basis.
Fixes issue \
No associated issue
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:
Checklist: