'Is it possible to engage multiple cores (like gcc -j8) when solving with Pyomo?

The power flow library PyPSA uses Pyomo. I am trying to reduce the cost of each linear optimal power flow simulation.

I read through the Pyomo docs. Nothing sticks out at me yet. Perhaps it is not possible to split up the processing when solving linear optimisation problems.

Ubuntu 19.04, i5-4210U 1.70 GHz, 8 Gb RAM



Solution 1:[1]

When you talk about processing there are two things to consider. Processing to write the .lp file and processing to solve the problem with an optimization solver.

First, writing the .lp file is to my knowledge not yet parallelized in Pyomo. PyPSA developers created Linopy to parallel the processing to reduce RAM requirements and increase the speed.

Second, parallelizing the solver processing depends on the solver. PyPSA-Eur has an example of integration for that for Gurobi, and CPLEX. The performant open-source solver HiGHS can also something like that see here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Max Parzen