hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_glopt_bnd_mcs_optget_int (e05jk)

Purpose

nag_glopt_bnd_mcs_optget_int (e05jk) is used to get the value of an integer nag_glopt_bnd_mcs_solve (e05jb) optional parameter. nag_glopt_bnd_mcs_optget_int (e05jk) can be used before or after calling nag_glopt_bnd_mcs_solve (e05jb), but the initialization function nag_glopt_bnd_mcs_init (e05ja) must have been called before calling nag_glopt_bnd_mcs_optget_int (e05jk).

Syntax

[ivalue, ifail] = e05jk(optstr, comm)
[ivalue, ifail] = nag_glopt_bnd_mcs_optget_int(optstr, comm)

Description

nag_glopt_bnd_mcs_optget_int (e05jk) obtains the current value of an integer-valued optional parameter. For example
[loclim, ifail] = e05jk('Local Searches Limit', comm);
will result in the value of the optional parameter Local Searches Limit being output in loclim.
The default values of the optional parameters Function Evaluations Limit, Splits Limit and Static Limit depend on the problem parameter nrnr (the number of non-fixed variables). A default value for each of these optional parameters will be set in the first call to the solver nag_glopt_bnd_mcs_solve (e05jb): before that time, getting the value of any of these optional parameters using nag_glopt_bnd_mcs_optget_int (e05jk) will not return a meaningful result.
A complete list of optional parameters, their symbolic names and default values is given in Section [Optional Parameters] in (e05jb).

References

None.

Parameters

Compulsory Input Parameters

1:     optstr – string
A string identifying an integer-valued optional parameter (as described in Section [Optional Parameters] in (e05jb)).
2:     comm(lcomm) – double array
lcomm, the dimension of the array, must satisfy the constraint lcomm100lcomm100.
Communication data as initialized by nag_glopt_bnd_mcs_init (e05ja).

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

lcomm

Output Parameters

1:     ivalue – int64int32nag_int scalar
If ifail = 0ifail=0 on exit, ivalue contains the integer value associated with the optional parameter in optstr.
2:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 1ifail=1
Constraint: lcomm100lcomm100.
Initialization function nag_glopt_bnd_mcs_init (e05ja) has not been called.
  ifail = 2ifail=2
The supplied optional parameter is invalid. A keyword or keyword combination was not recognized.

Accuracy

Not applicable.

Further Comments

None.

Example

function nag_glopt_bnd_mcs_optget_int_example


[comm, ifail] = nag_glopt_bnd_mcs_init;

if (ifail == 0)
  % See what the default values are for the various options
  nf = nag_glopt_bnd_mcs_optget_int('Function Evaluations Limit', comm)
  infbnd = nag_glopt_bnd_mcs_optget_real('Infinite Bound Size', comm)
  lcsrch = nag_glopt_bnd_mcs_optget_char('Local Searches', comm)
  loclim = nag_glopt_bnd_mcs_optget_int('Local Searches Limit', comm)
  loctol = nag_glopt_bnd_mcs_optget_real('Local Searches Tolerance', comm)
  repeat = nag_glopt_bnd_mcs_optget_char('Repeatability', comm)
  smax = nag_glopt_bnd_mcs_optget_int('Splits Limit', comm)
  stclim = nag_glopt_bnd_mcs_optget_int('Static Limit', comm)
  objerr = nag_glopt_bnd_mcs_optget_real('Target Objective Error', comm)
  objsfg = nag_glopt_bnd_mcs_optget_real('Target Objective Safeguard', comm)
  objval = nag_glopt_bnd_mcs_optget_real('Target Objective Value', comm)
end
 

nf =

                    0


infbnd =

   1.1579e+77


lcsrch =

ON 


loclim =

                   50


loctol =

   2.2204e-16


repeat =

OFF


smax =

                    0


stclim =

                    0


objerr =

   1.0265e-04


objsfg =

   1.0537e-08


objval =

     0


function e05jk_example


[comm, ifail] = e05ja;

if (ifail == 0)
  % See what the default values are for the various options
  nf = e05jk('Function Evaluations Limit', comm)
  infbnd = e05jl('Infinite Bound Size', comm)
  lcsrch = e05jj('Local Searches', comm)
  loclim = e05jk('Local Searches Limit', comm)
  loctol = e05jl('Local Searches Tolerance', comm)
  repeat = e05jj('Repeatability', comm)
  smax = e05jk('Splits Limit', comm)
  stclim = e05jk('Static Limit', comm)
  objerr = e05jl('Target Objective Error', comm)
  objsfg = e05jl('Target Objective Safeguard', comm)
  objval = e05jl('Target Objective Value', comm)
end
 

nf =

                    0


infbnd =

   1.1579e+77


lcsrch =

ON 


loclim =

                   50


loctol =

   2.2204e-16


repeat =

OFF


smax =

                    0


stclim =

                    0


objerr =

   1.0265e-04


objsfg =

   1.0537e-08


objval =

     0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013