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_real (e05jl)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_glopt_bnd_mcs_optget_real (e05jl) is used to get the value of a real nag_glopt_bnd_mcs_solve (e05jb) optional parameter. nag_glopt_bnd_mcs_optget_real (e05jl) 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_real (e05jl).

Syntax

[rvalue, ifail] = e05jl(optstr, comm)
[rvalue, ifail] = nag_glopt_bnd_mcs_optget_real(optstr, comm)

Description

nag_glopt_bnd_mcs_optget_real (e05jl) obtains the current value of a real-valued optional parameter. For example
[loctol, ifail] = e05jl('Local Searches Tolerance', comm);
will result in the value of the optional parameter Local Searches Tolerance being output in loctol.
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 a real-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:     rvalue – double scalar
If ifail=0 on exit, rvalue contains the real 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 e05jl_example


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

[comm, ifail] = e05ja;

% List the default values for some 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);

fprintf('Function Evaluations Limit = %10d\n',nf);
fprintf('Infinite Bound Size        = %10.3e\n',infbnd);
fprintf('Local Searches             = %10s\n',lcsrch);
fprintf('Local Searches Limit       = %10d\n',loclim);
fprintf('Local Searches Tolerance   = %10.3e\n',loctol);
fprintf('Repeatability              = %10s\n',repeat);
fprintf('Splits Limit               = %10d\n',smax  );
fprintf('Static Limit               = %10d\n',stclim);
fprintf('Target Objective Error     = %10.3e\n',objerr);
fprintf('Target Objective Safeguard = %10.3e\n',objsfg);
fprintf('Target Objective Value     = %10.3f\n',objval);


e05jl example results

Function Evaluations Limit =          0
Infinite Bound Size        =  1.158e+77
Local Searches             =        ON 
Local Searches Limit       =         50
Local Searches Tolerance   =  2.220e-16
Repeatability              =        OFF
Splits Limit               =          0
Static Limit               =          0
Target Objective Error     =  1.026e-04
Target Objective Safeguard =  1.054e-08
Target Objective Value     =      0.000

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