How to use all cores of the computer in Aimms

Introduction
Running combinatorial optimization problems in Aimms is, most of times, a hard task (if the problem is easy, you don’t need to pay a lot of money in the Aimms license – use COIN-OR’s CBC, Excel or something else).

But, when you run Aimms in default mode, it uses only one core of the computer. It sees to be a waste of resources, since your company probably bought a mighty computer to run Aimms.

One frequent question is: how to use all cores of the computer?

 


 

Barrier
The way to answer the question is simple. Just set the LP method to “Barrier”, and set the parallel configurations as following instructions:

LP_Method.png
In Settings -> Project options -> (your solver) -> General -> LP Method := change it to barrier
Other configuration:

LP_Method_config.png

In Settings -> Project options -> (your solver) -> Parallel -> Global thread limit := set with the number of cores of your computer
In Settings -> Project options -> (your solver) -> Parallel -> Parallel mode := set with “opportunistic”

And voilá, now the computer is using all cores of the computer.

AllCores.png
In this example, the CPU is in 100% – using the 4 cores of the computer

A word of caution here: the solver must allow this barrier parallel configuration, otherwise there’s no deal.

How to know which solver  is running? Just check it in Settings -> Solver configuration

 

Solver.png


 

What the hell is barrier?

In default mode, Aimms use the famous Simplex method (or similar variant). The Simplex begin with a feasible solution, then improves it by searching the corners of the Simplex polyhedron.

Simplex.PNG
Illustration of the feasible region of a problem
The Barrier method is an Interior Point method. It begins in a point, then improves it following the direction of most gain. Since there are lots of ways to follow this interior path, it makes sense to do this in parallel.

barrier.PNG
Barrier method

 

This textbook of Robert Vanderbei is the source of these two images, and also an excellent introduction to the barrier method.

 


 

Does this parallelization  really works?

It can not be said surely for every case that it will work, since it depends on the model.

I can say that in every model I tested, for my work, it improved slightly the solution. The objective function was 2% – 5% better using the parallel barrier method (to the same limited solution time).

 


 

Conclusion

 

The use of barrier parallel method can improve the solution, but not much. Anyway, it is an interesting feature to be explored.

 

Arnaldo Gunzi

Feb 2016