mosek_options
- mosek_options(overrides, mpopt)
mosek_options()
- Sets options for MOSEK.OPT = MOSEK_OPTIONS OPT = MOSEK_OPTIONS(OVERRIDES) OPT = MOSEK_OPTIONS(OVERRIDES, FNAME) OPT = MOSEK_OPTIONS(OVERRIDES, MPOPT) Sets the values for the param struct normally passed to MOSEKOPT. Inputs are all optional, second argument must be either a string (FNAME) or a struct (MPOPT): OVERRIDES - struct containing values to override the defaults FNAME - name of user-supplied function called after default options are set to modify them. Calling syntax is: MODIFIED_OPT = FNAME(DEFAULT_OPT); MPOPT - MATPOWER options struct, uses the following fields: opf.violation - used to set opt.MSK_DPAR_INTPNT_TOL_PFEAS verbose - not currently used here mosek.lp_alg - used to set opt.MSK_IPAR_OPTIMIZER mosek.max_it - used to set opt.MSK_IPAR_INTPNT_MAX_ITERATIONS mosek.gap_tol - used to set opt.MSK_DPAR_INTPNT_TOL_REL_GAP mosek.max_time - used to set opt.MSK_DPAR_OPTIMIZER_MAX_TIME mosek.num_threads - used to set opt.MSK_IPAR_INTPNT_NUM_THREADS mosek.opts - struct containing values to use as OVERRIDES mosek.opt_fname - name of user-supplied function used as FNAME, except with calling syntax: MODIFIED_OPT = FNAME(DEFAULT_OPT, MPOPT); mosek.opt - numbered user option function, if and only if mosek.opt_fname is empty and mosek.opt is non-zero, the value of mosek.opt_fname is generated by appending mosek.opt to 'mosek_user_options_' (for backward compatibility with old MATPOWER option MOSEK_OPT). Output is a param struct to pass to MOSEKOPT. There are multiple ways of providing values to override the default options. Their precedence and order of application are as follows: With inputs OVERRIDES and FNAME 1. FNAME is called 2. OVERRIDES are applied With inputs OVERRIDES and MPOPT 1. FNAME (from mosek.opt_fname or mosek.opt) is called 2. mosek.opts (if not empty) are applied 3. OVERRIDES are applied Example: If mosek.opt = 3, then after setting the default MOSEK options, MOSEK_OPTIONS will execute the following user-defined function to allow option overrides: opt = mosek_user_options_3(opt, mpopt); The contents of mosek_user_options_3.m, could be something like: function opt = mosek_user_options_3(opt, mpopt) opt.MSK_DPAR_INTPNT_TOL_DFEAS = 1e-9; opt.MSK_IPAR_SIM_MAX_ITERATIONS = 5000000; See the Parameters reference in "The MOSEK optimization toolbox for MATLAB manaul" for details on the available options. You may also want to use the symbolic constants defined by MOSEK_SYMBCON. https://docs.mosek.com/latest/toolbox/param-groups.html
See also
mosek_symbcon()
,mosekopt
,mpoption()
.