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_mip_iqp_dense_optstr (h02cd)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

To supply individual optional parameters to nag_mip_iqp_dense (h02cb).

Syntax

h02cd(str)
nag_mip_iqp_dense_optstr(str)

Description

nag_mip_iqp_dense_optstr (h02cd) may be used to supply values for optional parameters to nag_mip_iqp_dense (h02cb). It is only necessary to call nag_mip_iqp_dense_optstr (h02cd) for those arguments whose values are to be different from their default values. One call to nag_mip_iqp_dense_optstr (h02cd) sets one argument value.
Each optional parameter is defined by a single character string of up to 72 characters, consisting of one or more items. The items associated with a given option must be separated by spaces, or equal signs =. Alphabetic characters may be upper or lower case. The string
 Print level = 1
is an example of a string used to set an optional parameter. For each option the string contains one or more of the following items:
a mandatory keyword;
a phrase that qualifies the keyword;
a number that specifies an integer or double value. Such numbers may be up to 16 contiguous characters in Fortran 77's I, F, E or D formats, terminated by a space if this is not the last item on the line.
Blank strings and comments are ignored. A comment begins with an asterisk (*) and all subsequent characters in the string are regarded as part of the comment.
Normally, each user-specified option is printed as it is defined, on the current advisory message unit (see nag_file_set_unit_advisory (x04ab)), but this printing may be suppressed using the keyword Nolist. Thus the statement
h02cd('Nolist')
suppresses printing of this and subsequent options. Printing will automatically be turned on again after a call to nag_mip_iqp_dense (h02cb), and may be turned on again at any time by you, by using the keyword List.
Optional parameter settings are preserved following a call to nag_mip_iqp_dense (h02cb), and so the keyword Defaults is provided to allow you to reset all the optional parameters to their default values by the statement,
h02cd('Defaults')
prior to a subsequent call to nag_mip_iqp_dense (h02cb).
A complete list of optional parameters, their abbreviations, synonyms and default values is given in Optional Parameters in nag_mip_iqp_dense (h02cb).

References

None.

Parameters

Compulsory Input Parameters

1:     str – string
A single valid option string (as described in Description above and in Optional Parameters in nag_mip_iqp_dense (h02cb)).

Optional Input Parameters

None.

Output Parameters

None.

Error Indicators and Warnings

Accuracy

Not applicable.

Further Comments

None.

Example

function h02cd_example


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

big = 1e25;
a    = [ 1,     1,      1,      1,      1,      1,       1;
         0.15,  0.04,   0.02,   0.04,   0.02,   0.01,    0.03;
         0.03,  0.05,   0.08,   0.02,   0.06,   0.01,    0.00;
         0.02,  0.04,   0.01,   0.02,   0.02,   0.00,    0.00;
         0.02,  0.03,   0.00,   0.00,   0.01,   0.00,    0.00;
         0.70,  0.75,   0.80,   0.75,   0.80,   0.97,    0.00;
         0.02,  0.06,   0.08,   0.12,   0.02,   0.01,    0.97];
cvec = [-0.02, -0.20,  -0.20,  -0.20,  -0.20,   0.04,    0.04];
bl   = [-0.01, -0.10,  -0.01,  -0.04,  -0.10,  -0.01,   -0.01, ...
        -0.13, -big,   -big,   -big,   -big,   -0.0992, -0.003];
bu   = [ 0.01,  0.15,   0.03,   0.02,   0.05,   big,     big,  ...
        -0.13, -0.0049,-0.0064,-0.0037,-0.0012, big,     0.002];
h    = [ 2,     0,      0,      0,      0,      0,       0;
         0,     2,      0,      0,      0,      0,       0;
         0,     0,      2,      2,      0,      0,       0;
         0,     0,      2,      2,      0,      0,       0;
         0,     0,      0,      0,      2,      0,       0;
         0,     0,      0,      0,      0,     -2,      -2;
         0,     0,      0,      0,      0,     -2,      -2];
xs   = [-0.01,  0.03,   0,     -0.01,  -0.1,    0.02,    0.01];
intvar = [int64(4)];
istate = zeros(14, 1, 'int64');
strtgy = int64(2);

h02cd('Nolist');
h02cd('Print Level = 0');

[istate, xs, obj, ax, clamda, ifail] = ...
h02cb( ...
       a, bl, bu, cvec, h, @qphess, intvar, istate, xs, strtgy, @monit);

fprintf('Optimal Integer Value is = %20.8e\n',obj);
disp('Components are:');
for j=1:7
  fprintf('x(%2d) = %12.8f\n',j,xs(j));
end



function [hx] = qphess(n, jthcol, h, ldh, x)
  hx = h*x;

function [bstval, halt, count] = monit(intfnd, nodes, depth, obj, x, ...
                                       bstval, bstsol, bl, bu, n, halt, count)
h02cd example results

Optimal Integer Value is =       3.74696620e-02
Components are:
x( 1) =  -0.01000000
x( 2) =  -0.07332830
x( 3) =  -0.00025809
x( 4) =   0.00000000
x( 5) =  -0.06335433
x( 6) =   0.01410944
x( 7) =   0.00283128

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