### Table of Contents

**MOSEK ApS, C/O Symbion Science Park, Fruebjergvej 3, Box 16, 2100 Copenhagen Ø, Denmark**

# Introduction

MOSEK is a software package for the solution of linear, mixed-integer linear, quadratic, mixed-integer quadratic, quadratically constraint, convex nonlinear, and semidefinite mathematical optimization problems. MOSEK is particularly well suited for solving large-scale linear, convex quadratically constraint, and conic programs using an extremely efficient interior point algorithm.

These problem classes can be solved using an appropriate optimizer built into MOSEK. All the optimizers available in MOSEK are built for the solution of large-scale sparse problems. Current optimizers include:

- Interior-point optimizers for continuous and conic problems
- Simplex optimizer for linear problems
- Branch-and-cut optimizer for mixed-integer linear, quadratic, and conic problems

## Licensing

Licensing of GAMS/MOSEK is similar to other GAMS solvers. MOSEK is licensed in four different ways:

**GAMS/MOSEK Base:**

All model types.**GAMS/MOSEK Extended:**

Same as GAMS/MOSEK Base.**GAMS/MOSEK Solver Link:**

Users must have a seperate, licensed MOSEK system. For users who wish to use MOSEK within GAMS and also in other environments.**GAMS/OsiMosek:**

Finally, a bare-bone interface to the LP and MIP solver of Mosek is available under the name OSIMOSEK. It comes free of charge with any GAMS system.

For information regarding MOSEK standalone or interfacing MOSEK with other applications contact sales. @mos ek.co m

## Solving Problems in Parallel

MOSEK can exploit multiple CPUs (or a CPU with multiple cores) to solve an optimization problem when using the interior-point or the mixed-integer optimizers.

This implies that whenever the MOSEK interior-point optimizer should solve an optimization problem, then it will try to divide the work so each CPU gets a share of the work. The user decides how many CPUs MOSEK should exploit. Unfortunately, it is not always easy to divide the work. Also some of the coordination work must occur in sequential. Therefore, the speed-up obtained when using multiple CPUs is highly problem dependent. However, as a rule of thumb, if the problem solves very quickly, i.e., in less than 60 seconds, then there is no advantage in using the parallel option.

