18 Interface changes

The section shows interface-specific changes to the MOSEK Optimizer API for Python in version 10.2 compared to version 9. See the release notes for general changes and new features of the MOSEK Optimization Suite.

18.1 Important changes compared to version 9

  • Parameters. Users who set parameters to tune the performance and numerical properties of the solver (termination criteria, tolerances, solving primal or dual, presolve etc.) are recommended to reevaluate such tuning. It may be that other, or default, parameter settings will be more beneficial in the current version. The hints in Sec. 8 (Debugging Tutorials) may be useful for some cases.

  • Multithreading. In the interior-point optimizer it is posible to set the number of threads with iparam.num_threads before each optimization, and not just once per process. The parameter MSK_IPAR_INTPNT_MULTI_THREAD and the function Env.setupthreads are no longer relevant and were removed.

  • Sparse Cholesky. In the function Env.computesparsecholesky the argument previously indicating whether to use multiple threads or not is now an integer denoting the number of threads to use, with 0 meaning that MOSEK makes the choice.

  • Solve with basis. The function Task.solvewithbasis changed interface: it separates the input and output number of nonzeros.

  • OptServer. The arguments used in remote calls from the MOSEK API change from (server, port) to (addr, accesstoken), where addr is the full URL such as http://server:port or https://server:port. See the documentation of the relevant functions.

  • MIO initial solution. In order for the mixed-integer solver to utilize a partial integer solution the parameter iparam.mio_construct_sol must be set. See Sec. 6.8.2 (Specifying an initial solution) for details. In version 9 this action happened by default.

  • Conic constraints. The interface introduces affine conic constraints (ACC) as a way of writing directly

    \[Fx+g\in\D\]

    where \(\D\) is a conic domain, without having to introduce a slack variable \(Fx+g-y=0,\ y\in\D\). See Sec. 6.2 (From Linear to Conic Optimization) for a tutorial. The current interface through variable cones is still supported but deprecated.

18.2 Changes compared to version 9

18.2.1 Functions compared to version 9

Added

Removed

  • Env.setupthreads

18.2.2 Parameters compared to version 9

Added

Removed

  • iparam.check_convexity

  • iparam.intpnt_multi_thread

  • iparam.log_check_convexity

  • iparam.read_lp_drop_new_vars_in_bou

  • iparam.read_lp_quoted_names

  • iparam.write_lp_quoted_names

  • iparam.write_lp_strict_format

  • iparam.write_lp_terms_per_line

  • iparam.write_precision

  • sparam.remote_access_token

  • sparam.stat_file_name

18.2.3 Constants compared to version 9

Added

Removed

  • constant.callbackcode.begin_full_convexity_check

  • constant.callbackcode.end_full_convexity_check

  • constant.callbackcode.im_full_convexity_check

  • constant.dinfitem.mio_implied_bound_time

  • constant.dinfitem.mio_root_cutgen_time

  • constant.dinfitem.rd_time

  • constant.iinfitem.mio_num_clique_cuts

  • constant.iinfitem.mio_num_cmir_cuts

  • constant.iinfitem.mio_num_gomory_cuts

  • constant.iinfitem.mio_num_implied_bound_cuts

  • constant.iinfitem.mio_num_knapsack_cover_cuts

  • constant.iinfitem.mio_total_num_cuts

  • constant.scalingtype.aggressive

  • constant.scalingtype.moderate

  • constant.startpointtype.satisfy_bounds

18.2.4 Response Codes compared to version 9

Added

Removed

  • rescode.err_lp_dup_slack_name

  • rescode.err_lp_format

  • rescode.err_lp_free_constraint

  • rescode.err_lp_incompatible

  • rescode.err_lp_invalid_con_name

  • rescode.err_lp_write_conic_problem

  • rescode.err_lp_write_geco_problem

  • rescode.err_mps_inv_bound_key

  • rescode.err_mps_inv_con_key

  • rescode.err_mps_inv_sec_name

  • rescode.err_opf_format

  • rescode.err_opf_new_variable

  • rescode.err_read_lp_nonexisting_name

  • rescode.err_write_lp_format

  • rescode.err_write_lp_non_unique_name

  • rescode.wrn_exp_cones_with_variables_fixed_at_zero

  • rescode.wrn_pow_cones_with_root_fixed_at_zero

  • rescode.wrn_quad_cones_with_root_fixed_at_zero

  • rescode.wrn_rquad_cones_with_root_fixed_at_zero