Home > matpower5.1 > mpoption_old.m

mpoption_old

PURPOSE ^

MPOPTION_OLD Used to set and retrieve old-style MATPOWER options vector.

SYNOPSIS ^

function [options, names] = mpoption_old(varargin)

DESCRIPTION ^

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, MATLAB 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 - KNITRO, requires MATLAB Optimization Toolbox and       ]
           [        KNITRO libraries available from: http://www.ziena.com/ ]
       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: http://www.mosek.com/                  ]
           [  700 - GUROBI, requires Gurobi optimizer (v. 5+)              ]
           [        available from: http://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        ]

   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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [options, names] = mpoption_old(varargin)
0002 %MPOPTION_OLD  Used to set and retrieve old-style MATPOWER options vector.
0003 %
0004 %   OPT = MPOPTION_OLD
0005 %       returns the default options vector
0006 %
0007 %   OPT = MPOPTION_OLD(NAME1, VALUE1, NAME2, VALUE2, ...)
0008 %       returns the default options vector with new values for up to 7
0009 %       options, NAME# is the name of an option, and VALUE# is the new
0010 %       value.
0011 %
0012 %   OPT = MPOPTION_OLD(OPT, NAME1, VALUE1, NAME2, VALUE2, ...)
0013 %       same as above except it uses the options vector OPT as a base
0014 %       instead of the default options vector.
0015 %
0016 %   Examples:
0017 %       opt = mpoption_old('PF_ALG', 2, 'PF_TOL', 1e-4);
0018 %       opt = mpoption_old(opt, 'OPF_ALG', 565, 'VERBOSE', 2);
0019 %
0020 %   The currently defined options are as follows:
0021 %
0022 %      idx - NAME, default          description [options]
0023 %      ---   -------------          -----------------------------------------
0024 %   power flow options
0025 %       1  - PF_ALG, 1              AC power flow algorithm
0026 %           [   1 - Newton's method                                         ]
0027 %           [   2 - Fast-Decoupled (XB version)                             ]
0028 %           [   3 - Fast-Decoupled (BX version)                             ]
0029 %           [   4 - Gauss-Seidel                                            ]
0030 %       2  - PF_TOL, 1e-8           termination tolerance on per unit
0031 %                                   P & Q mismatch
0032 %       3  - PF_MAX_IT, 10          maximum number of iterations for
0033 %                                   Newton's method
0034 %       4  - PF_MAX_IT_FD, 30       maximum number of iterations for
0035 %                                   fast decoupled method
0036 %       5  - PF_MAX_IT_GS, 1000     maximum number of iterations for
0037 %                                   Gauss-Seidel method
0038 %       6  - ENFORCE_Q_LIMS, 0      enforce gen reactive power limits
0039 %                                   at expense of |V|
0040 %           [    0 - do NOT enforce limits                                  ]
0041 %           [    1 - enforce limits, simultaneous bus type conversion       ]
0042 %           [    2 - enforce limits, one-at-a-time bus type conversion      ]
0043 %       10 - PF_DC, 0               DC modeling for power flow & OPF
0044 %           [    0 - use AC formulation & corresponding algorithm options   ]
0045 %           [    1 - use DC formulation, ignore AC algorithm options        ]
0046 %   OPF options
0047 %       11 - OPF_ALG, 0             solver to use for AC OPF
0048 %           [    0 - choose default solver based on availability in the     ]
0049 %           [        following order, 540, 560                              ]
0050 %           [  500 - MINOPF, MINOS-based solver, requires optional          ]
0051 %           [        MEX-based MINOPF package, available from:              ]
0052 %           [        http://www.pserc.cornell.edu/minopf/                   ]
0053 %           [  520 - fmincon, MATLAB Optimization Toolbox >= 2.x            ]
0054 %           [  540 - PDIPM, primal/dual interior point method, requires     ]
0055 %           [        optional MEX-based TSPOPF package, available from:     ]
0056 %           [        http://www.pserc.cornell.edu/tspopf/                   ]
0057 %           [  545 - SC-PDIPM, step-controlled variant of PDIPM, requires   ]
0058 %           [        TSPOPF (see 540)                                       ]
0059 %           [  550 - TRALM, trust region based augmented Langrangian        ]
0060 %           [        method, requires TSPOPF (see 540)                      ]
0061 %           [  560 - MIPS, MATLAB Interior Point Solver                     ]
0062 %           [        primal/dual interior point method (pure MATLAB)        ]
0063 %           [  565 - MIPS-sc, step-controlled variant of MIPS               ]
0064 %           [        primal/dual interior point method (pure MATLAB)        ]
0065 %           [  580 - IPOPT, requires MEX interface to IPOPT solver          ]
0066 %           [        available from: https://projects.coin-or.org/Ipopt/    ]
0067 %           [  600 - KNITRO, requires MATLAB Optimization Toolbox and       ]
0068 %           [        KNITRO libraries available from: http://www.ziena.com/ ]
0069 %       16 - OPF_VIOLATION, 5e-6    constraint violation tolerance
0070 %       17 - CONSTR_TOL_X, 1e-4     termination tol on x for fmincon/Knitro
0071 %       18 - CONSTR_TOL_F, 1e-4     termination tol on f for fmincon/Knitro
0072 %       19 - CONSTR_MAX_IT, 0       max number of iterations for fmincon
0073 %                                   [       0 => default                    ]
0074 %       24 - OPF_FLOW_LIM, 0        qty to limit for branch flow constraints
0075 %           [   0 - apparent power flow (limit in MVA)                      ]
0076 %           [   1 - active power flow (limit in MW)                         ]
0077 %           [   2 - current magnitude (limit in MVA at 1 p.u. voltage)      ]
0078 %       25 - OPF_IGNORE_ANG_LIM, 0  ignore angle difference limits for branches
0079 %                                   even if specified           [   0 or 1  ]
0080 %       26 - OPF_ALG_DC, 0          solver to use for DC OPF
0081 %           [    0 - choose default solver based on availability in the     ]
0082 %           [        following order: 500, 600, 700, 100, 300, 200          ]
0083 %           [  100 - BPMPD, requires optional MEX-based BPMPD_MEX package   ]
0084 %           [        available from: http://www.pserc.cornell.edu/bpmpd/    ]
0085 %           [  200 - MIPS, MATLAB Interior Point Solver                     ]
0086 %           [        primal/dual interior point method (pure MATLAB)        ]
0087 %           [  250 - MIPS-sc, step-controlled variant of MIPS               ]
0088 %           [  300 - MATLAB Optimization Toolbox, QUADPROG, LINPROG         ]
0089 %           [  400 - IPOPT, requires MEX interface to IPOPT solver          ]
0090 %           [        available from: https://projects.coin-or.org/Ipopt/    ]
0091 %           [  500 - CPLEX, requires Matlab interface to CPLEX solver       ]
0092 %           [  600 - MOSEK, requires Matlab interface to MOSEK solver       ]
0093 %           [        available from: http://www.mosek.com/                  ]
0094 %           [  700 - GUROBI, requires Gurobi optimizer (v. 5+)              ]
0095 %           [        available from: http://www.gurobi.com/                 ]
0096 %   output options
0097 %       31 - VERBOSE, 1             amount of progress info printed
0098 %           [   0 - print no progress info                                  ]
0099 %           [   1 - print a little progress info                            ]
0100 %           [   2 - print a lot of progress info                            ]
0101 %           [   3 - print all progress info                                 ]
0102 %       32 - OUT_ALL, -1            controls pretty-printing of results
0103 %           [  -1 - individual flags control what prints                    ]
0104 %           [   0 - do not print anything                                   ]
0105 %           [       (overrides individual flags)                            ]
0106 %           [   1 - print everything                                        ]
0107 %           [       (overrides individual flags)                            ]
0108 %       33 - OUT_SYS_SUM, 1         print system summary        [   0 or 1  ]
0109 %       34 - OUT_AREA_SUM, 0        print area summaries        [   0 or 1  ]
0110 %       35 - OUT_BUS, 1             print bus detail            [   0 or 1  ]
0111 %       36 - OUT_BRANCH, 1          print branch detail         [   0 or 1  ]
0112 %       37 - OUT_GEN, 0             print generator detail      [   0 or 1  ]
0113 %                                   (OUT_BUS also includes gen info)
0114 %       38 - OUT_ALL_LIM, -1        controls what constraint info is printed
0115 %           [  -1 - individual flags control what constraint info prints    ]
0116 %           [   0 - no constraint info (overrides individual flags)         ]
0117 %           [   1 - binding constraint info (overrides individual flags)    ]
0118 %           [   2 - all constraint info (overrides individual flags)        ]
0119 %       39 - OUT_V_LIM, 1           control output of voltage limit info
0120 %           [   0 - do not print                                            ]
0121 %           [   1 - print binding constraints only                          ]
0122 %           [   2 - print all constraints                                   ]
0123 %           [   (same options for OUT_LINE_LIM, OUT_PG_LIM, OUT_QG_LIM)     ]
0124 %       40 - OUT_LINE_LIM, 1        control output of line flow limit info
0125 %       41 - OUT_PG_LIM, 1          control output of gen P limit info
0126 %       42 - OUT_QG_LIM, 1          control output of gen Q limit info
0127 %       44 - OUT_FORCE, 0           print results even if success = 0
0128 %                                                               [   0 or 1  ]
0129 %       52 - RETURN_RAW_DER, 0      return constraint and derivative info
0130 %                                   in results.raw (in fields g, dg, df, d2f)
0131 %   FMINCON options
0132 %       55 - FMC_ALG, 4             algorithm used by fmincon for OPF
0133 %                                   for Optimization Toolbox 4 and later
0134 %            [  1 - active-set                                              ]
0135 %            [  2 - interior-point, w/default 'bfgs' Hessian approx         ]
0136 %            [  3 - interior-point, w/ 'lbfgs' Hessian approx               ]
0137 %            [  4 - interior-point, w/exact user-supplied Hessian           ]
0138 %            [  5 - interior-point, w/Hessian via finite differences        ]
0139 %
0140 %   KNITRO options
0141 %       58 - KNITRO_OPT, 0          a non-zero integer N indicates that all
0142 %                                   KNITRO options should be handled by a
0143 %                                   KNITRO options file named
0144 %                                   'knitro_user_options_N.txt'
0145 %
0146 %   IPOPT options
0147 %       60 - IPOPT_OPT, 0           See IPOPT_OPTIONS for details.
0148 %
0149 %   MINOPF options
0150 %       61 - MNS_FEASTOL, 0 (1e-3)  primal feasibility tolerance,
0151 %                                   set to value of OPF_VIOLATION by default
0152 %       62 - MNS_ROWTOL, 0  (1e-3)  row tolerance
0153 %                                   set to value of OPF_VIOLATION by default
0154 %       63 - MNS_XTOL, 0    (1e-3)  x tolerance
0155 %                                   set to value of CONSTR_TOL_X by default
0156 %       64 - MNS_MAJDAMP, 0 (0.5)   major damping parameter
0157 %       65 - MNS_MINDAMP, 0 (2.0)   minor damping parameter
0158 %       66 - MNS_PENALTY_PARM, 0 (1.0)  penalty parameter
0159 %       67 - MNS_MAJOR_IT, 0 (200)  major iterations
0160 %       68 - MNS_MINOR_IT, 0 (2500) minor iterations
0161 %       69 - MNS_MAX_IT, 0 (2500)   iterations limit
0162 %       70 - MNS_VERBOSITY, -1
0163 %           [  -1 - controlled by VERBOSE option                            ]
0164 %           [   0 - print nothing                                           ]
0165 %           [   1 - print only termination status message                   ]
0166 %           [   2 - print termination status and screen progress            ]
0167 %           [   3 - print screen progress, report file (usually fort.9)     ]
0168 %       71 - MNS_CORE, 0 (1200 * nb + 2 * (nb + ng)^2) memory allocation
0169 %       72 - MNS_SUPBASIC_LIM, 0 (2*nb + 2*ng) superbasics limit
0170 %       73 - MNS_MULT_PRICE, 0 (30) multiple price
0171 %
0172 %   MIPS (including MIPS-sc), PDIPM, SC-PDIPM, and TRALM options
0173 %       81 - PDIPM_FEASTOL, 0       feasibility (equality) tolerance
0174 %                                   for MIPS, PDIPM and SC-PDIPM, set
0175 %                                   to value of OPF_VIOLATION by default
0176 %       82 - PDIPM_GRADTOL, 1e-6    gradient tolerance for MIPS, PDIPM
0177 %                                   and SC-PDIPM
0178 %       83 - PDIPM_COMPTOL, 1e-6    complementary condition (inequality)
0179 %                                   tolerance for MIPS, PDIPM and SC-PDIPM
0180 %       84 - PDIPM_COSTTOL, 1e-6    optimality tolerance for MIPS, PDIPM
0181 %                                   and SC-PDIPM
0182 %       85 - PDIPM_MAX_IT,  150     maximum number of iterations for MIPS,
0183 %                                   PDIPM and SC-PDIPM
0184 %       86 - SCPDIPM_RED_IT, 20     maximum number of MIPS-sc or SC-PDIPM
0185 %                                   reductions per iteration
0186 %       87 - TRALM_FEASTOL, 0       feasibility tolerance for TRALM
0187 %                                   set to value of OPF_VIOLATION by default
0188 %       88 - TRALM_PRIMETOL, 5e-4   primal variable tolerance for TRALM
0189 %       89 - TRALM_DUALTOL, 5e-4    dual variable tolerance for TRALM
0190 %       90 - TRALM_COSTTOL, 1e-5    optimality tolerance for TRALM
0191 %       91 - TRALM_MAJOR_IT, 40     maximum number of major iterations
0192 %       92 - TRALM_MINOR_IT, 100    maximum number of minor iterations
0193 %       93 - SMOOTHING_RATIO, 0.04  piecewise linear curve smoothing ratio
0194 %                                   used in SC-PDIPM and TRALM
0195 %
0196 %   CPLEX options
0197 %       95 - CPLEX_LPMETHOD, 0      solution algorithm for continuous LPs
0198 %           [   0 - automatic: let CPLEX choose                             ]
0199 %           [   1 - primal simplex                                          ]
0200 %           [   2 - dual simplex                                            ]
0201 %           [   3 - network simplex                                         ]
0202 %           [   4 - barrier                                                 ]
0203 %           [   5 - sifting                                                 ]
0204 %           [   6 - concurrent (dual, barrier, and primal)                  ]
0205 %       96 - CPLEX_QPMETHOD, 0      solution algorithm for continuous QPs
0206 %           [   0 - automatic: let CPLEX choose                             ]
0207 %           [   1 - primal simplex optimizer                                ]
0208 %           [   2 - dual simplex optimizer                                  ]
0209 %           [   3 - network optimizer                                       ]
0210 %           [   4 - barrier optimizer                                       ]
0211 %       97 - CPLEX_OPT, 0           See CPLEX_OPTIONS for details
0212 %
0213 %   MOSEK options
0214 %       111 - MOSEK_LP_ALG, 0       solution algorithm for continuous LPs
0215 %                                       (MSK_IPAR_OPTIMIZER)
0216 %           [   0 - automatic: let MOSEK choose                             ]
0217 %           [   1 - interior point                                          ]
0218 %           [   4 - primal simplex                                          ]
0219 %           [   5 - dual simplex                                            ]
0220 %           [   6 - primal dual simplex                                     ]
0221 %           [   7 - automatic simplex (MOSEK chooses which simplex method)  ]
0222 %           [   10 - concurrent                                             ]
0223 %       112 - MOSEK_MAX_IT, 0 (400)     interior point max iterations
0224 %                                           (MSK_IPAR_INTPNT_MAX_ITERATIONS)
0225 %       113 - MOSEK_GAP_TOL, 0 (1e-8)   interior point relative gap tolerance
0226 %                                           (MSK_DPAR_INTPNT_TOL_REL_GAP)
0227 %       114 - MOSEK_MAX_TIME, 0 (-1)    maximum time allowed for solver
0228 %                                           (MSK_DPAR_OPTIMIZER_MAX_TIME)
0229 %       115 - MOSEK_NUM_THREADS, 0 (1)  maximum number of threads to use
0230 %                                           (MSK_IPAR_INTPNT_NUM_THREADS)
0231 %       116 - MOSEK_OPT, 0              See MOSEK_OPTIONS for details
0232 %
0233 %   Gurobi options
0234 %       121 - GRB_METHOD, -1         solution algorithm (Method)
0235 %           [  -1 - automatic, let Gurobi decide                            ]
0236 %           [   0 - primal simplex                                          ]
0237 %           [   1 - dual simplex                                            ]
0238 %           [   2 - barrier                                                 ]
0239 %           [   3 - concurrent (LP only)                                    ]
0240 %           [   4 - deterministic concurrent (LP only)                      ]
0241 %       122 - GRB_TIMELIMIT, Inf    maximum time allowed for solver (TimeLimit)
0242 %       123 - GRB_THREADS, 0 (auto) maximum number of threads to use (Threads)
0243 %       124 - GRB_OPT, 0            See GUROBI_OPTIONS for details
0244 
0245 %   MATPOWER
0246 %   Copyright (c) 1996-2015 by Power System Engineering Research Center (PSERC)
0247 %   by Ray Zimmerman, PSERC Cornell
0248 %
0249 %   $Id: mpoption_old.m 2644 2015-03-11 19:34:22Z ray $
0250 %
0251 %   This file is part of MATPOWER.
0252 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0253 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0254 
0255 %%-----  set up default option values  -----
0256 i = 1;
0257 if rem(nargin, 2)       %% odd number of arguments
0258     options = varargin{1};  %% base options vector passed in
0259     i = 2;                  %% start processing parameters with 2nd one
0260 else                    %% even number of parameters
0261     options = [             %% use defaults for base options vector
0262     
0263         %% power flow options
0264         1;      %% 1  - PF_ALG
0265         1e-8;   %% 2  - PF_TOL
0266         10;     %% 3  - PF_MAX_IT
0267         30;     %% 4  - PF_MAX_IT_FD
0268         1000;   %% 5  - PF_MAX_IT_GS
0269         0;      %% 6  - ENFORCE_Q_LIMS
0270         0;      %% 7  - RESERVED7
0271         0;      %% 8  - RESERVED8
0272         0;      %% 9  - RESERVED9
0273         0;      %% 10 - PF_DC
0274         
0275         %% OPF options
0276         0;      %% 11 - OPF_ALG
0277         0;      %% 12 - RESERVED12 (was OPF_ALG_POLY = 100)
0278         0;      %% 13 - RESERVED13 (was OPF_ALG_PWL = 200)
0279         0;      %% 14 - RESERVED14 (was OPF_POLY2PWL_PTS = 10)
0280         0;      %% 15 - OPF_NEQ (removed)
0281         5e-6;   %% 16 - OPF_VIOLATION
0282         1e-4;   %% 17 - CONSTR_TOL_X
0283         1e-4;   %% 18 - CONSTR_TOL_F
0284         0;      %% 19 - CONSTR_MAX_IT
0285         3e-3;   %% 20 - LPC_TOL_GRAD (removed)
0286         1e-4;   %% 21 - LPC_TOL_X (removed)
0287         400;    %% 22 - LPC_MAX_IT (removed)
0288         5;      %% 23 - LPC_MAX_RESTART (removed)
0289         0;      %% 24 - OPF_FLOW_LIM
0290         0;      %% 25 - OPF_IGNORE_ANG_LIM
0291         0;      %% 26 - OPF_ALG_DC
0292         0;      %% 27 - RESERVED27
0293         0;      %% 28 - RESERVED28
0294         0;      %% 29 - RESERVED29
0295         0;      %% 30 - RESERVED30
0296         
0297         %% output options
0298         1;      %% 31 - VERBOSE
0299         -1;     %% 32 - OUT_ALL
0300         1;      %% 33 - OUT_SYS_SUM
0301         0;      %% 34 - OUT_AREA_SUM
0302         1;      %% 35 - OUT_BUS
0303         1;      %% 36 - OUT_BRANCH
0304         0;      %% 37 - OUT_GEN
0305         -1;     %% 38 - OUT_ALL_LIM
0306         1;      %% 39 - OUT_V_LIM
0307         1;      %% 40 - OUT_LINE_LIM
0308         1;      %% 41 - OUT_PG_LIM
0309         1;      %% 42 - OUT_QG_LIM
0310         0;      %% 43 - RESERVED43 (was OUT_RAW)
0311         0;      %% 44 - OUT_FORCE
0312         0;      %% 45 - RESERVED45
0313         0;      %% 46 - RESERVED46
0314         0;      %% 47 - RESERVED47
0315         0;      %% 48 - RESERVED48
0316         0;      %% 49 - RESERVED49
0317         0;      %% 50 - RESERVED50
0318         
0319         %% other options
0320         1;      %% 51 - SPARSE_QP (removed)
0321         0;      %% 52 - RETURN_RAW_DER
0322         0;      %% 53 - RESERVED53
0323         0;      %% 54 - RESERVED54
0324         4;      %% 55 - FMC_ALG
0325         0;      %% 56 - RESERVED56
0326         0;      %% 57 - RESERVED57
0327         0;      %% 58 - KNITRO_OPT
0328         0;      %% 59 - RESERVED59
0329         0;      %% 60 - IPOPT_OPT
0330         
0331         %% MINOPF options
0332         0;      %% 61 - MNS_FEASTOL
0333         0;      %% 62 - MNS_ROWTOL
0334         0;      %% 63 - MNS_XTOL
0335         0;      %% 64 - MNS_MAJDAMP
0336         0;      %% 65 - MNS_MINDAMP
0337         0;      %% 66 - MNS_PENALTY_PARM
0338         0;      %% 67 - MNS_MAJOR_IT
0339         0;      %% 68 - MNS_MINOR_IT
0340         0;      %% 69 - MNS_MAX_IT
0341         -1;     %% 70 - MNS_VERBOSITY
0342         0;      %% 71 - MNS_CORE
0343         0;      %% 72 - MNS_SUPBASIC_LIM
0344         0;      %% 73 - MNS_MULT_PRICE
0345         0;      %% 74 - RESERVED74
0346         0;      %% 75 - RESERVED75
0347         0;      %% 76 - RESERVED76
0348         0;      %% 77 - RESERVED77
0349         0;      %% 78 - RESERVED78
0350         0;      %% 79 - RESERVED79
0351         0;      %% 80 - FORCE_PC_EQ_P0, for c3sopf
0352         
0353         %% MIPS, PDIPM, SC-PDIPM, and TRALM options
0354         0;      %% 81 - PDIPM_FEASTOL
0355         1e-6;   %% 82 - PDIPM_GRADTOL
0356         1e-6;   %% 83 - PDIPM_COMPTOL
0357         1e-6;   %% 84 - PDIPM_COSTTOL
0358         150;    %% 85 - PDIPM_MAX_IT
0359         20;     %% 86 - SCPDIPM_RED_IT
0360         0;      %% 87 - TRALM_FEASTOL
0361         5e-4;   %% 88 - TRALM_PRIMETOL
0362         5e-4;   %% 89 - TRALM_DUALTOL
0363         1e-5;   %% 90 - TRALM_COSTTOL
0364         40;     %% 91 - TRALM_MAJOR_IT
0365         100;    %% 92 - TRALM_MINOR_IT
0366         0.04;   %% 93 - SMOOTHING_RATIO
0367         0;      %% 94 - RESERVED94
0368         
0369         %% CPLEX options
0370         0;      %% 95 - CPLEX_LPMETHOD
0371         0;      %% 96 - CPLEX_QPMETHOD
0372         0;      %% 97 - CPLEX_OPT
0373         0;      %% 98 - RESERVED98
0374         0;      %% 99 - RESERVED99
0375         0;      %% 100 - RESERVED100
0376         0;      %% 101 - RESERVED101
0377         0;      %% 102 - RESERVED102
0378         0;      %% 103 - RESERVED103
0379         0;      %% 104 - RESERVED104
0380         0;      %% 105 - RESERVED105
0381         0;      %% 106 - RESERVED106
0382         0;      %% 107 - RESERVED107
0383         0;      %% 108 - RESERVED108
0384         0;      %% 109 - RESERVED109
0385         0;      %% 110 - RESERVED110
0386 
0387         %% MOSEK options
0388         0;      %% 111 - MOSEK_LP_ALG
0389         0;      %% 112 - MOSEK_MAX_IT
0390         0;      %% 113 - MOSEK_GAP_TOL
0391         0;      %% 114 - MOSEK_MAX_TIME
0392         0;      %% 115 - MOSEK_NUM_THREADS
0393         0;      %% 116 - MOSEK_OPT
0394         0;      %% 117 - RESERVED117
0395         0;      %% 118 - RESERVED118
0396         0;      %% 119 - RESERVED119
0397         0;      %% 120 - RESERVED120
0398 
0399         %% Gurobi options
0400         -1;     %% 121 - GRB_METHOD
0401         Inf;    %% 122 - GRB_TIMELIMIT
0402         0;      %% 123 - GRB_THREADS
0403         0;      %% 124 - GRB_OPT
0404     ];
0405 end
0406 
0407 %%-----  set up option names  -----
0408 %% power flow options
0409 names = char(   'PF_ALG', ...               %% 1
0410                 'PF_TOL', ...               %% 2
0411                 'PF_MAX_IT', ...            %% 3
0412                 'PF_MAX_IT_FD', ...         %% 4
0413                 'PF_MAX_IT_GS', ...         %% 5
0414                 'ENFORCE_Q_LIMS', ...       %% 6
0415                 'RESERVED7', ...            %% 7
0416                 'RESERVED8', ...            %% 8
0417                 'RESERVED9', ...            %% 9
0418                 'PF_DC' );                  %% 10
0419 
0420 %% OPF options
0421 names = char(   names, ...
0422                 'OPF_ALG', ...              %% 11
0423                 'RESERVED12', ...           %% 12   (was OPF_ALG_POLY)
0424                 'RESERVED13', ...           %% 13   (was OPF_ALG_PWL)
0425                 'RESERVED14', ...           %% 14   (was OPF_POLY2PWL_PTS)
0426                 'OPF_NEQ', ...              %% 15   (removed)
0427                 'OPF_VIOLATION', ...        %% 16
0428                 'CONSTR_TOL_X', ...         %% 17
0429                 'CONSTR_TOL_F', ...         %% 18
0430                 'CONSTR_MAX_IT', ...        %% 19
0431                 'LPC_TOL_GRAD'  );          %% 20   (removed)
0432 names = char(   names, ...
0433                 'LPC_TOL_X', ...            %% 21   (removed)
0434                 'LPC_MAX_IT', ...           %% 22   (removed)
0435                 'LPC_MAX_RESTART', ...      %% 23   (removed)
0436                 'OPF_FLOW_LIM', ...         %% 24
0437                 'OPF_IGNORE_ANG_LIM', ...   %% 25
0438                 'OPF_ALG_DC', ...           %% 26
0439                 'RESERVED27', ...           %% 27
0440                 'RESERVED28', ...           %% 28
0441                 'RESERVED29', ...           %% 29
0442                 'RESERVED30'    );          %% 30
0443 
0444 %% output options
0445 names = char(   names, ...
0446                 'VERBOSE', ...              %% 31
0447                 'OUT_ALL', ...              %% 32
0448                 'OUT_SYS_SUM', ...          %% 33
0449                 'OUT_AREA_SUM', ...         %% 34
0450                 'OUT_BUS', ...              %% 35
0451                 'OUT_BRANCH', ...           %% 36
0452                 'OUT_GEN', ...              %% 37
0453                 'OUT_ALL_LIM', ...          %% 38
0454                 'OUT_V_LIM', ...            %% 39
0455                 'OUT_LINE_LIM'  );          %% 40
0456 names = char(   names, ...
0457                 'OUT_PG_LIM', ...           %% 41
0458                 'OUT_QG_LIM', ...           %% 42
0459                 'RESERVED43', ...           %% 43 (was OUT_RAW)
0460                 'OUT_FORCE', ...            %% 44
0461                 'RESERVED45', ...           %% 45
0462                 'RESERVED46', ...           %% 46
0463                 'RESERVED47', ...           %% 47
0464                 'RESERVED48', ...           %% 48
0465                 'RESERVED49', ...           %% 49
0466                 'RESERVED50'    );          %% 50
0467 %% other options
0468 names = char(   names, ...
0469                 'SPARSE_QP', ...            %% 51   (removed)
0470                 'RETURN_RAW_DER', ...       %% 52
0471                 'RESERVED53', ...           %% 53
0472                 'RESERVED54', ...           %% 54
0473                 'FMC_ALG', ...              %% 55
0474                 'RESERVED56', ...           %% 56
0475                 'RESERVED57', ...           %% 57
0476                 'KNITRO_OPT', ...           %% 58
0477                 'RESERVED59', ...           %% 59
0478                 'IPOPT_OPT'     );          %% 60
0479 %% MINOS options
0480 names = char(   names, ...
0481                 'MNS_FEASTOL', ...          %% 61
0482                 'MNS_ROWTOL', ...           %% 62
0483                 'MNS_XTOL', ...             %% 63
0484                 'MNS_MAJDAMP', ...          %% 64
0485                 'MNS_MINDAMP', ...          %% 65
0486                 'MNS_PENALTY_PARM', ...     %% 66
0487                 'MNS_MAJOR_IT', ...         %% 67
0488                 'MNS_MINOR_IT', ...         %% 68
0489                 'MNS_MAX_IT', ...           %% 69
0490                 'MNS_VERBOSITY' );          %% 70
0491 %% other flags
0492 names = char(   names, ...
0493                 'MNS_CORE', ...             %% 71
0494                 'MNS_SUPBASIC_LIM', ...     %% 72
0495                 'MNS_MULT_PRICE', ...       %% 73
0496                 'RESERVED74', ...           %% 74
0497                 'RESERVED75', ...           %% 75
0498                 'RESERVED76', ...           %% 76
0499                 'RESERVED77', ...           %% 77
0500                 'RESERVED78', ...           %% 78
0501                 'RESERVED79', ...           %% 79
0502                 'FORCE_PC_EQ_P0'    );      %% 80
0503 
0504 %% MIPS, PDIPM, SC-PDIPM, and TRALM options
0505 names = char(   names, ...
0506                 'PDIPM_FEASTOL', ...        %% 81
0507                 'PDIPM_GRADTOL', ...        %% 82
0508                 'PDIPM_COMPTOL', ...        %% 83
0509                 'PDIPM_COSTTOL', ...        %% 84
0510                 'PDIPM_MAX_IT', ...         %% 85
0511                 'SCPDIPM_RED_IT', ...       %% 86
0512                 'TRALM_FEASTOL', ...        %% 87
0513                 'TRALM_PRIMETOL', ...       %% 88
0514                 'TRALM_DUALTOL', ...        %% 89
0515                 'TRALM_COSTTOL', ...        %% 90
0516                 'TRALM_MAJOR_IT', ...       %% 91
0517                 'TRALM_MINOR_IT', ...       %% 92
0518                 'SMOOTHING_RATIO'   );      %% 93
0519 
0520 %% CPLEX options
0521 names = char(   names, ...
0522                 'RESERVED94', ...           %% 94
0523                 'CPLEX_LPMETHOD', ...       %% 95
0524                 'CPLEX_QPMETHOD', ...       %% 96
0525                 'CPLEX_OPT', ...            %% 97
0526                 'RESERVED98', ...           %% 98
0527                 'RESERVED99', ...           %% 99
0528                 'RESERVED100', ...          %% 100
0529                 'RESERVED101', ...          %% 101
0530                 'RESERVED102', ...          %% 102
0531                 'RESERVED103', ...          %% 103
0532                 'RESERVED104', ...          %% 104
0533                 'RESERVED105', ...          %% 105
0534                 'RESERVED106', ...          %% 106
0535                 'RESERVED107', ...          %% 107
0536                 'RESERVED108', ...          %% 108
0537                 'RESERVED109', ...          %% 109
0538                 'RESERVED110'   );          %% 110
0539 
0540 %% MOSEK options
0541 names = char(   names, ...
0542                 'MOSEK_LP_ALG', ...         %% 111
0543                 'MOSEK_MAX_IT', ...         %% 112
0544                 'MOSEK_GAP_TOL', ...        %% 113
0545                 'MOSEK_MAX_TIME', ...       %% 114
0546                 'MOSEK_NUM_THREADS', ...    %% 115
0547                 'MOSEK_OPT', ...            %% 116
0548                 'RESERVED117', ...          %% 117
0549                 'RESERVED118', ...          %% 118
0550                 'RESERVED119', ...          %% 119
0551                 'RESERVED120'   );          %% 120
0552 
0553 %% Gurobi options
0554 names = char(   names, ...
0555                 'GRB_METHOD', ...           %% 121
0556                 'GRB_TIMELIMIT', ...        %% 122
0557                 'GRB_THREADS', ...          %% 123
0558                 'GRB_OPT'   );              %% 124
0559 
0560 %%-----  process parameters  -----
0561 while i <= nargin
0562     %% get parameter name and value
0563     pname = varargin{i};
0564     pval  = varargin{i+1};
0565     
0566     %% get parameter index
0567     namestr = names';
0568     namestr = namestr(:)';
0569     namelen = size(names, 2);
0570     pidx = ceil(findstr([pname blanks(namelen-length(pname))], namestr) / namelen);
0571     if isempty(pidx)
0572         error('"%s" is not a valid named option', pname);
0573     end
0574     % fprintf('''%s'' (%d) = %d\n', pname, pidx, pval);
0575 
0576     %% update option
0577     options(pidx) = pval;
0578 
0579     i = i + 2;                              %% go to next parameter
0580 end

Generated on Fri 20-Mar-2015 18:23:34 by m2html © 2005