The parameter MSK_IPAR_NUM_THREADS sets the number of threads (and therefore the number of CPU's) that the optimizer will use.

## Infeasible/Unbounded Models

### Farkas Certificates

MOSEK determines if either the primal or the dual problem is infeasible by means of a Farkas certificate. In such a case MOSEK returns a certificate indicating primal or dual infeasibility. A primal infeasibility certificate indicates a primal infeasible model and the certificate is reported in the marginals of the equations in the listing file. The primal infeasibility certificate for a minimization problem

\[ \begin{array}{rl} \text{minimize} & \langle c,x\rangle \\ \text{subject to} & Ax = b, \\ & x \ge 0 \\ \end{array} \]

is the solution \(y\) satisfying \(A'\,y \le 0\) and \(\langle b,y\rangle > 0\).

Since GAMS reports all model statuses in the primal space, the notion of dual infeasibility does not exist and GAMS reports a status of unbounded, which assumes the primal problem is feasible. Although GAMS reports the primal as unbounded, there is the possibility that both the primal *and* dual problem are infeasible. To check if this is the case, the user can set appropriate upper and lower bounds on the objective variable, using the `(variable).LO`

and `(variable).UP`

suffixes and resolve.

For more details on primal and dual infeasibility certificates see the MOSEK Modeling Cookbook.

### Infeasibility Report

MOSEK has some facilities for diagnosing the cause of a primal or dual infeasibility. They can be turned on using the parameter setting MSK_IPAR_INFEAS_REPORT_AUTO. This causes MOSEK to print a report about an infeasible subset of the constraints, when an infeasibility is encountered. Moreover, the parameter MSK_IPAR_INFEAS_REPORT_LEVEL controls the amount of information presented in the infeasibility report. We will use the TRNSPORT example from the GAMS Model Library with increased demand \((b(j)\leftarrow 1.6\,b(j))\) to make the model infeasible. MOSEK produces the following infeasibility report:

MOSEK PRIMAL INFEASIBILITY REPORT. Problem status: The problem is primal infeasible The following constraints are involved in the primal infeasibility. Index Name Lower bound Upper bound Dual lower Dual upper 1 supply(seattle) none 3.500000e+002 0.000000e+000 1.000000e+000 2 supply(san-diego) none 6.000000e+002 0.000000e+000 1.000000e+000 3 demand(new-york) 5.200000e+002 none 1.000000e+000 0.000000e+000 4 demand(chicago) 4.800000e+002 none 1.000000e+000 0.000000e+000 5 demand(topeka) 4.400000e+002 none 1.000000e+000 0.000000e+000 The following bound constraints are involved in the infeasibility. Index Name Lower bound Upper bound Dual lower Dual upper

The report indicates which constraints and bounds are causing the infeasibility. In this case, the constraints causing infeasibility are `supply`

and `demand`

. The values in the columns `Dual lower`

and `Dual upper`

are also useful, because if the dual lower value is different from zero for a constraint, then it implies that the lower bound on the constraint is important for the infeasibility. Similarly, if the dual upper value is different from zero on a constraint, then this implies the upper bound on the constraint is important for infeasibility.

## Quadratic Conic Programming

MOSEK is well suited for solving generalized linear programs involving nonlinear conic constraints. For an overview of quadratic conic programming and how these conic constraints are implemented in GAMS, see the Section Conic Programming in the GAMS User's Guide. Note, that for Mosek no variable can appear in more than one conic constraint.

## Nonlinear Programs

MOSEK can efficiently solve convex programs, but is not intended for nonconvex optimization. MOSEK can detect some nonconvexities and will print out a warning message and terminate. If MOSEK does not detect nonconvexities for a nonconvex model, the optimizer may continue but stagnate. Hence care must be taken when solving nonlinear programs if convexity is not immediately known.

## Modeling Issues Involving Convex Programs

It is often preferable to model convex programs in seperable form, if possible. Consider the following example of minizing an objective function \(f(x)\):

\[ f(x) = \log(\langle a,x\rangle) \]

where \(a \in \mathbb{R}^n\) is a parameter and \(x \in \mathbb{R}^n\) the decision variable. The equation implies an implicit constraint of \(\langle a,x\rangle > 0\). Unfortunately, domain violations can still occur because no restrictions are set on \(\langle a,x\rangle\). A better approach is to introduce an intermediate variable \(y\):

\begin{eqnarray*} f(x) & = & \log(y) \\ y & = & \langle a,x\rangle \\ y & \ge & 0 \\ \end{eqnarray*}

This accomplishes two things. It implies an explicit bound on \(\langle a,x\rangle\), thereby reducing the risk of domain violations. Secondly, it speeds up computation since computations of gradients and Hessians in the first (non-seperable) form are more expensive. Finally, it reduces the amount of memory needed.

# Solver Options

MOSEK works like other GAMS solvers, and many options can be set in the GAMS model (see GAMS Options). The most relevant GAMS options are reslim, nodlim, iterlim (iteration limit for simplex and interior point algorithms), optca, optcr, and optfile. A description of all available GAMS options can be found in GAMS Options and Solver related options.

We remark that MOSEK contains many complex solver options, many of which require a deep understanding of the algorithms used. For information on how to use a GAMS/Mosek options file, see The Solver Option File. For example, an option file

MSK_IPAR_INTPNT_MAX_ITERATIONS 20 MSK_IPAR_INTPNT_SCALING MSK_SCALING_NONE

limits the number of interior-point iterations to 20 and disables scaling.

In the following, we summarize the MOSEK options that are available through the GAMS/MOSEK interface. For details, see Detailed Descriptions of MOSEK Options.

## General

Option | Description | Default |
---|---|---|

MSK_DPAR_OPTIMIZER_MAX_TIME | Maximum amount of time the optimizer is allowed to spent on the optimization. | `GAMS ResLim` |

MSK_DPAR_SEMIDEFINITE_TOL_APPROX | Tolerance to define a matrix to be positive semidefinite. | `1e-10` |

MSK_IPAR_AUTO_SORT_A_BEFORE_OPT | Controls whether the elements in each column of the coefficient matrix are sorted before an optimization is performed. | `MSK_OFF` |

MSK_IPAR_NUM_THREADS | Controls the number of threads employed by the optimizer. | `GAMS Threads` |

MSK_IPAR_OPTIMIZER | The parameter controls which optimizer is used to optimize the task. | `MSK_OPTIMIZER_FREE` |

MSK_IPAR_TIMING_LEVEL | Controls the amount of timing performed inside MOSEK. | `1` |

MSK_SPAR_PARAM_READ_FILE_NAME | Modifications to the parameter database is read from this file. |

## Problem Data

Option | Description | Default |
---|---|---|

MSK_DPAR_CHECK_CONVEXITY_REL_TOL | This parameter controls when the full convexity check declares a problem to be non-convex. | `1e-10` |

MSK_DPAR_DATA_SYM_MAT_TOL | Absolute zero tolerance for elements in in symmetric matrices. | `1e-12` |

MSK_DPAR_DATA_SYM_MAT_TOL_HUGE | An element in a symmetric matrix which is larger than this value in absolute size causes an error. | `1e+20` |

MSK_DPAR_DATA_SYM_MAT_TOL_LARGE | An element in a symmetric matrix which is larger than this value in absolute size causes a warning message to be printed. | `1e+10` |

MSK_DPAR_DATA_TOL_AIJ | Absolute zero tolerance for elements in the constraint matrix. | `1e-12` |

MSK_DPAR_DATA_TOL_AIJ_HUGE | An element in the constraint matrix which is larger than this value in absolute size causes an error. | `1e+20` |

MSK_DPAR_DATA_TOL_AIJ_LARGE | An element in the constraint matrix which is larger than this value in absolute size causes a warning message. | `1e+10` |

MSK_DPAR_DATA_TOL_BOUND_INF | Any bound which in absolute value is greater than this parameter is considered infinite. | `1e+16` |

MSK_DPAR_DATA_TOL_BOUND_WRN | If a bound value is larger than this value in absolute size, then a warning message is issued. | `1e+08` |

MSK_DPAR_DATA_TOL_CJ_LARGE | A coefficient in the objective function which is larger than this value in absolute terms causes a warning message. | `1e+08` |

MSK_DPAR_DATA_TOL_C_HUGE | A coefficient in the objective function which is larger than the value in absolute terms is considered to be huge and generates an error. | `1e+16` |

MSK_DPAR_DATA_TOL_QIJ | Absolute zero tolerance for coefficients of quadratic terms. | `1e-16` |

MSK_DPAR_DATA_TOL_X | Zero tolerance for constraints and variables i.e. if the distance between the lower and upper bound is less than this value, then the lower and upper bound is considered identical. | `1e-08` |

MSK_DPAR_LOWER_OBJ_CUT | Lower objective limit. | `-1e+30` |

MSK_DPAR_LOWER_OBJ_CUT_FINITE_TRH | Lower objective limit threshold. | `-5e+29` |

MSK_DPAR_QCQO_REFORMULATE_REL_DROP_TOL | This parameter determines when columns are dropped in incomplete Cholesky factorization during reformulation of quadratic problems. | `1e-15` |

MSK_DPAR_UPPER_OBJ_CUT | Upper objective limit. | `1e+30` |

MSK_DPAR_UPPER_OBJ_CUT_FINITE_TRH | Upper objective limit threshold. | `5e+29` |

MSK_IPAR_CHECK_CONVEXITY | Specify the level of convexity check on quadratic problems. | `MSK_CHECK_CONVEXITY_FULL` |

SDPCHECKVARS | Switch to disable checking that for every entry of a PSD matrix variable also a corresponding GAMS variable is present. | `1` |

## Presolving

Option | Description | Default |
---|---|---|

MSK_DPAR_PRESOLVE_TOL_ABS_LINDEP | Absolute tolerance employed by the linear dependency checker. | `1e-06` |

MSK_DPAR_PRESOLVE_TOL_AIJ | Absolute zero tolerance employed for constraint coefficients in presolve. | `1e-12` |

MSK_DPAR_PRESOLVE_TOL_REL_LINDEP | Relative tolerance employed by the linear dependency checker. | `1e-10` |

MSK_DPAR_PRESOLVE_TOL_S | Absolute zero tolerance employed for dual variables in presolve. | `1e-08` |

MSK_DPAR_PRESOLVE_TOL_X | Absolute zero tolerance employed for primal variables in presolve. | `1e-08` |

MSK_IPAR_PRESOLVE_ELIMINATOR_MAX_FILL | Controls the maximum amount of fill-in that can be created by one pivot in the elimination phase of presolve. | `-1` |

MSK_IPAR_PRESOLVE_ELIMINATOR_MAX_NUM_TRIES | Control the maximum number of times the eliminator is tried. | `-1` |

MSK_IPAR_PRESOLVE_LINDEP_ABS_WORK_TRH | Controls the linear dependency check, which is potentially computationally expensive. | `100` |

MSK_IPAR_PRESOLVE_LINDEP_REL_WORK_TRH | Controls the linear dependency check, which is potentially computationally expensive. | `100` |

MSK_IPAR_PRESOLVE_LINDEP_USE | Controls whether the linear constraints are checked for linear dependencies. | `MSK_ON` |

MSK_IPAR_PRESOLVE_MAX_NUM_REDUCTIONS | Controls the maximum number of reductions performed by the presolve. | `-1` |

MSK_IPAR_PRESOLVE_USE | Controls whether the presolve is applied to a problem before it is optimized. | `MSK_PRESOLVE_MODE_FREE` |

## Simplex Optimizer

Option | Description | Default |
---|---|---|

MSK_DPAR_BASIS_REL_TOL_S | Maximum relative dual bound violation allowed in an optimal basic solution. | `1e-12` |

MSK_DPAR_BASIS_TOL_S | Maximum absolute dual bound violation in an optimal basic solution. | `1e-06` |

MSK_DPAR_BASIS_TOL_X | Maximum absolute primal bound violation allowed in an optimal basic solution. | `1e-06` |

MSK_DPAR_SIMPLEX_ABS_TOL_PIV | Absolute pivot tolerance employed by the simplex optimizers. | `1e-07` |

MSK_DPAR_SIM_LU_TOL_REL_PIV | Relative pivot tolerance for LU factorization in simplex optimizers and basis identification. | `0.01` |

MSK_IPAR_SIM_BASIS_FACTOR_USE | Controls whether an LU factorization of the basis is used in a hot-start. | `MSK_ON` |

MSK_IPAR_SIM_DEGEN | Controls how aggressively degeneration is handled. | `MSK_SIM_DEGEN_FREE` |

MSK_IPAR_SIM_DUAL_CRASH | Controls whether crashing is performed in the dual simplex optimizer. | `90` |

MSK_IPAR_SIM_DUAL_RESTRICT_SELECTION | Controls how aggressively a restricted selection/pricing strategy is used to choose the outgoing variable in the dual simplex. | `50` |

MSK_IPAR_SIM_DUAL_SELECTION | Controls the choice of the incoming variable, known as the selection strategy, in the dual simplex optimizer. | `MSK_SIM_SELECTION_FREE` |

MSK_IPAR_SIM_EXPLOIT_DUPVEC | Controls if the simplex optimizers are allowed to exploit duplicated columns. | `MSK_SIM_EXPLOIT_DUPVEC_OFF` |

MSK_IPAR_SIM_HOTSTART | Controls the type of hot-start that the simplex optimizer perform. | `MSK_SIM_HOTSTART_FREE` |

MSK_IPAR_SIM_HOTSTART_LU | Determines if the simplex optimizer should exploit the initial factorization. | `MSK_ON` |

MSK_IPAR_SIM_MAX_ITERATIONS | Maximum number of iterations that can be used by a simplex optimizer. | `GAMS IterLim` |

MSK_IPAR_SIM_MAX_NUM_SETBACKS | Controls how many set-backs are allowed within a simplex optimizer. | `250` |

MSK_IPAR_SIM_NON_SINGULAR | Controls if the simplex optimizer ensures a non-singular basis, if possible. | `MSK_ON` |

MSK_IPAR_SIM_PRIMAL_CRASH | Controls whether crashing is performed in the primal simplex optimizer. | `90` |

MSK_IPAR_SIM_PRIMAL_RESTRICT_SELECTION | Controls how aggressively a restricted selection/pricing strategy is used to choose the outgoing variable in the primal simplex. | `50` |

MSK_IPAR_SIM_PRIMAL_SELECTION | Controls the choice of the incoming variable, known as the selection strategy, in the primal simplex optimizer. | `MSK_SIM_SELECTION_FREE` |

MSK_IPAR_SIM_REFORMULATION | Controls if the simplex optimizers are allowed to reformulate the problem. | `MSK_SIM_REFORMULATION_OFF` |

MSK_IPAR_SIM_SAVE_LU | Controls if the LU factorization stored should be replaced with the LU factorization corresponding to the initial basis. | `MSK_OFF` |

MSK_IPAR_SIM_SCALING | Controls how much effort is used in scaling the problem before a simplex optimizer is used. | `MSK_SCALING_FREE` |

MSK_IPAR_SIM_SCALING_METHOD | Controls how the problem is scaled before a simplex optimizer is used. | `MSK_SCALING_METHOD_POW2` |

MSK_IPAR_SIM_SOLVE_FORM | Controls whether the primal or the dual problem is solved by the primal-/dual-simplex optimizer. | `MSK_SOLVE_FREE` |

MSK_IPAR_SIM_STABILITY_PRIORITY | Controls how high priority the numerical stability should be given. | `50` |

MSK_IPAR_SIM_SWITCH_OPTIMIZER | Controls the simplex behavior. | `MSK_OFF` |

## Interior Point Optimizer and Basis Identification

Option | Description | Default |
---|---|---|

MSK_DPAR_INTPNT_CO_TOL_DFEAS | Dual feasibility tolerance used by the conic interior-point optimizer. | `1e-08` |

MSK_DPAR_INTPNT_CO_TOL_INFEAS | Controls when the conic interior-point optimizer declares the model primal or dual infeasible. | `1e-10` |

MSK_DPAR_INTPNT_CO_TOL_MU_RED | Relative complementarity gap feasibility tolerance used by the conic interior-point optimizer. | `1e-08` |

MSK_DPAR_INTPNT_CO_TOL_NEAR_REL | Termination tolerance multiplier that is used if no accurate solution can be found. | `1000` |

MSK_DPAR_INTPNT_CO_TOL_PFEAS | Primal feasibility tolerance used by the conic interior-point optimizer. | `1e-08` |

MSK_DPAR_INTPNT_CO_TOL_REL_GAP | Relative gap termination tolerance used by the conic interior-point optimizer. | `1e-07` |

MSK_DPAR_INTPNT_NL_MERIT_BAL | Controls if the complementarity and infeasibility is converging to zero at about equal rates. | `0.0001` |

MSK_DPAR_INTPNT_NL_TOL_DFEAS | Dual feasibility tolerance used when a nonlinear model is solved. | `1e-08` |

MSK_DPAR_INTPNT_NL_TOL_MU_RED | Relative complementarity gap tolerance for the nonlinear solver. | `1e-12` |

MSK_DPAR_INTPNT_NL_TOL_NEAR_REL | Termination tolerance multiplier that is used if no accurate solution can be found. | `1000` |

MSK_DPAR_INTPNT_NL_TOL_PFEAS | Primal feasibility tolerance used when a nonlinear model is solved. | `1e-08` |

MSK_DPAR_INTPNT_NL_TOL_REL_GAP | Relative gap termination tolerance for nonlinear problems. | `1e-06` |

MSK_DPAR_INTPNT_NL_TOL_REL_STEP | Relative step size to the boundary for general nonlinear optimization problems. | `0.995` |

MSK_DPAR_INTPNT_QO_TOL_DFEAS | Dual feasibility tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. | `1e-08` |

MSK_DPAR_INTPNT_QO_TOL_INFEAS | Controls when the conic interior-point optimizer declares the model primal or dual infeasible. | `1e-10` |

MSK_DPAR_INTPNT_QO_TOL_MU_RED | Relative complementarity gap feasibility tolerance used when interior-point optimizer is applied to a quadratic optimization problem. | `1e-08` |

MSK_DPAR_INTPNT_QO_TOL_NEAR_REL | Termination tolerance multiplier that is used if no accurate solution can be found. | `1000` |

MSK_DPAR_INTPNT_QO_TOL_PFEAS | Primal feasibility tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. | `1e-08` |

MSK_DPAR_INTPNT_QO_TOL_REL_GAP | Relative gap termination tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. | `1e-08` |

MSK_DPAR_INTPNT_TOL_DFEAS | Dual feasibility tolerance used for linear optimization problems. | `1e-08` |

MSK_DPAR_INTPNT_TOL_DSAFE | Controls the initial dual starting point used by the interior-point optimizer. | `1` |

MSK_DPAR_INTPNT_TOL_INFEAS | Controls when the optimizer declares the model primal or dual infeasible. | `1e-10` |

MSK_DPAR_INTPNT_TOL_MU_RED | Relative complementarity gap tolerance for linear problems. | `1e-16` |

MSK_DPAR_INTPNT_TOL_PATH | Controls how close the interior-point optimizer follows the central path. | `1e-08` |

MSK_DPAR_INTPNT_TOL_PFEAS | Primal feasibility tolerance used for linear optimization problems. | `1e-08` |

MSK_DPAR_INTPNT_TOL_PSAFE | Controls the initial primal starting point used by the interior-point optimizer. | `1` |

MSK_DPAR_INTPNT_TOL_REL_GAP | Relative gap termination tolerance for linear problems. | `1e-08` |

MSK_DPAR_INTPNT_TOL_REL_STEP | Relative step size to the boundary for linear and quadratic optimization problems. | `0.9999` |

MSK_DPAR_INTPNT_TOL_STEP_SIZE | Step size tolerance. | `1e-06` |

MSK_IPAR_BI_CLEAN_OPTIMIZER | Controls which simplex optimizer is used in the clean-up phase. | `MSK_OPTIMIZER_FREE` |

MSK_IPAR_BI_IGNORE_MAX_ITER | Controls if basis identification is performed under certain conditions. | `MSK_OFF` |

MSK_IPAR_BI_IGNORE_NUM_ERROR | Turns on basis identification if interior-point optimizer is terminated due to a numerical problem. | `MSK_ON` |

MSK_IPAR_BI_MAX_ITERATIONS | Controls the maximum number of simplex iterations allowed to optimize a basis after the basis identification. | `1000000` |

MSK_IPAR_INTPNT_BASIS | Controls whether the interior-point optimizer also computes an optimal basis. | `MSK_BI_ALWAYS` |

MSK_IPAR_INTPNT_DIFF_STEP | Controls whether different step sizes are allowed in the primal and dual space. | `MSK_ON` |

MSK_IPAR_INTPNT_MAX_ITERATIONS | Controls the maximum number of iterations allowed in the interior-point optimizer. | `GAMS IterLim` |

MSK_IPAR_INTPNT_MAX_NUM_COR | Controls the maximum number of correctors allowed by the multiple corrector procedure. | `-1` |

MSK_IPAR_INTPNT_MAX_NUM_REFINEMENT_STEPS | Maximum number of steps to be used by the iterative refinement of the search direction. | `-1` |

MSK_IPAR_INTPNT_MULTI_THREAD | Controls whether the interior-point optimizers can employ multiple threads if available. | `MSK_ON` |

MSK_IPAR_INTPNT_OFF_COL_TRH | Controls how aggressively offending columns are detected in the Jacobian of the constraint matrix. | `40` |

MSK_IPAR_INTPNT_ORDER_METHOD | Controls the ordering strategy used by the interior-point optimizer when factorizing the Newton equation system. | `MSK_ORDER_METHOD_FREE` |

MSK_IPAR_INTPNT_REGULARIZATION_USE | Controls whether regularization is allowed. | `MSK_ON` |

MSK_IPAR_INTPNT_SCALING | Controls how the problem is scaled before the interior-point optimizer is used. | `MSK_SCALING_FREE` |

MSK_IPAR_INTPNT_SOLVE_FORM | Controls whether the primal or the dual problem is solved. | `MSK_SOLVE_FREE` |

MSK_IPAR_INTPNT_STARTING_POINT | Starting point used by the interior-point optimizer. | `MSK_STARTING_POINT_FREE` |

## Mixed Integer Optimizer

Option | Description | Default |
---|---|---|

FIXOPTFILE | Name of option file which is read just before solving the fixed problem. | |

MSK_DPAR_MIO_DISABLE_TERM_TIME | Disables termination criteria for a certain time. | `0` |

MSK_DPAR_MIO_MAX_TIME | This parameter limits the maximum time spent by the mixed-integer optimizer. | `-1` |

MSK_DPAR_MIO_NEAR_TOL_ABS_GAP | Relaxed absolute optimality tolerance employed by the mixed-integer optimizer. | `GAMS OptCA` |

MSK_DPAR_MIO_NEAR_TOL_REL_GAP | Relaxed relative optimality tolerance employed by the mixed integer optimizer. | `GAMS OptCR` |

MSK_DPAR_MIO_REL_GAP_CONST | This value is used to compute the relative gap for the solution to an integer optimization problem. | `1e-10` |

MSK_DPAR_MIO_TOL_ABS_GAP | Absolute optimality tolerance employed by the mixed-integer optimizer. | `0` |

MSK_DPAR_MIO_TOL_ABS_RELAX_INT | Absolute relaxation tolerance of the integer constraints. | `1e-05` |

MSK_DPAR_MIO_TOL_FEAS | Feasibility tolerance for mixed integer solver. | `1e-06` |

MSK_DPAR_MIO_TOL_REL_DUAL_BOUND_IMPROVEMENT | If the relative improvement of the dual bound is smaller than this value, the solver will terminate the root cut generation. | `0` |

MSK_DPAR_MIO_TOL_REL_GAP | Relative optimality tolerance employed by the mixed-integer optimizer. | `0` |

MSK_IPAR_MIO_BRANCH_DIR | Controls whether the mixed-integer optimizer is branching up or down by default. | `MSK_BRANCH_DIR_FREE` |

MSK_IPAR_MIO_CONSTRUCT_SOL | Controls construction of an initial mixed integer solution from the values of the integer variables | `MSK_OFF` |

MSK_IPAR_MIO_CUT_CLIQUE | Controls whether clique cuts should be generated. | `MSK_ON` |

MSK_IPAR_MIO_CUT_CMIR | Controls whether mixed integer rounding cuts should be generated. | `MSK_ON` |

MSK_IPAR_MIO_CUT_GMI | Controls whether GMI cuts should be generated. | `MSK_ON` |

MSK_IPAR_MIO_CUT_IMPLIED_BOUND | Controls whether implied bound cuts should be generated. | `MSK_OFF` |

MSK_IPAR_MIO_CUT_KNAPSACK_COVER | Controls whether knapsack cover cuts should be generated. | `MSK_OFF` |

MSK_IPAR_MIO_CUT_SELECTION_LEVEL | Controls how aggressively generated cuts are selected to be included in the relaxation. | `-1` |

MSK_IPAR_MIO_HEURISTIC_LEVEL | Controls the heuristic employed by the mixed-integer optimizer to locate an initial good integer feasible solution. | `-1` |

MSK_IPAR_MIO_MAX_NUM_BRANCHES | Maximum number of branches allowed during the branch and bound search. | `-1` |

MSK_IPAR_MIO_MAX_NUM_RELAXS | Maximum number of relaxations allowed during the branch and bound search. | `GAMS NodLim` |

MSK_IPAR_MIO_MAX_NUM_SOLUTIONS | The mixed-integer optimizer can be terminated after a certain number of different feasible solutions has been located. | `-1` |

MSK_IPAR_MIO_NODE_OPTIMIZER | Controls which optimizer is employed at the non-root nodes in the mixed-integer optimizer. | `MSK_OPTIMIZER_FREE` |

MSK_IPAR_MIO_NODE_SELECTION | Controls the node selection strategy employed by the mixed-integer optimizer. | `MSK_MIO_NODE_SELECTION_FREE` |

MSK_IPAR_MIO_PERSPECTIVE_REFORMULATE | Enables or disables perspective reformulation in presolve. | `MSK_ON` |

MSK_IPAR_MIO_PROBING_LEVEL | Controls the amount of probing employed by the mixed-integer optimizer in presolve. | `-1` |

MSK_IPAR_MIO_RINS_MAX_NODES | Controls the maximum number of nodes allowed in each call to the RINS heuristic. | `-1` |

MSK_IPAR_MIO_ROOT_OPTIMIZER | Controls which optimizer is employed at the root node in the mixed-integer optimizer. | `MSK_OPTIMIZER_FREE` |

MSK_IPAR_MIO_ROOT_REPEAT_PRESOLVE_LEVEL | Controls whether presolve can be repeated at root node. | `-1` |

MSK_IPAR_MIO_VB_DETECTION_LEVEL | Controls how much effort is put into detecting variable bounds. | `-1` |

SOLVEFINAL | Switch to resolve the problem with fixed discrete variables after the MOSEK optimizer finished. | `1` |

## Infeasibility Analyser for Continuous Problems

Option | Description | Default |
---|---|---|

MSK_DPAR_ANA_SOL_INFEAS_TOL | If a constraint violates its bound with an amount larger than this value, the constraint name, index and violation will be printed by the solution analyzer. | `1e-06` |

MSK_IPAR_INFEAS_PREFER_PRIMAL | If both certificates of primal and dual infeasibility are supplied then only the primal is used when this option is turned on. | `MSK_ON` |

MSK_IPAR_INFEAS_REPORT_AUTO | Controls whether an infeasibility report is automatically produced after the optimization if the problem is primal or dual infeasible. | `MSK_OFF` |

MSK_IPAR_INFEAS_REPORT_LEVEL | Controls the amount of information presented in an infeasibility report. | `1` |

## Output

Option | Description | Default |
---|---|---|

MSK_IPAR_LOG | Controls the amount of log information. | `10` |

MSK_IPAR_LOG_BI | Controls the amount of output printed by the basis identification procedure. | `1` |

MSK_IPAR_LOG_BI_FREQ | Controls logging frequency of the basis identification | `2500` |

MSK_IPAR_LOG_CHECK_CONVEXITY | Controls logging in convexity check on quadratic problems. | `0` |

MSK_IPAR_LOG_FEAS_REPAIR | Controls the amount of output printed when performing feasibility repair. | `1` |

MSK_IPAR_LOG_INFEAS_ANA | Controls amount of output printed by the infeasibility analyzer procedures. | `1` |

MSK_IPAR_LOG_INTPNT | Controls amount of output printed by the interior-point optimizer. | `1` |

MSK_IPAR_LOG_MIO | Controls the log level for the mixed-integer optimizer. | `4` |

MSK_IPAR_LOG_MIO_FREQ | Controls how frequent the mixed-integer optimizer prints the log line. | `10` |

MSK_IPAR_LOG_ORDER | If turned on, then factor lines are added to the log. | `1` |

MSK_IPAR_LOG_PRESOLVE | Controls amount of output printed by the presolve procedure. | `1` |

MSK_IPAR_LOG_RESPONSE | Controls amount of output printed when response codes are reported. | `0` |

MSK_IPAR_LOG_SIM | Controls amount of output printed by the simplex optimizer. | `4` |

MSK_IPAR_LOG_SIM_FREQ | Controls simplex optimizer logging frequency. | `1000` |

MSK_IPAR_LOG_STORAGE | When turned on, MOSEK prints messages regarding the storage usage and allocation. | `0` |

MSK_IPAR_OPF_MAX_TERMS_PER_LINE | The maximum number of terms (linear and quadratic) per line when an OPF file is written. | `5` |

MSK_IPAR_OPF_WRITE_HEADER | Write a text header with date and MOSEK version in an OPF file. | `MSK_ON` |

MSK_IPAR_OPF_WRITE_HINTS | Write a hint section with problem dimensions in the beginning of an OPF file. | `MSK_ON` |

MSK_IPAR_OPF_WRITE_PARAMETERS | Write a parameter section in an OPF file. | `MSK_OFF` |

MSK_IPAR_OPF_WRITE_PROBLEM | Write objective, constraints, bounds etc. | `MSK_ON` |

MSK_IPAR_OPF_WRITE_SOLUTIONS | Enable inclusion of solutions in the OPF files. | `MSK_OFF` |

MSK_IPAR_OPF_WRITE_SOL_BAS | Whether to include basic solution in OPF files. | `MSK_ON` |

MSK_IPAR_OPF_WRITE_SOL_ITG | Whether to include integer solution in OPF files. | `MSK_ON` |

MSK_IPAR_OPF_WRITE_SOL_ITR | Whether to include interior solution in OPF files. | `MSK_ON` |

MSK_IPAR_WRITE_DATA_FORMAT | Controls the file format when writing task data to a file. | `MSK_DATA_FORMAT_EXTENSION` |

MSK_IPAR_WRITE_DATA_PARAM | If this option is turned on the parameter settings are written to the data file as parameters. | `MSK_OFF` |

MSK_IPAR_WRITE_GENERIC_NAMES | Controls whether the generic names or user-defined names are used in the data file. | `MSK_ON` |

MSK_IPAR_WRITE_GENERIC_NAMES_IO | Index origin used in generic names. | `1` |

MSK_IPAR_WRITE_IGNORE_INCOMPATIBLE_ITEMS | Controls if the writer ignores incompatible problem items when writing files. | `MSK_OFF` |

MSK_IPAR_WRITE_LP_FULL_OBJ | Write all variables, including the ones with 0-coefficients, in the objective. | `MSK_ON` |

MSK_IPAR_WRITE_LP_LINE_WIDTH | Maximum width of line in an LP file written by MOSEK. | `80` |

MSK_IPAR_WRITE_LP_QUOTED_NAMES | If this option is turned on, then MOSEK will quote invalid LP names when writing an LP file. | `MSK_ON` |

MSK_IPAR_WRITE_LP_STRICT_FORMAT | Controls whether LP output files satisfy the LP format strictly. | `MSK_OFF` |

MSK_IPAR_WRITE_LP_TERMS_PER_LINE | Maximum number of terms on a single line in an LP file written by MOSEK. | `10` |

MSK_IPAR_WRITE_MPS_FORMAT | Controls in which format the MPS is written. | `MSK_MPS_FORMAT_FREE` |

MSK_IPAR_WRITE_MPS_INT | Controls if marker records are written to the MPS file to indicate whether variables are integer restricted. | `MSK_ON` |

MSK_IPAR_WRITE_PRECISION | Controls the precision with which `double` numbers are printed in the MPS data file. | `15` |

MSK_IPAR_WRITE_TASK_INC_SOL | Controls whether the solutions are stored in the task file too. | `MSK_ON` |

MSK_IPAR_WRITE_XML_MODE | Controls if linear coefficients should be written by row or column when writing in the XML file format. | `MSK_WRITE_XML_MODE_ROW` |

MSK_SPAR_DATA_FILE_NAME | If set, problem data is written to this file. File extension determines format. | |

MSK_SPAR_PARAM_WRITE_FILE_NAME | The parameter database is written to this file. | |

MSK_SPAR_WRITE_LP_GEN_VAR_NAME | Sometimes when an LP file is written additional variables must be inserted. | `"xmskgen"` |

SDPSOLUFILE | Name of GDX file to write primal solution of all PSD matrix variables and dual solution for PSD constraints. |

# The MOSEK Log File

The MOSEK log output gives much useful information about the current solver progress and individual phases.

## Log Using the Interior Point Optimizer

The following is a MOSEK log output from running the TRNSPORT model from the GAMS Model Library:

Optimizer started. Interior-point optimizer started. Presolve started. Linear dependency checker started. Linear dependency checker terminated. Eliminator - tries : 0 time : 0.00 Lin. dep. - tries : 1 time : 0.00 Lin. dep. - number : 0 Presolve terminated. Time: 0.00 Optimizer - threads : 1 Optimizer - solved problem : the primal Optimizer - Constraints : 5 Optimizer - Cones : 0 Optimizer - Scalar variables : 11 conic : 0 Optimizer - Semi-definite variables: 0 scalarized : 0 Factor - setup time : 0.00 dense det. time : 0.00 Factor - ML order time : 0.00 GP order time : 0.00 Factor - nonzeros before factor : 11 after factor : 12 Factor - dense dim. : 0 flops : 1.80e+02

The first part gives information about the presolve (if used). The main log follows:

ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME 0 6.0e+02 1.0e+02 1.0e+02 1.00e+02 1.053000000e+00 0.000000000e+00 1.0e+02 0.00 1 5.9e+02 1.3e+02 2.6e+02 0.00e+00 3.063797526e+00 2.650041612e+02 2.4e+02 0.00 2 4.6e+01 1.0e+01 2.0e+01 -9.59e-01 3.650704301e+01 2.594816940e+02 1.9e+01 0.00 3 3.9e-01 8.7e-02 1.7e-01 -4.39e-01 1.604589379e+02 2.276036163e+02 1.6e-01 0.00 4 2.7e-02 6.0e-03 1.2e-02 9.62e-01 1.627664502e+02 1.676438787e+02 1.1e-02 0.00 5 2.2e-03 4.9e-04 9.7e-04 1.04e+00 1.585004810e+02 1.591499235e+02 8.9e-04 0.00 6 3.1e-04 6.9e-05 1.4e-04 1.01e+00 1.546312243e+02 1.547272945e+02 1.2e-04 0.00 7 2.9e-05 6.5e-06 1.3e-05 1.01e+00 1.536906429e+02 1.536999628e+02 1.2e-05 0.00 8 7.6e-08 1.7e-08 3.4e-08 1.00e+00 1.536751995e+02 1.536752387e+02 3.1e-08 0.00 9 7.5e-12 1.7e-12 3.4e-12 1.00e+00 1.536750000e+02 1.536750000e+02 3.1e-12 0.00 Basis identification started. Primal basis identification phase started. ITER TIME 1 0.00 Primal basis identification phase terminated. Time: 0.00 Dual basis identification phase started. ITER TIME 0 0.00 Dual basis identification phase terminated. Time: 0.00 Basis identification terminated. Time: 0.00 Interior-point optimizer terminated. Time: 0.00. Optimizer terminated. Time: 0.00 Interior-point solution summary Problem status : PRIMAL_AND_DUAL_FEASIBLE Solution status : OPTIMAL Primal. obj: 1.5367500002e+02 nrm: 6e+02 Viol. con: 3e-10 var: 0e+00 Dual. obj: 1.5367500002e+02 nrm: 2e-01 Viol. con: 0e+00 var: 6e-11 Basic solution summary Problem status : PRIMAL_AND_DUAL_FEASIBLE Solution status : OPTIMAL Primal. obj: 1.5367500000e+02 nrm: 6e+02 Viol. con: 0e+00 var: 0e+00 Dual. obj: 1.5367500002e+02 nrm: 2e-01 Viol. con: 0e+00 var: 5e-11 Return code - 0 [MSK_RES_OK]: No error occurred.

The last section gives details about the model and solver status, primal and dual feasibilities, as well as solver resource times. Furthermore, the log gives information about the basis identification phase. Some of this information is listed in the GAMS solve summary in the model listing (.LST) file as well.

The fields in the main MOSEK log output are:

Field | Description |
---|---|

`ITE` | The number of the current iteration. |

`PFEAS` | Primal feasibility. |

`DFEAS` | Dual feasibility. |

`GFEAS` | The numbers in this column should converge monotonically toward to zero but may stall at low level due to rounding errors. |

`PRSTATUS` | This number converges to 1 if the problem has an optimal solution whereas it converges to -1 if that is not the case. |

`POBJ` | Current objective function value of primal problem. |

`DOBJ` | Current objective function value of dual problem. |

`MU` | Relative complementary gap. |

`TIME` | Current elapsed solving time in seconds. |

## Log Using the Simplex Optimizer

Below is a log output running the TRNSPORT model from the GAMS Model Library using the MOSEK simplex optimizer.

Reading parameter(s) from "mosek.opt" >> MSK_IPAR_OPTIMIZER MSK_OPTIMIZER_DUAL_SIMPLEX Finished reading from "mosek.opt" Optimizer started. Simplex optimizer started. Presolve started. Linear dependency checker started. Linear dependency checker terminated. Eliminator - tries : 0 time : 0.00 Lin. dep. - tries : 1 time : 0.00 Lin. dep. - number : 0 Presolve terminated. Time: 0.00 Dual simplex optimizer started. Dual simplex optimizer setup started. Dual simplex optimizer setup terminated. Optimizer - solved problem : the primal Optimizer - Constraints : 5 Optimizer - Scalar variables : 6 conic : 0 Optimizer - hotstart : no ITER DEGITER(%) PFEAS DFEAS POBJ DOBJ TIME TOTTIME 0 0.00 NA 0.00e+00 NA 0.0000000000e+00 0.00 0.00 4 20.00 NA 0.00e+00 NA 1.5367501014e+02 0.00 0.00 Dual simplex optimizer terminated. Simplex optimizer terminated. Time: 0.00. Optimizer terminated. Time: 0.00 Basic solution summary Problem status : PRIMAL_AND_DUAL_FEASIBLE Solution status : OPTIMAL Primal. obj: 1.5367500000e+02 nrm: 6e+02 Viol. con: 0e+00 var: 0e+00 Dual. obj: 1.5367500000e+02 nrm: 2e-01 Viol. con: 0e+00 var: 0e+00 Return code - 0 [MSK_RES_OK]: No error occurred.

The fields in the main MOSEK log output are:

Field | Description |
---|---|

`ITER` | Current number of iterations. |

`DEGITER(%)` | Current percentage of degenerate iterations. |

`P/DFEAS` | Current primal and dual infeasibility. |

`P/DOBJ` | Current primal and dual objective value. |

`TIME` | Current elapsed solving time in seconds. |

`TOTTIME` | Total elapsed solving time in seconds. |

## Log Using the Mixed Integer Optimizer

Below is a log output running the model CUBE from the GAMS model library using the MOSEK mixed-integer optimizer.

Optimizer started. Mixed integer optimizer started. Threads used: 1 Presolve started. Presolve terminated. Time = 0.00 Presolved problem: 76 variables, 99 constraints, 419 non-zeros Presolved problem: 0 general integer, 27 binary, 49 continuous Clique table size: 0 BRANCHES RELAXS ACT_NDS DEPTH BEST_INT_OBJ BEST_RELAX_OBJ REL_GAP(%) TIME 0 1 0 0 NA 0.0000000000e+00 NA 0.0 0 1 0 0 6.0000000000e+00 0.0000000000e+00 100.00 0.0 Cut generation started. 0 2 0 0 6.0000000000e+00 0.0000000000e+00 100.00 0.0 Cut generation terminated. Time = 0.00 15 18 1 0 6.0000000000e+00 0.0000000000e+00 100.00 0.0 31 34 1 0 4.0000000000e+00 0.0000000000e+00 100.00 0.0 53 56 1 0 4.0000000000e+00 0.0000000000e+00 100.00 0.0 83 86 1 0 4.0000000000e+00 0.0000000000e+00 100.00 0.0 98 101 16 8 4.0000000000e+00 0.0000000000e+00 100.00 0.0 114 117 28 9 4.0000000000e+00 0.0000000000e+00 100.00 0.0 142 145 44 6 4.0000000000e+00 0.0000000000e+00 100.00 0.1 175 177 63 7 4.0000000000e+00 0.0000000000e+00 100.00 0.1 208 210 84 12 4.0000000000e+00 0.0000000000e+00 100.00 0.1 245 247 103 4 4.0000000000e+00 0.0000000000e+00 100.00 0.1 278 279 124 5 4.0000000000e+00 0.0000000000e+00 100.00 0.1 309 310 147 14 4.0000000000e+00 0.0000000000e+00 100.00 0.1 347 345 165 10 4.0000000000e+00 3.3333333333e-01 91.67 0.1 A near optimal solution satisfying the absolute gap tolerance of 0.00e+00 has been located. Objective of best integer solution : 4.000000000000e+00 Best objective bound : 3.333333333333e-01 Construct solution objective : Not employed Construct solution # roundings : 0 User objective cut value : 0 Number of cuts generated : 3 Number of Gomory cuts : 3 Number of branches : 347 Number of relaxations solved : 345 Number of interior point iterations: 6 Number of simplex iterations : 3460 Time spend presolving the root : 0.00 Time spend in the heuristic : 0.00 Time spend in the sub optimizers : 0.00 Time spend optimizing the root : 0.00 Mixed integer optimizer terminated. Time: 0.12 Optimizer terminated. Time: 0.12 Integer solution solution summary Problem status : PRIMAL_FEASIBLE Solution status : NEAR_INTEGER_OPTIMAL Primal. obj: 4.0000000000e+00 nrm: 1e+01 Viol. con: 1e+01 var: 1e+00 itg: 3e-16 Return code - 10004 [MSK_RES_TRM_MIO_NEAR_ABS_GAP]: The mixed-integer optimizer terminated because the near optimal absolute gap tolerance was satisfied.

The fields in the main MOSEK log output are:

Field | Description |
---|---|

`BRANCHES` | Current number of branches in tree. |

`RELAXS` | Current number of nodes in branch and bound tree. |

`ACT_NDS` | Current number of active nodes. |

`BEST_INT_OBJ` | Current best integer solution (primal bound). |

`BEST_RELAX_OBJ` | Current best relaxed solution (dual bound). |

`REL_GAP(%)` | Relative gap between current `BEST_INT_OBJ` and `BEST_RELAX_OBJ` . |

`TIME` | Current elapsed solving time in seconds. |

The log then gives information about solving the model with discrete variables fixed in order to determine marginals. Option SOLVEFINAL can be used to disable this step. The fixed problem is solved as a regular LP with warm start information. So the log looks identical to the MOSEK simplex optimizer for linear programs:

Solving fixed problem... [...] Optimizer started. Simplex optimizer started. Presolve started. Eliminator - tries : 0 time : 0.00 Lin. dep. - tries : 0 time : 0.00 Lin. dep. - number : 0 Presolve terminated. Time: 0.00 Simplex optimizer terminated. Time: 0.00. Optimizer terminated. Time: 0.00 Basic solution summary Problem status : PRIMAL_AND_DUAL_FEASIBLE Solution status : OPTIMAL Primal. obj: 4.0000000000e+00 nrm: 1e+01 Viol. con: 4e-16 var: 0e+00 Dual. obj: 4.0000000000e+00 nrm: 5e+00 Viol. con: 0e+00 var: 0e+00 Return code - 0 [MSK_RES_OK]: No error occurred. MIP Solution: 4.000000 (3466 iterations, 347 nodes) Final Solve: 4.000000 (0 iterations) Best possible: 0.333333 Absolute gap: 3.666667 Relative gap: 0.916667

# Semidefinite Programming with GAMS/MOSEK (experimental)

With Version 7, MOSEK introduced a semidefinite programming (SDP) solver into their portfolio. The following introduction is taken from the Mosek Documentation.

Semidefinite programming is a generalization of quadratic conic programming, allowing the use of matrix variables belonging to the convex cone of positive semidefinite matrices

\[ \mathcal{S}_{r}^{+} = \left\{ X \in\mathcal{S}_{r}: z^{T} X z \geq 0, \;\forall z \in\mathbb{R}^{r} \right\}, \]

where \(\mathcal{S}_{r}\) is the set of \(r \times r\) real-valued symmetric matrices. MOSEK can solve semidefinite optimization problems of the form

\[ \tag{SDP} \begin{array}{lcclcll} \displaystyle{} \mbox{minimize}&\displaystyle{} &\displaystyle{} &\displaystyle{} \sum_{j=0}^{n-1} c_{j} x_{j} + \sum_{j=0}^{p-1}\left\langle{}\overline{C}_{j}, \overline{X}_{j}\right\rangle{} + c^{f} &\displaystyle{} &\displaystyle{} &\displaystyle{} \\[0pt] \displaystyle{} \mbox{subject to}&\displaystyle{} l_{i}^{c} &\displaystyle{} \leq{}&\displaystyle{} \sum_{j=0}^{n-1} a_{ij} x_{j} + \sum_{j=0}^{p-1}\left\langle{}\overline{A}_{ij}, \overline{X}_{j}\right\rangle{}&\displaystyle{} \leq{}&\displaystyle{} u_{i}^{c}, &\displaystyle{} i = 0, \ldots{}, m-1, \\[0pt] \displaystyle{} &\displaystyle{} l_{j}^{x} &\displaystyle{} \leq{}&\displaystyle{} x_{j} &\displaystyle{} \leq{}&\displaystyle{} u_{j}^{x}, &\displaystyle{} j = 0, \ldots{}, n-1, \\[0pt] \displaystyle{} &\displaystyle{} &\displaystyle{} &\displaystyle{} x \in{}\mathcal{C}, \overline{X}_{j} \in{}\mathcal{S}_{r_{j}}^{+}, &\displaystyle{} &\displaystyle{} &\displaystyle{} j = 0, \ldots{}, p-1, \\[0pt] \end{array} \]

where the problem has \(p\) symmetric positive semidefinite (PSD) variables \(\overline{X}_{j}\in\mathcal{S}_{r_j}^{+}\) of dimension \(r_j\) with symmetric coefficient matrices \(\overline{C}_{j}\in{}\mathcal{S}_{r_{j}}\) and \(\overline{A}_{i,j}\in{}\mathcal{S}_{r_{j}}\). We use the standard notation for the matrix inner product, i.e., for \(A,B\in{}\mathbb{R}^{m{\times} n}\) we have

\[ \left\langle{}A,B\right\rangle{} := \sum_{i=0}^{m-1}\sum_{j=0}^{n-1} A_{ij} B_{ij}. \]

## Example

An example for a mixed semidefinite and conic quadratic programming problem with a 3-dimensional PSD matrix variable is the following:

\begin{align*} \text{minimize}\; & \left\langle \begin{bmatrix} 2 & 1 & 0 \\ 1 & 2 & 1 \\ 0 & 1 & 2 \end{bmatrix}, \bar X \right\rangle + x_0 \\ \text{subject to}\; & \left\langle \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}, \bar X \right\rangle + x_0 = 1 \\ & \left\langle \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}, \bar X \right\rangle + x_1 + x_2 = \frac{1}{2} \\ & x_0 \geq \sqrt{x_1^2 + x_2^2} \\ & \bar X \succeq 0 \end{align*}

