mpoption_old

mpoption_old(varargin)

mpoption_old() - Used to set and retrieve old-style MATPOWER options vector.

OPT = MPOPTION_OLD
    returns the default options vector

OPT = MPOPTION_OLD(NAME1, VALUE1, NAME2, VALUE2, ...)
    returns the default options vector with new values for up to 7
    options, NAME# is the name of an option, and VALUE# is the new
    value.

OPT = MPOPTION_OLD(OPT, NAME1, VALUE1, NAME2, VALUE2, ...)
    same as above except it uses the options vector OPT as a base
    instead of the default options vector.

Examples:
    opt = mpoption_old('PF_ALG', 2, 'PF_TOL', 1e-4);
    opt = mpoption_old(opt, 'OPF_ALG', 565, 'VERBOSE', 2);

The currently defined options are as follows:

   idx - NAME, default          description [options]
   ---   -------------          -----------------------------------------
power flow options
    1  - PF_ALG, 1              AC power flow algorithm
        [   1 - Newton's method                                         ]
        [   2 - Fast-Decoupled (XB version)                             ]
        [   3 - Fast-Decoupled (BX version)                             ]
        [   4 - Gauss-Seidel                                            ]
    2  - PF_TOL, 1e-8           termination tolerance on per unit
                                P & Q mismatch
    3  - PF_MAX_IT, 10          maximum number of iterations for
                                Newton's method
    4  - PF_MAX_IT_FD, 30       maximum number of iterations for
                                fast decoupled method
    5  - PF_MAX_IT_GS, 1000     maximum number of iterations for
                                Gauss-Seidel method
    6  - ENFORCE_Q_LIMS, 0      enforce gen reactive power limits
                                at expense of |V|
        [    0 - do NOT enforce limits                                  ]
        [    1 - enforce limits, simultaneous bus type conversion       ]
        [    2 - enforce limits, one-at-a-time bus type conversion      ]
    10 - PF_DC, 0               DC modeling for power flow & OPF
        [    0 - use AC formulation & corresponding algorithm options   ]
        [    1 - use DC formulation, ignore AC algorithm options        ]
OPF options
    11 - OPF_ALG, 0             solver to use for AC OPF
        [    0 - choose default solver based on availability in the     ]
        [        following order, 540, 560                              ]
        [  500 - MINOPF, MINOS-based solver, requires optional          ]
        [        MEX-based MINOPF package, available from:              ]
        [        http://www.pserc.cornell.edu/minopf/                   ]
        [  520 - fmincon, MATLAB Optimization Toolbox >= 2.x            ]
        [  540 - PDIPM, primal/dual interior point method, requires     ]
        [        optional MEX-based TSPOPF package, available from:     ]
        [        http://www.pserc.cornell.edu/tspopf/                   ]
        [  545 - SC-PDIPM, step-controlled variant of PDIPM, requires   ]
        [        TSPOPF (see 540)                                       ]
        [  550 - TRALM, trust region based augmented Langrangian        ]
        [        method, requires TSPOPF (see 540)                      ]
        [  560 - MIPS, MATPOWER Interior Point Solver                   ]
        [        primal/dual interior point method (pure MATLAB)        ]
        [  565 - MIPS-sc, step-controlled variant of MIPS               ]
        [        primal/dual interior point method (pure MATLAB)        ]
        [  580 - IPOPT, requires MEX interface to IPOPT solver          ]
        [        available from: https://projects.coin-or.org/Ipopt/    ]
        [  600 - Artelys Knitro, requires Knitro solver, available from:]
        [        https://www.artelys.com/solvers/knitro/                ]
    16 - OPF_VIOLATION, 5e-6    constraint violation tolerance
    17 - CONSTR_TOL_X, 1e-4     termination tol on x for fmincon/Knitro
    18 - CONSTR_TOL_F, 1e-4     termination tol on f for fmincon/Knitro
    19 - CONSTR_MAX_IT, 0       max number of iterations for fmincon
                                [       0 => default                    ]
    24 - OPF_FLOW_LIM, 0        qty to limit for branch flow constraints
        [   0 - apparent power flow (limit in MVA)                      ]
        [   1 - active power flow (limit in MW)                         ]
        [   2 - current magnitude (limit in MVA at 1 p.u. voltage)      ]
    25 - OPF_IGNORE_ANG_LIM, 0  ignore angle difference limits for branches
                                even if specified           [   0 or 1  ]
    26 - OPF_ALG_DC, 0          solver to use for DC OPF
        [    0 - choose default solver based on availability in the     ]
        [        following order: 500, 600, 700, 100, 300, 200          ]
        [  100 - BPMPD, requires optional MEX-based BPMPD_MEX package   ]
        [        available from: http://www.pserc.cornell.edu/bpmpd/    ]
        [  200 - MIPS, MATLAB Interior Point Solver                     ]
        [        primal/dual interior point method (pure MATLAB)        ]
        [  250 - MIPS-sc, step-controlled variant of MIPS               ]
        [  300 - MATLAB Optimization Toolbox, QUADPROG, LINPROG         ]
        [  400 - IPOPT, requires MEX interface to IPOPT solver          ]
        [        available from: https://projects.coin-or.org/Ipopt/    ]
        [  500 - CPLEX, requires MATLAB interface to CPLEX solver       ]
        [  600 - MOSEK, requires MATLAB interface to MOSEK solver       ]
        [        available from: https://www.mosek.com/                  ]
        [  700 - GUROBI, requires Gurobi optimizer (v. 5+)              ]
        [        available from: https://www.gurobi.com                 ]
output options
    31 - VERBOSE, 1             amount of progress info printed
        [   0 - print no progress info                                  ]
        [   1 - print a little progress info                            ]
        [   2 - print a lot of progress info                            ]
        [   3 - print all progress info                                 ]
    32 - OUT_ALL, -1            controls pretty-printing of results
        [  -1 - individual flags control what prints                    ]
        [   0 - do not print anything                                   ]
        [       (overrides individual flags)                            ]
        [   1 - print everything                                        ]
        [       (overrides individual flags)                            ]
    33 - OUT_SYS_SUM, 1         print system summary        [   0 or 1  ]
    34 - OUT_AREA_SUM, 0        print area summaries        [   0 or 1  ]
    35 - OUT_BUS, 1             print bus detail            [   0 or 1  ]
    36 - OUT_BRANCH, 1          print branch detail         [   0 or 1  ]
    37 - OUT_GEN, 0             print generator detail      [   0 or 1  ]
                                (OUT_BUS also includes gen info)
    38 - OUT_ALL_LIM, -1        controls what constraint info is printed
        [  -1 - individual flags control what constraint info prints    ]
        [   0 - no constraint info (overrides individual flags)         ]
        [   1 - binding constraint info (overrides individual flags)    ]
        [   2 - all constraint info (overrides individual flags)        ]
    39 - OUT_V_LIM, 1           control output of voltage limit info
        [   0 - do not print                                            ]
        [   1 - print binding constraints only                          ]
        [   2 - print all constraints                                   ]
        [   (same options for OUT_LINE_LIM, OUT_PG_LIM, OUT_QG_LIM)     ]
    40 - OUT_LINE_LIM, 1        control output of line flow limit info
    41 - OUT_PG_LIM, 1          control output of gen P limit info
    42 - OUT_QG_LIM, 1          control output of gen Q limit info
    44 - OUT_FORCE, 0           print results even if success = 0
                                                            [   0 or 1  ]
    52 - RETURN_RAW_DER, 0      return constraint and derivative info
                                in results.raw (in fields g, dg, df, d2f)
FMINCON options
    55 - FMC_ALG, 4             algorithm used by fmincon for OPF
                                for Optimization Toolbox 4 and later
         [  1 - active-set                                              ]
         [  2 - interior-point, w/default 'bfgs' Hessian approx         ]
         [  3 - interior-point, w/ 'lbfgs' Hessian approx               ]
         [  4 - interior-point, w/exact user-supplied Hessian           ]
         [  5 - interior-point, w/Hessian via finite differences        ]

Artelys Knitro options
    58 - KNITRO_OPT, 0          a non-zero integer N indicates that all
                                Knitro options should be handled by a
                                Knitro options file named
                                'knitro_user_options_N.txt'

IPOPT options
    60 - IPOPT_OPT, 0           See IPOPT_OPTIONS for details.

MINOPF options
    61 - MNS_FEASTOL, 0 (1e-3)  primal feasibility tolerance,
                                set to value of OPF_VIOLATION by default
    62 - MNS_ROWTOL, 0  (1e-3)  row tolerance
                                set to value of OPF_VIOLATION by default
    63 - MNS_XTOL, 0    (1e-3)  x tolerance
                                set to value of CONSTR_TOL_X by default
    64 - MNS_MAJDAMP, 0 (0.5)   major damping parameter
    65 - MNS_MINDAMP, 0 (2.0)   minor damping parameter
    66 - MNS_PENALTY_PARM, 0 (1.0)  penalty parameter
    67 - MNS_MAJOR_IT, 0 (200)  major iterations
    68 - MNS_MINOR_IT, 0 (2500) minor iterations
    69 - MNS_MAX_IT, 0 (2500)   iterations limit
    70 - MNS_VERBOSITY, -1
        [  -1 - controlled by VERBOSE option                            ]
        [   0 - print nothing                                           ]
        [   1 - print only termination status message                   ]
        [   2 - print termination status and screen progress            ]
        [   3 - print screen progress, report file (usually fort.9)     ]
    71 - MNS_CORE, 0 (1200 * nb + 2 * (nb + ng)^2) memory allocation
    72 - MNS_SUPBASIC_LIM, 0 (2*nb + 2*ng) superbasics limit
    73 - MNS_MULT_PRICE, 0 (30) multiple price

MIPS (including MIPS-sc), PDIPM, SC-PDIPM, and TRALM options
    81 - PDIPM_FEASTOL, 0       feasibility (equality) tolerance
                                for MIPS, PDIPM and SC-PDIPM, set
                                to value of OPF_VIOLATION by default
    82 - PDIPM_GRADTOL, 1e-6    gradient tolerance for MIPS, PDIPM
                                and SC-PDIPM
    83 - PDIPM_COMPTOL, 1e-6    complementary condition (inequality)
                                tolerance for MIPS, PDIPM and SC-PDIPM
    84 - PDIPM_COSTTOL, 1e-6    optimality tolerance for MIPS, PDIPM
                                and SC-PDIPM
    85 - PDIPM_MAX_IT,  150     maximum number of iterations for MIPS,
                                PDIPM and SC-PDIPM
    86 - SCPDIPM_RED_IT, 20     maximum number of MIPS-sc or SC-PDIPM
                                reductions per iteration
    87 - TRALM_FEASTOL, 0       feasibility tolerance for TRALM
                                set to value of OPF_VIOLATION by default
    88 - TRALM_PRIMETOL, 5e-4   primal variable tolerance for TRALM
    89 - TRALM_DUALTOL, 5e-4    dual variable tolerance for TRALM
    90 - TRALM_COSTTOL, 1e-5    optimality tolerance for TRALM
    91 - TRALM_MAJOR_IT, 40     maximum number of major iterations
    92 - TRALM_MINOR_IT, 100    maximum number of minor iterations
    93 - SMOOTHING_RATIO, 0.04  piecewise linear curve smoothing ratio
                                used in SC-PDIPM and TRALM

CPLEX options
    95 - CPLEX_LPMETHOD, 0      solution algorithm for continuous LPs
        [   0 - automatic: let CPLEX choose                             ]
        [   1 - primal simplex                                          ]
        [   2 - dual simplex                                            ]
        [   3 - network simplex                                         ]
        [   4 - barrier                                                 ]
        [   5 - sifting                                                 ]
        [   6 - concurrent (dual, barrier, and primal)                  ]
    96 - CPLEX_QPMETHOD, 0      solution algorithm for continuous QPs
        [   0 - automatic: let CPLEX choose                             ]
        [   1 - primal simplex optimizer                                ]
        [   2 - dual simplex optimizer                                  ]
        [   3 - network optimizer                                       ]
        [   4 - barrier optimizer                                       ]
    97 - CPLEX_OPT, 0           See CPLEX_OPTIONS for details

MOSEK options
    111 - MOSEK_LP_ALG, 0       solution algorithm for continuous LPs
                                    (MSK_IPAR_OPTIMIZER)
        [   0 - automatic: let MOSEK choose                             ]
        [   1 - interior point                                          ]
        [   4 - primal simplex                                          ]
        [   5 - dual simplex                                            ]
        [   6 - primal dual simplex                                     ]
        [   7 - automatic simplex (MOSEK chooses which simplex method)  ]
        [   10 - concurrent                                             ]
    112 - MOSEK_MAX_IT, 0 (400)     interior point max iterations
                                        (MSK_IPAR_INTPNT_MAX_ITERATIONS)
    113 - MOSEK_GAP_TOL, 0 (1e-8)   interior point relative gap tolerance
                                        (MSK_DPAR_INTPNT_TOL_REL_GAP)
    114 - MOSEK_MAX_TIME, 0 (-1)    maximum time allowed for solver
                                        (MSK_DPAR_OPTIMIZER_MAX_TIME)
    115 - MOSEK_NUM_THREADS, 0 (1)  maximum number of threads to use
                                        (MSK_IPAR_INTPNT_NUM_THREADS)
    116 - MOSEK_OPT, 0              See MOSEK_OPTIONS for details

Gurobi options
    121 - GRB_METHOD, -1         solution algorithm (Method)
        [  -1 - automatic, let Gurobi decide                            ]
        [   0 - primal simplex                                          ]
        [   1 - dual simplex                                            ]
        [   2 - barrier                                                 ]
        [   3 - concurrent (LP only)                                    ]
        [   4 - deterministic concurrent (LP only)                      ]
    122 - GRB_TIMELIMIT, Inf    maximum time allowed for solver (TimeLimit)
    123 - GRB_THREADS, 0 (auto) maximum number of threads to use (Threads)
    124 - GRB_OPT, 0            See GUROBI_OPTIONS for details