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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

60 CHAPTER 5. BASIC <strong>API</strong> TUTORIAL<br />

Integer solution solution summary<br />

Problem status : PRIMAL FEASIBLE<br />

Solution status : INTEGER OPTIMAL<br />

Primal. obj: 4.0593518000e+005 Viol. con: 4e-015 var: 3e-014 itg: 3e-014<br />

<strong>The</strong> main diffrence compared to continous case covered previously is that no information about the<br />

dual solution is provided. Simply because there is no dual solution available for a mixed integer<br />

problem. In this case it can be seen that the solution is higly feasible because the violations are small.<br />

Moreoever, the solution is denoted integer optimal. Observe itg: 3e-014 implies that all the integer<br />

constrained variables are at most 3e − 014 from being an exact integer.<br />

5.9 Response handling<br />

After solving an optimization problem with <strong>MOSEK</strong> an approriate action must be taken depending on<br />

the outcome. Usually, the expected outcome is an optimal solution, but there may be several situations<br />

where this is not the result. E.g., if the problem is infeasible or nearly so or if the solver ran out of<br />

memory or stalled while optimizing, the result may not be as expected.<br />

This section discusses what should be considered when an optimization has ended unsuccessfully.<br />

Before continuing, let us consider the four status codes available in <strong>MOSEK</strong> that is relevant for the<br />

error handing:<br />

<strong>The</strong> termination code:<br />

<strong>The</strong> termination provides information about why the <strong>optimizer</strong> terminated. For instance if a time<br />

limit has been specfied (this is common for mixed integer problems), the termination code will tell<br />

if this termination limit was the cause of the termination. Note that reaching a prespecfied time<br />

limit is not considered an exceptional case. It must be expected that this occurs occasionally.<br />

Response code:<br />

<strong>The</strong> response code is an information about the system status and the outcome of the call to a<br />

<strong>MOSEK</strong> functionalities. This code is used to report the unexpected failures such as out of space.<br />

<strong>MOSEK</strong> runs silently when no errors are encountered, while an exception is generated otherwise.<br />

See A for a list of possible exceptions.<br />

Solution status:<br />

<strong>The</strong> solution status contains information about the status of the solution, e.g., whether the<br />

solution is optimal or a certificate of infeasibility.<br />

Problem status:<br />

<strong>The</strong> problem status describes what <strong>MOSEK</strong> knows about the feasibility of the problem, i.e., if<br />

the is problem feasible or infeasible.<br />

<strong>The</strong> problem status is mostly used for integer problems. For continuous problems a problem<br />

status of, say, infeasible will always mean that the solution is a certificate of infeasibility. For<br />

integer problems it is not possible to provide a certificate, and thus a separate problem status is<br />

useful.

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

Saved successfully!

Ooh no, something went wrong!