linopy
linopy copied to clipboard
Optionally release memory during solving process
We could optionally write the model references to a NetCDF file just before the solving process and reassign afterwards. This could reduce the total memory usage by 30%. (Example: for a 112 GB peak memory example solving, 31 GB was held by linopy and 81 GB by gurobi.)
I am testing https://github.com/PyPSA/linopy/pull/281 on larger problems of PyPSA-Eur with multiple planning horizons and scenarios. While waiting for a token, I have a lot of memory allocated for each waiting solve_sector_network_myopic. Could my problem be related to this issue ? Thanks