The GAMS/MOSEK interface offers an experimental interface to MOSEK's SDP solver. It allows to state SDP's of the form (SDP) in GAMS language. For instance, the example problem from above can be formulated as follows (sdp01 in the GAMS Test Library):

We see that the matrix \(\bar X\) is defined via the 2-dimensional GAMS variable `barX`

. Additionally, the keyword `PSDMATRIX`

at the beginning of the descriptive text (!) of the variable is used to indicate that the variables belonging to symbol `barX`

are *to be interpreted* as a matrix variable with PSD constraint.

The Model shown above can be solved with MOSEK via the statements

As GAMS has no native support for conic programming, the modeltype is specified as QCP.

The solve statement produces the following log output (see also Log Using the Interior Point Optimizer):

M O S E K version 7.0.0.75 (Build date: 2013-7-1 19:28:43) Copyright (C) MOSEK ApS, Fruebjergvej 3, Box 16 DK-2100 Copenhagen, Denmark http://www.mosek.com Recognizing SDP variables for symbols barX (1) Recognized 1 quadratic equation as conic constraint. Optimizer started. Conic interior-point optimizer started. Presolve started. Linear dependency checker started. Linear dependency checker terminated. Eliminator - tries : 0 time : 0.00 Eliminator - elim's : 0 Lin. dep. - tries : 1 time : 0.00 Lin. dep. - number : 0 Presolve terminated. Time: 0.00 Optimizer - threads : 1 Optimizer - solved problem : the primal Optimizer - Constraints : 2 Optimizer - Cones : 1 Optimizer - Scalar variables : 3 conic : 3 Optimizer - Semi-definite variables: 1 scalarized : 6 Factor - setup time : 0.00 dense det. time : 0.00 Factor - ML order time : 0.00 GP order time : 0.00 Factor - nonzeros before factor : 3 after factor : 3 Factor - dense dim. : 0 flops : 2.88e+02 ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME 0 3.0e+00 1.0e+00 8.0e+00 0.00e+00 7.000000000e+00 0.000000000e+00 1.0e+00 0.00 1 4.3e-01 1.4e-01 1.2e+00 1.67e-01 1.601234178e+00 3.103213067e-01 1.4e-01 0.00 2 6.6e-02 2.2e-02 1.8e-01 1.21e+00 8.534948745e-01 6.725260078e-01 2.2e-02 0.00 3 4.9e-03 1.6e-03 1.3e-02 1.02e+00 7.158760069e-01 7.026959645e-01 1.6e-03 0.00 4 2.8e-04 9.4e-05 7.5e-04 1.00e+00 7.063055286e-01 7.055481573e-01 9.4e-05 0.00 5 1.6e-05 5.2e-06 4.1e-05 1.00e+00 7.057440915e-01 7.057021878e-01 5.2e-06 0.00 6 8.9e-07 3.0e-07 2.4e-06 1.00e+00 7.057124546e-01 7.057100494e-01 3.0e-07 0.00 7 1.6e-08 5.4e-09 4.3e-08 1.00e+00 7.057105296e-01 7.057104862e-01 5.4e-09 0.00 Interior-point optimizer terminated. Time: 0.00. Optimizer terminated. Time: 0.00 Interior-point solution summary Problem status : PRIMAL_AND_DUAL_FEASIBLE Solution status : OPTIMAL Primal. obj: 7.0571052965e-01 Viol. con: 2e-08 var: 0e+00 barvar: 0e+00 cones: 0e+00 Dual. obj: 7.0571048621e-01 Viol. con: 0e+00 var: 1e-16 barvar: 0e+00 cones: 0e+00 Return code - 0 [MSK_RES_OK]: No error occurred.

