25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11.6. SOLVING PROBLEMS IN PARALLEL 149<br />

11.6.2 <strong>The</strong> parallelized interior-point <strong>optimizer</strong><br />

<strong>The</strong> interior-point <strong>optimizer</strong> is capable of using multiple CPUs or cores. This implies that whenever<br />

the <strong>MOSEK</strong> interior-point <strong>optimizer</strong> solves an optimization problem, it will try to divide the work so<br />

that each core gets a share of the work. <strong>The</strong> user decides how many coress <strong>MOSEK</strong> should exploit.<br />

It is not always possible to divide the work equally, and often parts of the computations and the<br />

coordination of the work is processed sequentially, even if several cores are present. <strong>The</strong>refore, the<br />

speed-up obtained when using multiple cores is highly problem dependent. However, as a rule of<br />

thumb, if the problem solves very quickly, i.e. in less than 60 seconds, it is not advantageous to use<br />

the parallel option.<br />

<strong>The</strong> iparam.num threads parameter sets the number of threads (and therefore the number of cores)<br />

that the interior point <strong>optimizer</strong> will use.<br />

11.6.3 <strong>The</strong> concurrent <strong>optimizer</strong><br />

An alternative to the parallel interior-point <strong>optimizer</strong> is the concurrent <strong>optimizer</strong>. <strong>The</strong> idea of the<br />

concurrent <strong>optimizer</strong> is to run multiple <strong>optimizer</strong>s on the same problem concurrently, for instance,<br />

it allows you to apply the interior-point and the dual simplex <strong>optimizer</strong>s to a linear optimization<br />

problem concurrently. <strong>The</strong> concurrent <strong>optimizer</strong> terminates when the first of the applied <strong>optimizer</strong>s<br />

has terminated successfully, and it reports the solution of the fastest <strong>optimizer</strong>. In that way a new<br />

<strong>optimizer</strong> has been created which essentially performs as the fastest of the interior-point and the<br />

dual simplex <strong>optimizer</strong>s. Hence, the concurrent <strong>optimizer</strong> is the best one to use if there are multiple<br />

<strong>optimizer</strong>s available in <strong>MOSEK</strong> for the problem and you cannot say beforehand which one will be<br />

faster.<br />

Note in particular that any solution present in the task will also be used for hot-starting the simplex<br />

algorithms. One possible scenario would therefore be running a hot-start dual simplex in parallel with<br />

interior point, taking advantage of both the stability of the interior-point method and the ability of<br />

the simplex method to use an initial solution.<br />

By setting the<br />

iparam.<strong>optimizer</strong><br />

parameter to<br />

<strong>optimizer</strong>type.concurrent<br />

the concurrent <strong>optimizer</strong> chosen.<br />

<strong>The</strong> number of <strong>optimizer</strong>s used in parallel is determined by the<br />

iparam.concurrent num <strong>optimizer</strong>s.<br />

parameter. Moreover, the <strong>optimizer</strong>s are selected according to a preassigned priority with <strong>optimizer</strong>s<br />

having the highest priority being selected first. <strong>The</strong> default priority for each <strong>optimizer</strong> is shown in<br />

Table 11.6.3. For example, setting the iparam.concurrent num <strong>optimizer</strong>s parameter to 2 tells the<br />

concurrent <strong>optimizer</strong> to the apply the two <strong>optimizer</strong>s with highest priorities: In the default case that<br />

means the interior-point <strong>optimizer</strong> and one of the simplex <strong>optimizer</strong>s.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!