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)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

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 nr (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 Optional Parameters in nag_glopt_bnd_mcs_solve (e05jb).

References

None.

Parameters

Compulsory Input Parameters

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

Optional Input Parameters

None.

Output Parameters

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

Error Indicators and Warnings

Errors or warnings detected by the function:
   ifail=1
Constraint: lcomm100.
Initialization function nag_glopt_bnd_mcs_init (e05ja) has not been called.
   ifail=2
The supplied optional parameter is invalid. A keyword or keyword combination was not recognized.
   ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
   ifail=-399
Your licence key may have expired or may not have been installed correctly.
   ifail=-999
Dynamic memory allocation failed.

Accuracy

Not applicable.

Further Comments

None.

Example

function e05jk_example


fprintf('e05jk example results\n\n');

% Initialize comm array
[comm, ifail] = e05ja;

% 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);

disp('The default values are for various options are:');
fprintf('%-26s : %8d\n','Function Evaluations Limit', nf);
fprintf('%-26s : %8.2e\n','Infinite Bound Size', infbnd);
fprintf('%-26s : %8s\n','Local Searches', lcsrch);
fprintf('%-26s : %8d\n','Local Searches Limit', loclim);
fprintf('%-26s : %8.2e\n','Local Searches Tolerance', loctol);
fprintf('%-26s : %8s\n','Repeatability', repeat);
fprintf('%-26s : %8d\n','Splits Limit', smax);
fprintf('%-26s : %8d\n','Static Limit', stclim);
fprintf('%-26s : %8.2e\n','Target Objective Error', objerr);
fprintf('%-26s : %8.2e\n','Target Objective Safeguard', objsfg);
fprintf('%-26s : %8.2e\n','Target Objective Value', objval);


e05jk example results

The default values are for various options are:
Function Evaluations Limit :        0
Infinite Bound Size        : 1.16e+77
Local Searches             :      ON 
Local Searches Limit       :       50
Local Searches Tolerance   : 2.22e-16
Repeatability              :      OFF
Splits Limit               :        0
Static Limit               :        0
Target Objective Error     : 1.03e-04
Target Objective Safeguard : 1.05e-08
Target Objective Value     : 0.00e+00

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–2015