Finally, the optimal value for the matrix \(\bar X\) and the dual values associated with bound constraints on entries of the matrix \(\bar X\) can be displayed in GAMS as usual: `display X.l, X.m`

;

## Usage

The general syntax for defining a symmetric matrix or an (indexed) set of symmetric matrices with PSD constraints in GAMS is

Variable X(a,b,c,...,i1,..,ik,i1,...,ik) "PSDMATRIX_k <explanatory text>";

The number k>0 specifies the number of indices that define the row/column dimension of the matrix. Specifying only the term `PSDMATRIX`

is equivalent to `PSDMATRIX_1`

. For a given k, the 2k-last indices are used to index the rows and columns of the matrix. The dimensions `a`

, `b`

, `c`

, ... are optional and can be used to index a set of matrices. In the GAMS/MOSEK output, a number in parenthesis is used to indicate the number of PSD matrices that have been found for one symbol. For example, the code

generates the output

Recognizing SDP variables for symbols X (42)

if all matrices `X(j,.,.)`

also occur in a model instantiation.

- Note
- The current syntax for declaring PSD matrix variables via the explanatory text a variable is a temporary solution that will hopefully be replaced by a GAMS language feature in the future.

Variables that were tagged as belonging to a PSD matrix can only occur in linear constraints. Within these constraints, the coefficient matrix for a PSD matrix needs to be specified in symmetric form. That is, if the parameter matrix `barAobj`

in the example above is equivalently specified as

the GAMS/MOSEK interface will quit with the error message

SDP coefficient matrix not symmetric: defObj_z: 2*barX(1,0) != 0*barX(0,1)

Bounds on entries in a PSD matrix variable can be specified as usual with `.lo`

and `.up`

attributes. These bound constraints are translated into linear constraints by the interface. If different bounds are given to symmetric entries of a PSD matrix variable ( \(\bar X_{i,j}\) vs. \(\bar X_{j,i}\)), the stronger bounds are used, which is equivalent to adding constraints for each of the matrix entries. For nonpositive lower bounds on diagonal entries, no extra constraints are added, as they are implied by the PSD constraint.

## GAMS variables vs. PSD matrix entries

As GAMS is not aware that a indexed variable will be interpreted as PSD matrix variable, it may not generate variables for all matrix entries when instantiating a model. This is especially critical if the modeler specified bounds on matrix entries that do not appear in any of the model equations, as these bounds would not be visible to the GAMS/MOSEK interface.

As an example, consider the SDP relaxation \(\max\{-\langle W,\bar X\rangle : X_{i,i} = 1 \;\forall i, X\succeq 0\}\) corresponding to the Goemans-Williamson Randomized Approximation Algorithm for MaxCut:

As `W(i,i)=0`

, GAMS will not create any variables for `X(i,i)`

