glpk_options

glpk_options(overrides, mpopt)

glpk_options() - Sets options for GLPK.

OPT = GLPK_OPTIONS
OPT = GLPK_OPTIONS(OVERRIDES)
OPT = GLPK_OPTIONS(OVERRIDES, FNAME)
OPT = GLPK_OPTIONS(OVERRIDES, MPOPT)

Sets the values for the options struct normally passed to GLPK.

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:
        verbose        - used to set opt.msglev
        glpk.opts      - struct containing values to use as OVERRIDES
        glpk.opt_fname - name of user-supplied function used as FNAME,
            except with calling syntax:
                MODIFIED_OPT = FNAME(DEFAULT_OPT, MPOPT);

Output is an options struct to pass to GLPK.

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 glpk.opt_fname) is called
    2. glpk.opts (if not empty) are applied
    3. OVERRIDES are applied

Example:

If glpk.opt_fname = 'glpk_user_options_3', then after setting the
default GLPK options, GLPK_OPTIONS will execute the following
user-defined function to allow option overrides:

    opt = glpk_user_options_3(opt, mpopt);

The contents of glpk_user_options_3.m, could be something like:

    function opt = glpk_user_options_3(opt, mpopt)
    opt.lpsolver = 1;
    opt.dual     = 2;

See the documentation for the PARAM argument at

    https://www.gnu.org/software/octave/doc/interpreter/Linear-Programming.html

or by typing 'help glpk'.

See also glpk, mpoption().