IEA-ETSAP Forum

Full Version: Rough investigation: Open-source solver time and memory penalties
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Amazing work! Splatting your code into a single function again, its second run is now 0.29 s on my laptop: https://github.com/willcattoneeca/TIMES....profile.jl Create model: 0.000041 seconds (86 allocations: 9.000 KiB) System Sets: 0.000055 seconds (92 allocations: 28.742 KiB) Get data: 0.110945 seconds (104.69 k allocations: 4.798 MiB) Parameters: 0.000059 seconds (32 allocations: 1.242 KiB) Compute sets: 0.001620 seconds (6.75 k allocations: 417.859 KiB) Compute indexes: 0.005775 seconds (23.50 k allocations: 1.590 MiB) Variables: 0.007354 seconds (79.15 k allocations: 4.354 MiB) Objective: 0.000033 seconds (37 allocations: 2.172 KiB) Constraints: 0.064133 seconds (235.10 k allocations: 11.046 MiB) Running HiGHS 1.7.2 (git hash: 5ce7a2753): Copyright © 2024 HiGHS under MIT licence terms Coefficient ranges: Matrix [1e-02, 1e+04] Cost [1e+00, 1e+00] Bound [1e-01, 1e+01] RHS [9e-02, 8e+03] Presolving model 265 rows, 293 cols, 971 nonzeros 0s 228 rows, 245 cols, 826 nonzeros 0s Presolve : Reductions: rows 228(-376); columns 245(-1745); elements 826(-1094) Solving the presolved LP Using EKK dual simplex solver - serial Iteration Objective Infeasibilities num(sum) 0 1.2861637975e+04 Pr: 30(74.9799) 0s 158 3.8706151237e+04 Pr: 0(0); Du: 0(7.81597e-14) 0s Solving the original LP from the solution after postsolve Model status : Optimal Simplex iterations: 158 Objective value : 3.8706151237e+04 HiGHS run time : 0.05 Solve model: 0.086538 seconds (20.44 k allocations: 1.766 MiB) End to end model run: 0.291531 seconds (470.35 k allocations: 24.025 MiB)
Indeed, it looks pretty good now!  One should now still check for the correctness of the model generated, if not yet checked. And perhaps put some more thought on how to best organize the code.  But otherwise, I think one would be good to go to test with larger model instances.  I could generate SQLite databases, consistent with the Utopia database, for suitable instances, if desired.
Thanks @willcattoneeca, feels great to see that speed up! Thanks @Annti-L! Testing with larger models, sounds great. I will make adjustments to enable specifying a filepath as input. Do you have any suggestions for an efficient way of checking the correctness of a generated model? I've been mainly using the value of objective function and randomly checking some of the generated equations so far.
Pages: 1 2 3