when instantiating the model in a solve statement. As a consequence, the constraints `X(i,i)=1`

will not be visible to GAMS/MOSEK. However, as MOSEK will compute values for the full matrix \(X\), it will also compute values for the diagonal entries of `X`

.

Further, the GAMS/MOSEK interface can pass primal solution values only for those entries of a PSD matrix variable that have a corresponding GAMS variable. This may make a solution matrix appear not to be PSD in GAMS, because not all entries have been passed back.

To be aware of such problems, the GAMS/MOSEK interface checks that it has a GAMS variable available for every entry of a PSD matrix variable. If not, it will report an error like

ERROR: Have 1600 GAMS variables for entries of 400 x 400 PSD Variable X(,), expected 160000 many.

This check can be disabled by setting the option SDPCHECKVARS to 0. Note, that the check is not able to alarm the user in situations where no GAMS variables were created for all entries of a row and corresponding column.

A simple workaround for this issue is to force all variables to be generated when a model is instantiated. This can be done by adding something like `eps*sum((i,j),X(i,j))`

to one of the equations. Note, that `eps`

is numerically equal to a 0.0 in GAMS, but has the effect that the term `sum((i,j),X(i,j))`

is passed to the solver with 0.0-coefficient.

## Dual Values for PSD constraints

The PSD constraint on a matrix variable \(\bar X\) is associated with a dual PSD matrix variable \(\bar Y\). As GAMS is not aware of the PSD constraints, it is also not aware of the corresponding dual variables. Thus, there is no native way to pass the duals for the PSD constraints back to GAMS. (Recall, that the marginals for a PSDMATRIX variable `X`

are used to store the dual values associated with the bound constraints on matrix entries.)

To work around this issue, the GAMS/MOSEK interface offers the option SDPSOLUFILE. This option allows to specify the name of a GDX file that stores primal values for all entries of a matrix variable and dual values of the corresponding PSD constraint. For a variable `X(i,j)`

, the GDX file stores the primal matrix value for all entries \((i,j)\) (i.e., not just the ones for which GAMS variables were created, therefor offering another workaround for the issue discussed in the previous section) as level values of variable `X`

and the dual matrix for the PSD constraint as marginal values.

# Detailed Descriptions of MOSEK Options

**FIXOPTFILE** *(string)*: Name of option file which is read just before solving the fixed problem. ↵

**MSK_DPAR_ANA_SOL_INFEAS_TOL** *(real)*: If a constraint violates its bound with an amount larger than this value, the constraint name, index and violation will be printed by the solution analyzer. ↵

Default:

`1e-06`

**MSK_DPAR_BASIS_REL_TOL_S** *(real)*: Maximum relative dual bound violation allowed in an optimal basic solution. ↵

Default:

`1e-12`

**MSK_DPAR_BASIS_TOL_S** *(real)*: Maximum absolute dual bound violation in an optimal basic solution. ↵

Range: [

`1e-09`

, ∞]Default:

`1e-06`

**MSK_DPAR_BASIS_TOL_X** *(real)*: Maximum absolute primal bound violation allowed in an optimal basic solution. ↵

Range: [

`1e-09`

, ∞]Default:

`1e-06`

**MSK_DPAR_CHECK_CONVEXITY_REL_TOL** *(real)*: This parameter controls when the full convexity check declares a problem to be non-convex. ↵

Increasing this tolerance relaxes the criteria for declaring the problem non-convex. A problem is declared non-convex if negative (positive) pivot elements are detected in the Cholesky factor of a matrix which is required to be PSD (NSD). This parameter controls how much this non-negativity requirement may be violated. The matrix \(Q\) is considered to not be PSD if the pivot element for column \(i\) is less or equal \(-|Q_{ii}|*\)

`MSK_DPAR_CHECK_CONVEXITY_REL_TOL`

.Default:

`1e-10`

**MSK_DPAR_DATA_SYM_MAT_TOL** *(real)*: Absolute zero tolerance for elements in in symmetric matrices. ↵

If any value in a symmetric matrix is smaller than this parameter in absolute terms MOSEK will treat the values as zero and generate a warning.

Range: [

`1e-16`

,`1e-06`

]Default:

`1e-12`

**MSK_DPAR_DATA_SYM_MAT_TOL_HUGE** *(real)*: An element in a symmetric matrix which is larger than this value in absolute size causes an error. ↵

Default:

`1e+20`

**MSK_DPAR_DATA_SYM_MAT_TOL_LARGE** *(real)*: An element in a symmetric matrix which is larger than this value in absolute size causes a warning message to be printed. ↵

Default:

`1e+10`

**MSK_DPAR_DATA_TOL_AIJ** *(real)*: Absolute zero tolerance for elements in the constraint matrix. ↵

If any value in the constraint matrix is smaller than this parameter in absolute terms MOSEK will treat the values as zero and generate a warning.

Range: [

`1e-16`

,`1e-06`

]Default:

`1e-12`

**MSK_DPAR_DATA_TOL_AIJ_HUGE** *(real)*: An element in the constraint matrix which is larger than this value in absolute size causes an error. ↵

Default:

`1e+20`

**MSK_DPAR_DATA_TOL_AIJ_LARGE** *(real)*: An element in the constraint matrix which is larger than this value in absolute size causes a warning message. ↵

Default:

`1e+10`

**MSK_DPAR_DATA_TOL_BOUND_INF** *(real)*: Any bound which in absolute value is greater than this parameter is considered infinite. ↵

Default:

`1e+16`

**MSK_DPAR_DATA_TOL_BOUND_WRN** *(real)*: If a bound value is larger than this value in absolute size, then a warning message is issued. ↵

Default:

`1e+08`

**MSK_DPAR_DATA_TOL_CJ_LARGE** *(real)*: A coefficient in the objective function which is larger than this value in absolute terms causes a warning message. ↵

Default:

`1e+08`

**MSK_DPAR_DATA_TOL_C_HUGE** *(real)*: A coefficient in the objective function which is larger than the value in absolute terms is considered to be huge and generates an error. ↵

Default:

`1e+16`

**MSK_DPAR_DATA_TOL_QIJ** *(real)*: Absolute zero tolerance for coefficients of quadratic terms. ↵

Default:

`1e-16`

**MSK_DPAR_DATA_TOL_X** *(real)*: Zero tolerance for constraints and variables i.e. if the distance between the lower and upper bound is less than this value, then the lower and upper bound is considered identical. ↵

Default:

`1e-08`

**MSK_DPAR_INTPNT_CO_TOL_DFEAS** *(real)*: Dual feasibility tolerance used by the conic interior-point optimizer. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

See also: MSK_DPAR_INTPNT_CO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_CO_TOL_INFEAS** *(real)*: Controls when the conic interior-point optimizer declares the model primal or dual infeasible. ↵

A small number means the optimizer gets more conservative about declaring the model infeasible.

Range: [

`0`

,`1`

]Default:

`1e-10`

**MSK_DPAR_INTPNT_CO_TOL_MU_RED** *(real)*: Relative complementarity gap feasibility tolerance used by the conic interior-point optimizer. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_CO_TOL_NEAR_REL** *(real)*: Termination tolerance multiplier that is used if no accurate solution can be found. ↵

If MOSEK cannot compute a solution that has the prescribed accuracy, then it will multiply the termination tolerances with value of this parameter. If the solution then satisfies the termination criteria, then the solution is denoted near optimal, near feasible and so forth.

Range: [

`1`

, ∞]Default:

`1000`

**MSK_DPAR_INTPNT_CO_TOL_PFEAS** *(real)*: Primal feasibility tolerance used by the conic interior-point optimizer. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

See also: MSK_DPAR_INTPNT_CO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_CO_TOL_REL_GAP** *(real)*: Relative gap termination tolerance used by the conic interior-point optimizer. ↵

Range: [

`0`

,`1`

]Default:

`1e-07`

See also: MSK_DPAR_INTPNT_CO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_NL_MERIT_BAL** *(real)*: Controls if the complementarity and infeasibility is converging to zero at about equal rates. ↵

Range: [

`0`

,`0.99`

]Default:

`0.0001`

**MSK_DPAR_INTPNT_NL_TOL_DFEAS** *(real)*: Dual feasibility tolerance used when a nonlinear model is solved. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_NL_TOL_MU_RED** *(real)*: Relative complementarity gap tolerance for the nonlinear solver. ↵

Range: [

`0`

,`1`

]Default:

`1e-12`

**MSK_DPAR_INTPNT_NL_TOL_NEAR_REL** *(real)*: Termination tolerance multiplier that is used if no accurate solution can be found. ↵

If the MOSEK nonlinear interior-point optimizer cannot compute a solution that has the prescribed accuracy, then it will multiply the termination tolerances with value of this parameter. If the solution then satisfies the termination criteria, then the solution is denoted near optimal, near feasible and so forth.

Range: [

`1`

, ∞]Default:

`1000`

**MSK_DPAR_INTPNT_NL_TOL_PFEAS** *(real)*: Primal feasibility tolerance used when a nonlinear model is solved. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_NL_TOL_REL_GAP** *(real)*: Relative gap termination tolerance for nonlinear problems. ↵

Range: [

`1e-14`

, ∞]Default:

`1e-06`

**MSK_DPAR_INTPNT_NL_TOL_REL_STEP** *(real)*: Relative step size to the boundary for general nonlinear optimization problems. ↵

Range: [

`0.0001`

,`1`

]Default:

`0.995`

**MSK_DPAR_INTPNT_QO_TOL_DFEAS** *(real)*: Dual feasibility tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

See also: MSK_DPAR_INTPNT_QO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_QO_TOL_INFEAS** *(real)*: Controls when the conic interior-point optimizer declares the model primal or dual infeasible. ↵

A small number means the optimizer gets more conservative about declaring the model infeasible.

Range: [

`0`

,`1`

]Default:

`1e-10`

**MSK_DPAR_INTPNT_QO_TOL_MU_RED** *(real)*: Relative complementarity gap feasibility tolerance used when interior-point optimizer is applied to a quadratic optimization problem. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_QO_TOL_NEAR_REL** *(real)*: Termination tolerance multiplier that is used if no accurate solution can be found. ↵

If MOSEK cannot compute a solution that has the prescribed accuracy, then it will multiply the termination tolerances with value of this parameter. If the solution then satisfies the termination criteria, then the solution is denoted near optimal, near feasible and so forth.

Range: [

`1`

, ∞]Default:

`1000`

**MSK_DPAR_INTPNT_QO_TOL_PFEAS** *(real)*: Primal feasibility tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

See also: MSK_DPAR_INTPNT_QO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_QO_TOL_REL_GAP** *(real)*: Relative gap termination tolerance used when the interior-point optimizer is applied to a quadratic optimization problem. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

See also: MSK_DPAR_INTPNT_QO_TOL_NEAR_REL.

**MSK_DPAR_INTPNT_TOL_DFEAS** *(real)*: Dual feasibility tolerance used for linear optimization problems. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_TOL_DSAFE** *(real)*: Controls the initial dual starting point used by the interior-point optimizer. ↵

If the interior-point optimizer converges slowly and/or the constraint or variable bounds are very large, then it might be worthwhile to increase this value.

Range: [

`0.0001`

, ∞]Default:

`1`

**MSK_DPAR_INTPNT_TOL_INFEAS** *(real)*: Controls when the optimizer declares the model primal or dual infeasible. ↵

A small number means the optimizer gets more conservative about declaring the model infeasible.

Range: [

`0`

,`1`

]Default:

`1e-10`

**MSK_DPAR_INTPNT_TOL_MU_RED** *(real)*: Relative complementarity gap tolerance for linear problems. ↵

Range: [

`0`

,`1`

]Default:

`1e-16`

**MSK_DPAR_INTPNT_TOL_PATH** *(real)*: Controls how close the interior-point optimizer follows the central path. ↵

A large value of this parameter means the central is followed very closely. On numerical unstable problems it may be worthwhile to increase this parameter.

Range: [

`0`

,`0.9999`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_TOL_PFEAS** *(real)*: Primal feasibility tolerance used for linear optimization problems. ↵

Range: [

`0`

,`1`

]Default:

`1e-08`

**MSK_DPAR_INTPNT_TOL_PSAFE** *(real)*: Controls the initial primal starting point used by the interior-point optimizer. ↵

If the interior-point optimizer converges slowly and/or the constraint or variable bounds are very large, then it may be worthwhile to increase this value.

Range: [

`0.0001`

, ∞]Default:

`1`

**MSK_DPAR_INTPNT_TOL_REL_GAP** *(real)*: Relative gap termination tolerance for linear problems. ↵

Range: [

`1e-14`

, ∞]Default:

`1e-08`

**MSK_DPAR_INTPNT_TOL_REL_STEP** *(real)*: Relative step size to the boundary for linear and quadratic optimization problems. ↵

Range: [

`0.0001`

,`0.999999`

]Default:

`0.9999`

**MSK_DPAR_INTPNT_TOL_STEP_SIZE** *(real)*: Step size tolerance. ↵

If the step size falls below the value of this parameter, then the interior-point optimizer assumes it is stalled. In other words the interior-point optimizer does not make any progress and therefore it is better stop.

Range: [

`0`

,`1`

]Default:

`1e-06`

**MSK_DPAR_LOWER_OBJ_CUT** *(real)*: Lower objective limit. ↵

If either a primal or dual feasible solution is found proving that the optimal objective value is outside, the interval (

`MSK_DPAR_LOWER_OBJ_CUT`

,`MSK_DPAR_UPPER_OBJ_CUT`

), then MOSEK is terminated.Range: [-∞, ∞]

Default:

`-1e+30`

See also: MSK_DPAR_LOWER_OBJ_CUT_FINITE_TRH.

**MSK_DPAR_LOWER_OBJ_CUT_FINITE_TRH** *(real)*: Lower objective limit threshold. ↵

If the lower objective cut (MSK_DPAR_LOWER_OBJ_CUT) is less than this value, then it is treated as infinity.

Range: [-∞, ∞]

Default:

`-5e+29`

**MSK_DPAR_MIO_DISABLE_TERM_TIME** *(real)*: Disables termination criteria for a certain time. ↵

This parameter specifies the number of seconds during which the termination criteria governed by

- MSK_IPAR_MIO_MAX_NUM_RELAXS
- MSK_IPAR_MIO_MAX_NUM_BRANCHES
- MSK_DPAR_MIO_NEAR_TOL_ABS_GAP
- MSK_DPAR_MIO_NEAR_TOL_REL_GAP
are disabled since the beginning of the optimization. A negative value is identical to infinity i.e. the termination criteria are never checked.

Range: [-∞, ∞]

Default:

`0`

See also: MSK_DPAR_MIO_NEAR_TOL_ABS_GAP, MSK_DPAR_MIO_NEAR_TOL_REL_GAP, MSK_IPAR_MIO_MAX_NUM_BRANCHES, MSK_IPAR_MIO_MAX_NUM_RELAXS.

**MSK_DPAR_MIO_MAX_TIME** *(real)*: This parameter limits the maximum time spent by the mixed-integer optimizer. ↵

A negative number means infinity.

Range: [-∞, ∞]

Default:

`-1`

**MSK_DPAR_MIO_NEAR_TOL_ABS_GAP** *(real)*: Relaxed absolute optimality tolerance employed by the mixed-integer optimizer. ↵

This termination criteria is delayed.

Default:

`GAMS OptCA`

See also: MSK_DPAR_MIO_DISABLE_TERM_TIME.

**MSK_DPAR_MIO_NEAR_TOL_REL_GAP** *(real)*: Relaxed relative optimality tolerance employed by the mixed integer optimizer. ↵

The mixed integer optimizer is terminated when this tolerance is satisfied. This termination criteria is delayed.

Default:

`GAMS OptCR`

See also: MSK_DPAR_MIO_DISABLE_TERM_TIME.

**MSK_DPAR_MIO_REL_GAP_CONST** *(real)*: This value is used to compute the relative gap for the solution to an integer optimization problem. ↵

Range: [

`1e-15`

, ∞]Default:

`1e-10`

**MSK_DPAR_MIO_TOL_ABS_GAP** *(real)*: Absolute optimality tolerance employed by the mixed-integer optimizer. ↵

Default:

`0`

**MSK_DPAR_MIO_TOL_ABS_RELAX_INT** *(real)*: Absolute relaxation tolerance of the integer constraints. ↵

That means if the fractional part of a discrete variable \((\min(|x|-\lfloor x \rfloor,\lceil x \rceil - |x|))\) is less than the tolerance, then the integer restriction is assumed to be satisfied.

Range: [

`1e-09`

, ∞]Default:

`1e-05`

**MSK_DPAR_MIO_TOL_FEAS** *(real)*: Feasibility tolerance for mixed integer solver. ↵

Range: [

`1e-09`

,`0.001`

]Default:

`1e-06`

**MSK_DPAR_MIO_TOL_REL_DUAL_BOUND_IMPROVEMENT** *(real)*: If the relative improvement of the dual bound is smaller than this value, the solver will terminate the root cut generation. ↵

A value of 0.0 means that the value is selected automatically.

Range: [

`0`

,`1`

]Default:

`0`

**MSK_DPAR_MIO_TOL_REL_GAP** *(real)*: Relative optimality tolerance employed by the mixed-integer optimizer. ↵

Default:

`0`

**MSK_DPAR_OPTIMIZER_MAX_TIME** *(real)*: Maximum amount of time the optimizer is allowed to spent on the optimization. ↵

A negative number means infinity.

Range: [-∞, ∞]

Default:

`GAMS ResLim`

**MSK_DPAR_PRESOLVE_TOL_ABS_LINDEP** *(real)*: Absolute tolerance employed by the linear dependency checker. ↵

Default:

`1e-06`

**MSK_DPAR_PRESOLVE_TOL_AIJ** *(real)*: Absolute zero tolerance employed for constraint coefficients in presolve. ↵

Range: [

`1e-15`

, ∞]Default:

`1e-12`

**MSK_DPAR_PRESOLVE_TOL_REL_LINDEP** *(real)*: Relative tolerance employed by the linear dependency checker. ↵

Default:

`1e-10`

**MSK_DPAR_PRESOLVE_TOL_S** *(real)*: Absolute zero tolerance employed for dual variables in presolve. ↵

Default:

`1e-08`

**MSK_DPAR_PRESOLVE_TOL_X** *(real)*: Absolute zero tolerance employed for primal variables in presolve. ↵

Default:

`1e-08`

**MSK_DPAR_QCQO_REFORMULATE_REL_DROP_TOL** *(real)*: This parameter determines when columns are dropped in incomplete Cholesky factorization during reformulation of quadratic problems. ↵

Default:

`1e-15`

**MSK_DPAR_SEMIDEFINITE_TOL_APPROX** *(real)*: Tolerance to define a matrix to be positive semidefinite. ↵

Range: [

`1e-15`

, ∞]Default:

`1e-10`

**MSK_DPAR_SIMPLEX_ABS_TOL_PIV** *(real)*: Absolute pivot tolerance employed by the simplex optimizers. ↵

Range: [

`1e-12`

, ∞]Default:

`1e-07`

**MSK_DPAR_SIM_LU_TOL_REL_PIV** *(real)*: Relative pivot tolerance for LU factorization in simplex optimizers and basis identification. ↵

A value closer to 1.0 generally improves numerical stability but typically also implies an increase in the computational work.

Range: [

`1e-06`

,`0.999999`

]Default:

`0.01`

**MSK_DPAR_UPPER_OBJ_CUT** *(real)*: Upper objective limit. ↵

If either a primal or dual feasible solution is found proving that the optimal objective value is outside the interval (

`MSK_DPAR_LOWER_OBJ_CUT`

,`MSK_DPAR_UPPER_OBJ_CUT`

), then MOSEK is terminated.Range: [-∞, ∞]

Default:

`1e+30`

See also: MSK_DPAR_UPPER_OBJ_CUT_FINITE_TRH.

**MSK_DPAR_UPPER_OBJ_CUT_FINITE_TRH** *(real)*: Upper objective limit threshold. ↵

If the upper objective cut MSK_DPAR_UPPER_OBJ_CUT is greater than this value, then it is treated as infinity.

Range: [-∞, ∞]

Default:

`5e+29`

**MSK_IPAR_AUTO_SORT_A_BEFORE_OPT** *(string)*: Controls whether the elements in each column of the coefficient matrix are sorted before an optimization is performed. ↵

This is not required but makes the optimization insusceptible to reorderings of variables.

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_BI_CLEAN_OPTIMIZER** *(string)*: Controls which simplex optimizer is used in the clean-up phase. ↵

Default:

`MSK_OPTIMIZER_FREE`

value meaning `MSK_OPTIMIZER_FREE`

The optimizer is chosen automatically. `MSK_OPTIMIZER_PRIMAL_SIMPLEX`

The primal simplex optimizer is used. `MSK_OPTIMIZER_DUAL_SIMPLEX`

The dual simplex optimizer is used. `MSK_OPTIMIZER_FREE_SIMPLEX`

One of the simplex optimizers is used.

**MSK_IPAR_BI_IGNORE_MAX_ITER** *(string)*: Controls if basis identification is performed under certain conditions. ↵

If the parameter MSK_IPAR_INTPNT_BASIS has the value

`MSK_BI_NO_ERROR`

and the interior-point optimizer has terminated due to maximum number of iterations, then basis identification is performed if this parameter has the value`MSK_ON`

.Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_BI_IGNORE_NUM_ERROR** *(string)*: Turns on basis identification if interior-point optimizer is terminated due to a numerical problem. ↵

If the parameter

`MSK_IPAR_INTPNT_BASIS`

has the value`MSK_BI_NO_ERROR`

and the interior-point optimizer has terminated due to a numerical problem, then basis identification is performed if this parameter has the value`MSK_ON`

.Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_BI_MAX_ITERATIONS** *(integer)*: Controls the maximum number of simplex iterations allowed to optimize a basis after the basis identification. ↵

Default:

`1000000`

**MSK_IPAR_CHECK_CONVEXITY** *(string)*: Specify the level of convexity check on quadratic problems. ↵

Default:

`MSK_CHECK_CONVEXITY_FULL`

value meaning `MSK_CHECK_CONVEXITY_NONE`

No convexity check. `MSK_CHECK_CONVEXITY_SIMPLE`

Perform simple and fast convexity check. `MSK_CHECK_CONVEXITY_FULL`

Perform a full convexity check.

**MSK_IPAR_INFEAS_PREFER_PRIMAL** *(string)*: If both certificates of primal and dual infeasibility are supplied then only the primal is used when this option is turned on. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_INFEAS_REPORT_AUTO** *(string)*: Controls whether an infeasibility report is automatically produced after the optimization if the problem is primal or dual infeasible. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_INFEAS_REPORT_LEVEL** *(integer)*: Controls the amount of information presented in an infeasibility report. ↵

Higher values imply more information.

Default:

`1`

**MSK_IPAR_INTPNT_BASIS** *(string)*: Controls whether the interior-point optimizer also computes an optimal basis. ↵

Default:

`MSK_BI_ALWAYS`

value meaning `MSK_BI_NEVER`

Never do basis identification. `MSK_BI_ALWAYS`

Basis identification is always performed even if the interior-point optimizer terminates abnormally. `MSK_BI_NO_ERROR`

Basis identification is performed if the interior-point optimizer terminates without an error. `MSK_BI_IF_FEASIBLE`

Basis identification is not performed if the interior-point optimizer terminates with a problem status saying that the problem is primal or dual infeasible. See also: MSK_IPAR_BI_CLEAN_OPTIMIZER, MSK_IPAR_BI_IGNORE_MAX_ITER, MSK_IPAR_BI_IGNORE_NUM_ERROR, MSK_IPAR_BI_MAX_ITERATIONS.

**MSK_IPAR_INTPNT_DIFF_STEP** *(string)*: Controls whether different step sizes are allowed in the primal and dual space. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_INTPNT_MAX_ITERATIONS** *(integer)*: Controls the maximum number of iterations allowed in the interior-point optimizer. ↵

Default:

`GAMS IterLim`

**MSK_IPAR_INTPNT_MAX_NUM_COR** *(integer)*: Controls the maximum number of correctors allowed by the multiple corrector procedure. ↵

A negative value means that MOSEK is making the choice.

Range: [

`-1`

, ∞]Default:

`-1`

**MSK_IPAR_INTPNT_MAX_NUM_REFINEMENT_STEPS** *(integer)*: Maximum number of steps to be used by the iterative refinement of the search direction. ↵

A negative value implies that the optimizer chooses the maximum number of iterative refinement steps.

Range: [-∞, ∞]

Default:

`-1`

**MSK_IPAR_INTPNT_MULTI_THREAD** *(string)*: Controls whether the interior-point optimizers can employ multiple threads if available. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_INTPNT_OFF_COL_TRH** *(integer)*: Controls how aggressively offending columns are detected in the Jacobian of the constraint matrix. ↵

0 means no detection, 1 means aggressive detection, and higher values mean less aggressive detection.

Default:

`40`

**MSK_IPAR_INTPNT_ORDER_METHOD** *(string)*: Controls the ordering strategy used by the interior-point optimizer when factorizing the Newton equation system. ↵

Default:

`MSK_ORDER_METHOD_FREE`

value meaning `MSK_ORDER_METHOD_FREE`

The ordering method is chosen automatically. `MSK_ORDER_METHOD_APPMINLOC`

Approximate minimum local fill-in ordering is employed. `MSK_ORDER_METHOD_TRY_GRAPHPAR`

Always try the graph partitioning based ordering. `MSK_ORDER_METHOD_FORCE_GRAPHPAR`

Always use the graph partitioning based ordering even if it is worse than the approximate minimum local fill ordering. `MSK_ORDER_METHOD_NONE`

No ordering is used.

**MSK_IPAR_INTPNT_REGULARIZATION_USE** *(string)*: Controls whether regularization is allowed. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_INTPNT_SCALING** *(string)*: Controls how the problem is scaled before the interior-point optimizer is used. ↵

Default:

`MSK_SCALING_FREE`

value meaning `MSK_SCALING_FREE`

The optimizer chooses the scaling heuristic. `MSK_SCALING_NONE`

No scaling is performed. `MSK_SCALING_MODERATE`

A conservative scaling is performed. `MSK_SCALING_AGGRESSIVE`

A very aggressive scaling is performed.

**MSK_IPAR_INTPNT_SOLVE_FORM** *(string)*: Controls whether the primal or the dual problem is solved. ↵

Default:

`MSK_SOLVE_FREE`

value meaning `MSK_SOLVE_FREE`

The optimizer is free to solve either the primal or the dual problem. `MSK_SOLVE_PRIMAL`

The optimizer should solve the primal problem. `MSK_SOLVE_DUAL`

The optimizer should solve the dual problem.

**MSK_IPAR_INTPNT_STARTING_POINT** *(string)*: Starting point used by the interior-point optimizer. ↵

Default:

`MSK_STARTING_POINT_FREE`

value meaning `MSK_STARTING_POINT_FREE`

The starting point is chosen automatically. `MSK_STARTING_POINT_GUESS`

The optimizer guesses a starting point. `MSK_STARTING_POINT_CONSTANT`

The optimizer constructs a starting point by assigning a constant value to all primal and dual variables.

This starting point is normally robust.`MSK_STARTING_POINT_SATISFY_BOUNDS`

The starting point is chosen to satisfy all the simple bounds on nonlinear variables.

If this starting point is employed, then more care than usual should employed when choosing the bounds on the nonlinear variables. In particular very tight bounds should be avoided.

**MSK_IPAR_LOG** *(integer)*: Controls the amount of log information. ↵

The value 0 implies that all log information is suppressed. A higher level implies that more information is logged.

Default:

`10`

**MSK_IPAR_LOG_BI** *(integer)*: Controls the amount of output printed by the basis identification procedure. ↵

A higher level implies that more information is logged.

Default:

`1`

**MSK_IPAR_LOG_BI_FREQ** *(integer)*: Controls logging frequency of the basis identification ↵

Default:

`2500`

**MSK_IPAR_LOG_CHECK_CONVEXITY** *(integer)*: Controls logging in convexity check on quadratic problems. ↵

Set to a positive value to turn logging on. If a quadratic coefficient matrix is found to violate the requirement of PSD (NSD) then a list of negative (positive) pivot elements is printed. The absolute value of the pivot elements is also shown.

Default:

`0`

**MSK_IPAR_LOG_FEAS_REPAIR** *(integer)*: Controls the amount of output printed when performing feasibility repair. ↵

Default:

`1`

**MSK_IPAR_LOG_INFEAS_ANA** *(integer)*: Controls amount of output printed by the infeasibility analyzer procedures. ↵

A higher level implies that more information is logged.

Default:

`1`

**MSK_IPAR_LOG_INTPNT** *(integer)*: Controls amount of output printed by the interior-point optimizer. ↵

A higher level implies that more information is logged.

Default:

`1`

**MSK_IPAR_LOG_MIO** *(integer)*: Controls the log level for the mixed-integer optimizer. ↵

A higher level implies that more information is logged.

Default:

`4`

**MSK_IPAR_LOG_MIO_FREQ** *(integer)*: Controls how frequent the mixed-integer optimizer prints the log line. ↵

It will print a line every time

`MSK_INTPAR_LOG_MIO_FREQ`

relaxations have been solved.Range: [-∞, ∞]

Default:

`10`

**MSK_IPAR_LOG_ORDER** *(integer)*: If turned on, then factor lines are added to the log. ↵

Default:

`1`

**MSK_IPAR_LOG_PRESOLVE** *(integer)*: Controls amount of output printed by the presolve procedure. ↵

A higher level implies that more information is logged.

Default:

`1`

**MSK_IPAR_LOG_RESPONSE** *(integer)*: Controls amount of output printed when response codes are reported. ↵

A higher level implies that more information is logged.

Default:

`0`

**MSK_IPAR_LOG_SIM** *(integer)*: Controls amount of output printed by the simplex optimizer. ↵

A higher level implies that more information is logged.

Default:

`4`

**MSK_IPAR_LOG_SIM_FREQ** *(integer)*: Controls simplex optimizer logging frequency. ↵

Default:

`1000`

**MSK_IPAR_LOG_STORAGE** *(integer)*: When turned on, MOSEK prints messages regarding the storage usage and allocation. ↵

Default:

`0`

**MSK_IPAR_MIO_BRANCH_DIR** *(string)*: Controls whether the mixed-integer optimizer is branching up or down by default. ↵

Default:

`MSK_BRANCH_DIR_FREE`

value meaning `MSK_BRANCH_DIR_FREE`

The mixed-integer optimizer decides which branch to choose. `MSK_BRANCH_DIR_UP`

The mixed-integer optimizer always chooses the up branch first. `MSK_BRANCH_DIR_DOWN`

The mixed-integer optimizer always chooses the down branch first. `MSK_BRANCH_DIR_NEAR`

Branch in direction nearest to selected fractional variable. `MSK_BRANCH_DIR_FAR`

Branch in direction farthest from selected fractional variable. `MSK_BRANCH_DIR_ROOT_LP`

Chose direction based on root lp value of selected variable. `MSK_BRANCH_DIR_GUIDED`

Branch in direction of current incumbent. `MSK_BRANCH_DIR_PSEUDOCOST`

Branch based on the pseudocost of the variable.

**MSK_IPAR_MIO_CONSTRUCT_SOL** *(string)*: Controls construction of an initial mixed integer solution from the values of the integer variables ↵

Synonym: mipstart

If set to

`MSK_ON`

and all integer variables have been given a value for which a feasible mixed integer solution exists, then MOSEK generates an initial solution to the mixed integer problem by fixing all integer values and solving the remaining problem.Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_CLIQUE** *(string)*: Controls whether clique cuts should be generated. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_CMIR** *(string)*: Controls whether mixed integer rounding cuts should be generated. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_GMI** *(string)*: Controls whether GMI cuts should be generated. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_IMPLIED_BOUND** *(string)*: Controls whether implied bound cuts should be generated. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_KNAPSACK_COVER** *(string)*: Controls whether knapsack cover cuts should be generated. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_CUT_SELECTION_LEVEL** *(integer)*: Controls how aggressively generated cuts are selected to be included in the relaxation. ↵

Default:

`-1`

value meaning `-1`

The optimizer chooses the level of cut selection. `0`

Generated cuts less likely to be added to the relaxation. `1`

Cuts are more aggressively selected to be included in the relaxation.

**MSK_IPAR_MIO_HEURISTIC_LEVEL** *(integer)*: Controls the heuristic employed by the mixed-integer optimizer to locate an initial good integer feasible solution. ↵

A value of zero means the heuristic is not used at all. A larger value than \(0\) means that a gradually more sophisticated heuristic is used which is computationally more expensive. A negative value implies that the optimizer chooses the heuristic. Normally a value around \(3\) to \(5\) should be optimal.

Range: [-∞, ∞]

Default:

`-1`

**MSK_IPAR_MIO_MAX_NUM_BRANCHES** *(integer)*: Maximum number of branches allowed during the branch and bound search. ↵

A negative value means infinite.

Range: [-∞, ∞]

Default:

`-1`

See also: MSK_DPAR_MIO_DISABLE_TERM_TIME.

**MSK_IPAR_MIO_MAX_NUM_RELAXS** *(integer)*: Maximum number of relaxations allowed during the branch and bound search. ↵

A negative value means infinite.

Range: [-∞, ∞]

Default:

`GAMS NodLim`

See also: MSK_DPAR_MIO_DISABLE_TERM_TIME.

**MSK_IPAR_MIO_MAX_NUM_SOLUTIONS** *(integer)*: The mixed-integer optimizer can be terminated after a certain number of different feasible solutions has been located. ↵

If this parameter has the value \(n>0\), then the mixed-integer optimizer will be terminated when \(n\) feasible solutions have been located.

Range: [-∞, ∞]

Default:

`-1`

See also: MSK_DPAR_MIO_DISABLE_TERM_TIME.

**MSK_IPAR_MIO_NODE_OPTIMIZER** *(string)*: Controls which optimizer is employed at the non-root nodes in the mixed-integer optimizer. ↵

Default:

`MSK_OPTIMIZER_FREE`

value meaning `MSK_OPTIMIZER_FREE`

The optimizer is chosen automatically. `MSK_OPTIMIZER_INTPNT`

The interior-point optimizer is used. `MSK_OPTIMIZER_CONIC`

The optimizer for problems having conic constraints. `MSK_OPTIMIZER_PRIMAL_SIMPLEX`

The primal simplex optimizer is used. `MSK_OPTIMIZER_DUAL_SIMPLEX`

The dual simplex optimizer is used. `MSK_OPTIMIZER_FREE_SIMPLEX`

One of the simplex optimizers is used. `MSK_OPTIMIZER_MIXED_INT`

The mixed-integer optimizer.

**MSK_IPAR_MIO_NODE_SELECTION** *(string)*: Controls the node selection strategy employed by the mixed-integer optimizer. ↵

Default:

`MSK_MIO_NODE_SELECTION_FREE`

value meaning `MSK_MIO_NODE_SELECTION_FREE`

The optimizer decides the node selection strategy. `MSK_MIO_NODE_SELECTION_FIRST`

The optimizer employs a depth first node selection strategy. `MSK_MIO_NODE_SELECTION_BEST`

The optimizer employs a best bound node selection strategy. `MSK_MIO_NODE_SELECTION_WORST`

The optimizer employs a worst bound node selection strategy. `MSK_MIO_NODE_SELECTION_HYBRID`

The optimizer employs a hybrid strategy. `MSK_MIO_NODE_SELECTION_PSEUDO`

The optimizer employs selects the node based on a pseudo cost estimate.

**MSK_IPAR_MIO_PERSPECTIVE_REFORMULATE** *(string)*: Enables or disables perspective reformulation in presolve. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_MIO_PROBING_LEVEL** *(integer)*: Controls the amount of probing employed by the mixed-integer optimizer in presolve. ↵

Default:

`-1`

value meaning `-1`

The optimizer chooses the level of probing employed `0`

Probing is disabled `1`

A low amount of probing is employed `2`

A medium amount of probing is employed `3`

A high amount of probing is employed

**MSK_IPAR_MIO_RINS_MAX_NODES** *(integer)*: Controls the maximum number of nodes allowed in each call to the RINS heuristic. ↵

The default value of -1 means that the value is determined automatically. A value of zero turns off the heuristic.

Range: [

`-1`

, ∞]Default:

`-1`

**MSK_IPAR_MIO_ROOT_OPTIMIZER** *(string)*: Controls which optimizer is employed at the root node in the mixed-integer optimizer. ↵

Default:

`MSK_OPTIMIZER_FREE`

value meaning `MSK_OPTIMIZER_FREE`

The optimizer is chosen automatically. `MSK_OPTIMIZER_INTPNT`

The interior-point optimizer is used. `MSK_OPTIMIZER_CONIC`

The optimizer for problems having conic constraints. `MSK_OPTIMIZER_PRIMAL_SIMPLEX`

The primal simplex optimizer is used. `MSK_OPTIMIZER_DUAL_SIMPLEX`

The dual simplex optimizer is used. `MSK_OPTIMIZER_FREE_SIMPLEX`

One of the simplex optimizers is used.

**MSK_IPAR_MIO_ROOT_REPEAT_PRESOLVE_LEVEL** *(integer)*: Controls whether presolve can be repeated at root node. ↵

Default:

`-1`

value meaning `-1`

The optimizer chooses whether presolve is repeated. `0`

Never repeat presolve. `1`

Always repeat presolve.

**MSK_IPAR_MIO_VB_DETECTION_LEVEL** *(integer)*: Controls how much effort is put into detecting variable bounds. ↵

Default:

`-1`

value meaning `-1`

The optimizer chooses. `0`

No variable bounds are detected. `1`

Only detect variable bounds that are directly represented in the problem. `2`

Detect variable bounds in probing.

**MSK_IPAR_NUM_THREADS** *(integer)*: Controls the number of threads employed by the optimizer. ↵

If set to 0 the number of threads used will be equal to the number of cores detected on the machine.

Default:

`GAMS Threads`

**MSK_IPAR_OPF_MAX_TERMS_PER_LINE** *(integer)*: The maximum number of terms (linear and quadratic) per line when an OPF file is written. ↵

Default:

`5`

**MSK_IPAR_OPF_WRITE_HEADER** *(string)*: Write a text header with date and MOSEK version in an OPF file. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_HINTS** *(string)*: Write a hint section with problem dimensions in the beginning of an OPF file. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_PARAMETERS** *(string)*: Write a parameter section in an OPF file. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_PROBLEM** *(string)*: Write objective, constraints, bounds etc. ↵

to an OPF file.

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_SOLUTIONS** *(string)*: Enable inclusion of solutions in the OPF files. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_SOL_BAS** *(string)*: Whether to include basic solution in OPF files. ↵

If MSK_IPAR_OPF_WRITE_SOLUTIONS is

`MSK_ON`

and a basic solution is defined, include the basic solution in OPF files.Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_SOL_ITG** *(string)*: Whether to include integer solution in OPF files. ↵

If MSK_IPAR_OPF_WRITE_SOLUTIONS is

`MSK_ON`

and an integer solution is defined, write the integer solution to OPF files.Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPF_WRITE_SOL_ITR** *(string)*: Whether to include interior solution in OPF files. ↵

If MSK_IPAR_OPF_WRITE_SOLUTIONS is

`MSK_ON`

and an interior solution is defined, write the interior solution to OPF files.Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_OPTIMIZER** *(string)*: The parameter controls which optimizer is used to optimize the task. ↵

Default:

`MSK_OPTIMIZER_FREE`

value meaning `MSK_OPTIMIZER_FREE`

The optimizer is chosen automatically. `MSK_OPTIMIZER_INTPNT`

The interior-point optimizer is used. `MSK_OPTIMIZER_CONIC`

The optimizer for problems having conic constraints. `MSK_OPTIMIZER_PRIMAL_SIMPLEX`

The primal simplex optimizer is used. `MSK_OPTIMIZER_DUAL_SIMPLEX`

The dual simplex optimizer is used. `MSK_OPTIMIZER_FREE_SIMPLEX`

One of the simplex optimizers is used. `MSK_OPTIMIZER_MIXED_INT`

The mixed-integer optimizer.

**MSK_IPAR_PRESOLVE_ELIMINATOR_MAX_FILL** *(integer)*: Controls the maximum amount of fill-in that can be created by one pivot in the elimination phase of presolve. ↵

A negative value means the parameter value is selected automatically.

Range: [-∞, ∞]

Default:

`-1`

**MSK_IPAR_PRESOLVE_ELIMINATOR_MAX_NUM_TRIES** *(integer)*: Control the maximum number of times the eliminator is tried. ↵

A negative value implies MOSEK decides.

Range: [-∞, ∞]

Default:

`-1`

**MSK_IPAR_PRESOLVE_LINDEP_ABS_WORK_TRH** *(integer)*: Controls the linear dependency check, which is potentially computationally expensive. ↵

Range: [-∞, ∞]

Default:

`100`

**MSK_IPAR_PRESOLVE_LINDEP_REL_WORK_TRH** *(integer)*: Controls the linear dependency check, which is potentially computationally expensive. ↵

Range: [-∞, ∞]

Default:

`100`

**MSK_IPAR_PRESOLVE_LINDEP_USE** *(string)*: Controls whether the linear constraints are checked for linear dependencies. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_PRESOLVE_MAX_NUM_REDUCTIONS** *(integer)*: Controls the maximum number of reductions performed by the presolve. ↵

The value of the parameter is normally only changed in connection with debugging. A negative value implies that an infinite number of reductions are allowed.

Range: [-∞, ∞]

Default:

`-1`

**MSK_IPAR_PRESOLVE_USE** *(string)*: Controls whether the presolve is applied to a problem before it is optimized. ↵

Default:

`MSK_PRESOLVE_MODE_FREE`

value meaning `MSK_PRESOLVE_MODE_OFF`

The problem is not presolved before it is optimized. `MSK_PRESOLVE_MODE_ON`

The problem is presolved before it is optimized. `MSK_PRESOLVE_MODE_FREE`

It is decided automatically whether to presolve before the problem is optimized.

**MSK_IPAR_SIM_BASIS_FACTOR_USE** *(string)*: Controls whether an LU factorization of the basis is used in a hot-start. ↵

Forcing a refactorization sometimes improves the stability of the simplex optimizers, but in most cases there is a performance penalty.

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_SIM_DEGEN** *(string)*: Controls how aggressively degeneration is handled. ↵

Default:

`MSK_SIM_DEGEN_FREE`

value meaning `MSK_SIM_DEGEN_NONE`

The simplex optimizer should use no degeneration strategy. `MSK_SIM_DEGEN_FREE`

The simplex optimizer chooses the degeneration strategy. `MSK_SIM_DEGEN_AGGRESSIVE`

The simplex optimizer should use an aggressive degeneration strategy. `MSK_SIM_DEGEN_MODERATE`

The simplex optimizer should use a moderate degeneration strategy. `MSK_SIM_DEGEN_MINIMUM`

The simplex optimizer should use a minimum degeneration strategy.

**MSK_IPAR_SIM_DUAL_CRASH** *(integer)*: Controls whether crashing is performed in the dual simplex optimizer. ↵

In general if a basis consists of more than

`(100*MSK_IPAR_SIM_DUAL_CRASH)`

percent fixed variables, then a crash will be performed.Default:

`90`

**MSK_IPAR_SIM_DUAL_RESTRICT_SELECTION** *(integer)*: Controls how aggressively a restricted selection/pricing strategy is used to choose the outgoing variable in the dual simplex. ↵

The dual simplex optimizer can use a so-called restricted selection/pricing strategy to chooses the outgoing variable. Hence, if restricted selection is applied, then the dual simplex optimizer first choose a subset of all the potential outgoing variables. Next, for some time it will choose the outgoing variable only among the subset. From time to time the subset is redefined. A larger value of this parameter implies that the optimizer will be more aggressive in its restriction strategy, i.e. a value of 0 implies that the restriction strategy is not applied at all.

Range: [

`0`

,`100`

]Default:

`50`

**MSK_IPAR_SIM_DUAL_SELECTION** *(string)*: Controls the choice of the incoming variable, known as the selection strategy, in the dual simplex optimizer. ↵

Default:

`MSK_SIM_SELECTION_FREE`

value meaning `MSK_SIM_SELECTION_FREE`

The optimizer chooses the pricing strategy. `MSK_SIM_SELECTION_FULL`

The optimizer uses full pricing. `MSK_SIM_SELECTION_ASE`

The optimizer uses approximate steepest-edge pricing. `MSK_SIM_SELECTION_DEVEX`

The optimizer uses devex steepest-edge pricing.

If it is not available an approximate steep-edge selection is chosen.`MSK_SIM_SELECTION_SE`

The optimizer uses steepest-edge selection.

If it is not available an approximate steep-edge selection is chosen.`MSK_SIM_SELECTION_PARTIAL`

The optimizer uses a partial selection approach.

The approach is usually beneficial if the number of variables is much larger than the number of constraints.

**MSK_IPAR_SIM_EXPLOIT_DUPVEC** *(string)*: Controls if the simplex optimizers are allowed to exploit duplicated columns. ↵

Default:

`MSK_SIM_EXPLOIT_DUPVEC_OFF`

value meaning `MSK_SIM_EXPLOIT_DUPVEC_ON`

Allow the simplex optimizer to exploit duplicated columns. `MSK_SIM_EXPLOIT_DUPVEC_OFF`

Disallow the simplex optimizer to exploit duplicated columns. `MSK_SIM_EXPLOIT_DUPVEC_FREE`

The simplex optimizer can choose freely.

**MSK_IPAR_SIM_HOTSTART** *(string)*: Controls the type of hot-start that the simplex optimizer perform. ↵

Default:

`MSK_SIM_HOTSTART_FREE`

value meaning `MSK_SIM_HOTSTART_NONE`

The simplex optimizer performs a coldstart. `MSK_SIM_HOTSTART_FREE`

The simplex optimize chooses the hot-start type. `MSK_SIM_HOTSTART_STATUS_KEYS`

Only the status keys of the constraints and variables are used to choose the type of hot-start.

**MSK_IPAR_SIM_HOTSTART_LU** *(string)*: Determines if the simplex optimizer should exploit the initial factorization. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_SIM_MAX_ITERATIONS** *(integer)*: Maximum number of iterations that can be used by a simplex optimizer. ↵

Default:

`GAMS IterLim`

**MSK_IPAR_SIM_MAX_NUM_SETBACKS** *(integer)*: Controls how many set-backs are allowed within a simplex optimizer. ↵

A set-back is an event where the optimizer moves in the wrong direction. This is impossible in theory but may happen due to numerical problems.

Default:

`250`

**MSK_IPAR_SIM_NON_SINGULAR** *(string)*: Controls if the simplex optimizer ensures a non-singular basis, if possible. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_SIM_PRIMAL_CRASH** *(integer)*: Controls whether crashing is performed in the primal simplex optimizer. ↵

In general if a basis consists of more than

`(100*MSK_IPAR_SIM_PRIMAL_CRASH)`

percent fixed variables, then a crash will be performed.Default:

`90`

**MSK_IPAR_SIM_PRIMAL_RESTRICT_SELECTION** *(integer)*: Controls how aggressively a restricted selection/pricing strategy is used to choose the outgoing variable in the primal simplex. ↵

The primal simplex optimizer can use a so-called restricted selection/pricing strategy to chooses the outgoing variable. Hence, if restricted selection is applied, then the primal simplex optimizer first choose a subset of all the potential incoming variables. Next, for some time it will choose the incoming variable only among the subset. From time to time the subset is redefined. A larger value of this parameter implies that the optimizer will be more aggressive in its restriction strategy, i.e. a value of 0 implies that the restriction strategy is not applied at all.

Range: [

`0`

,`100`

]Default:

`50`

**MSK_IPAR_SIM_PRIMAL_SELECTION** *(string)*: Controls the choice of the incoming variable, known as the selection strategy, in the primal simplex optimizer. ↵

Default:

`MSK_SIM_SELECTION_FREE`

value meaning `MSK_SIM_SELECTION_FREE`

The optimizer chooses the pricing strategy. `MSK_SIM_SELECTION_FULL`

The optimizer uses full pricing. `MSK_SIM_SELECTION_ASE`

The optimizer uses approximate steepest-edge pricing. `MSK_SIM_SELECTION_DEVEX`

The optimizer uses devex steepest-edge pricing.

If it is not available an approximate steep-edge selection is chosen.`MSK_SIM_SELECTION_SE`

The optimizer uses steepest-edge selection.

If it is not available an approximate steep-edge selection is chosen.`MSK_SIM_SELECTION_PARTIAL`

The optimizer uses a partial selection approach.

The approach is usually beneficial if the number of variables is much larger than the number of constraints.

**MSK_IPAR_SIM_REFORMULATION** *(string)*: Controls if the simplex optimizers are allowed to reformulate the problem. ↵

Default:

`MSK_SIM_REFORMULATION_OFF`

value meaning `MSK_SIM_REFORMULATION_ON`

Allow the simplex optimizer to reformulate the problem. `MSK_SIM_REFORMULATION_OFF`

Disallow the simplex optimizer to reformulate the problem. `MSK_SIM_REFORMULATION_FREE`

The simplex optimizer can choose freely. `MSK_SIM_REFORMULATION_AGGRESSIVE`

The simplex optimizer should use an aggressive reformulation strategy.

**MSK_IPAR_SIM_SAVE_LU** *(string)*: Controls if the LU factorization stored should be replaced with the LU factorization corresponding to the initial basis. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_SIM_SCALING** *(string)*: Controls how much effort is used in scaling the problem before a simplex optimizer is used. ↵

Default:

`MSK_SCALING_FREE`

value meaning `MSK_SCALING_FREE`

The optimizer chooses the scaling heuristic. `MSK_SCALING_NONE`

No scaling is performed. `MSK_SCALING_MODERATE`

A conservative scaling is performed. `MSK_SCALING_AGGRESSIVE`

A very aggressive scaling is performed.

**MSK_IPAR_SIM_SCALING_METHOD** *(string)*: Controls how the problem is scaled before a simplex optimizer is used. ↵

Default:

`MSK_SCALING_METHOD_POW2`

value meaning `MSK_SCALING_METHOD_POW2`

Scales only with power of 2 leaving the mantissa untouched. `MSK_SCALING_METHOD_FREE`

The optimizer chooses the scaling heuristic.

**MSK_IPAR_SIM_SOLVE_FORM** *(string)*: Controls whether the primal or the dual problem is solved by the primal-/dual-simplex optimizer. ↵

Default:

`MSK_SOLVE_FREE`

value meaning `MSK_SOLVE_FREE`

The optimizer is free to solve either the primal or the dual problem. `MSK_SOLVE_PRIMAL`

The optimizer should solve the primal problem. `MSK_SOLVE_DUAL`

The optimizer should solve the dual problem.

**MSK_IPAR_SIM_STABILITY_PRIORITY** *(integer)*: Controls how high priority the numerical stability should be given. ↵

Range: [

`0`

,`100`

]Default:

`50`

**MSK_IPAR_SIM_SWITCH_OPTIMIZER** *(string)*: Controls the simplex behavior. ↵

The simplex optimizer sometimes chooses to solve the dual problem instead of the primal problem. This implies that if you have chosen to use the dual simplex optimizer and the problem is dualized, then it actually makes sense to use the primal simplex optimizer instead. If this parameter is on and the problem is dualized and furthermore the simplex optimizer is chosen to be the primal (dual) one, then it is switched to the dual (primal).

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_TIMING_LEVEL** *(integer)*: Controls the amount of timing performed inside MOSEK. ↵

Default:

`1`

**MSK_IPAR_WRITE_DATA_FORMAT** *(string)*: Controls the file format when writing task data to a file. ↵

Default:

`MSK_DATA_FORMAT_EXTENSION`

value meaning `MSK_DATA_FORMAT_EXTENSION`

The file extension is used to determine the data file format. `MSK_DATA_FORMAT_MPS`

The data file is MPS formatted. `MSK_DATA_FORMAT_LP`

The data file is LP formatted. `MSK_DATA_FORMAT_OP`

The data file is an optimization problem formatted file. `MSK_DATA_FORMAT_XML`

The data file is an XML formatted file. `MSK_DATA_FORMAT_FREE_MPS`

The data a free MPS formatted file. `MSK_DATA_FORMAT_TASK`

Generic task dump file. `MSK_DATA_FORMAT_CB`

Conic benchmark format, `MSK_DATA_FORMAT_JSON_TASK`

JSON based task format.

**MSK_IPAR_WRITE_DATA_PARAM** *(string)*: If this option is turned on the parameter settings are written to the data file as parameters. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_GENERIC_NAMES** *(string)*: Controls whether the generic names or user-defined names are used in the data file. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_GENERIC_NAMES_IO** *(integer)*: Index origin used in generic names. ↵

Default:

`1`

**MSK_IPAR_WRITE_IGNORE_INCOMPATIBLE_ITEMS** *(string)*: Controls if the writer ignores incompatible problem items when writing files. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_LP_FULL_OBJ** *(string)*: Write all variables, including the ones with 0-coefficients, in the objective. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_LP_LINE_WIDTH** *(integer)*: Maximum width of line in an LP file written by MOSEK. ↵

Range: [

`40`

, ∞]Default:

`80`

**MSK_IPAR_WRITE_LP_QUOTED_NAMES** *(string)*: If this option is turned on, then MOSEK will quote invalid LP names when writing an LP file. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_LP_STRICT_FORMAT** *(string)*: Controls whether LP output files satisfy the LP format strictly. ↵

Default:

`MSK_OFF`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_LP_TERMS_PER_LINE** *(integer)*: Maximum number of terms on a single line in an LP file written by MOSEK. ↵

0 means unlimited.

Default:

`10`

**MSK_IPAR_WRITE_MPS_FORMAT** *(string)*: Controls in which format the MPS is written. ↵

Default:

`MSK_MPS_FORMAT_FREE`

value meaning `MSK_MPS_FORMAT_STRICT`

It is assumed that the input file satisfies the MPS format strictly. `MSK_MPS_FORMAT_RELAXED`

It is assumed that the input file satisfies a slightly relaxed version of the MPS format. `MSK_MPS_FORMAT_FREE`

It is assumed that the input file satisfies the free MPS format.

This implies that spaces are not allowed in names. Otherwise the format is free.`MSK_MPS_FORMAT_CPLEX`

The CPLEX compatible version of the MPS format is employed.

**MSK_IPAR_WRITE_MPS_INT** *(string)*: Controls if marker records are written to the MPS file to indicate whether variables are integer restricted. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_PRECISION** *(integer)*: Controls the precision with which `double`

numbers are printed in the MPS data file. ↵

In general it is not worthwhile to use a value higher than 15.

Default:

`15`

**MSK_IPAR_WRITE_TASK_INC_SOL** *(string)*: Controls whether the solutions are stored in the task file too. ↵

Default:

`MSK_ON`

value meaning `MSK_ON`

Switch the option on. `MSK_OFF`

Switch the option off.

**MSK_IPAR_WRITE_XML_MODE** *(string)*: Controls if linear coefficients should be written by row or column when writing in the XML file format. ↵

Default:

`MSK_WRITE_XML_MODE_ROW`

value meaning `MSK_WRITE_XML_MODE_ROW`

Write in row order. `MSK_WRITE_XML_MODE_COL`

Write in column order.

**MSK_SPAR_DATA_FILE_NAME** *(string)*: If set, problem data is written to this file. File extension determines format. ↵

Synonym: writeprob

**MSK_SPAR_PARAM_READ_FILE_NAME** *(string)*: Modifications to the parameter database is read from this file. ↵

**MSK_SPAR_PARAM_WRITE_FILE_NAME** *(string)*: The parameter database is written to this file. ↵

**MSK_SPAR_WRITE_LP_GEN_VAR_NAME** *(string)*: Sometimes when an LP file is written additional variables must be inserted. ↵

They will have the prefix denoted by this parameter.

Default:

`"xmskgen"`

**SDPCHECKVARS** *(boolean)*: Switch to disable checking that for every entry of a PSD matrix variable also a corresponding GAMS variable is present. ↵

Default:

`1`

**SDPSOLUFILE** *(string)*: Name of GDX file to write primal solution of all PSD matrix variables and dual solution for PSD constraints. ↵

**SOLVEFINAL** *(boolean)*: Switch to resolve the problem with fixed discrete variables after the MOSEK optimizer finished. ↵

Default:

`1`

value meaning `0`

Do not solve the fixed problem. `1`

Solve the fixed problem and return duals.