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_ilp_info (h02bz)

Purpose

nag_mip_ilp_info (h02bz) extracts more information associated with the solution of an integer programming problem computed by nag_mip_ilp_dense (h02bb).

Syntax

[bl, bu, clamda, istate, ifail] = h02bz(n, m, iwork, rwork)
[bl, bu, clamda, istate, ifail] = nag_mip_ilp_info(n, m, iwork, rwork)
Note: the interface to this routine has changed since earlier releases of the toolbox:
Mark 22: liwork, lrwork have been removed from the interface
.

Description

nag_mip_ilp_info (h02bz) extracts the following information associated with the solution of an integer programming problem computed by nag_mip_ilp_dense (h02bb). The upper and lower bounds used for the solution, the Lagrange-multipliers (costs), and the status of the variables at the solution.
In the branch and bound method employed by nag_mip_ilp_dense (h02bb), the arrays bl and bu are used to impose restrictions on the values of the integer variables in each sub-problem. That is, if the variable xjxj is restricted to take value vjvj in a particular sub-problem, then bl(j) = bu(j) = vjblj=buj=vj is set in the sub-problem. Thus, on exit from this function, some of the elements of bl and bu which correspond to integer variables may contain these imposed values, rather than those originally supplied to nag_mip_ilp_dense (h02bb).

References

None.

Parameters

Compulsory Input Parameters

1:     n – int64int32nag_int scalar
This must be the same parameter n as supplied to nag_mip_ilp_dense (h02bb).
Constraint: n > 0n>0.
2:     m – int64int32nag_int scalar
This must be the same parameter m as supplied to nag_mip_ilp_dense (h02bb).
Constraint: m0m0.
3:     iwork(liwork) – int64int32nag_int array
This must be the same parameter iwork as supplied to nag_mip_ilp_dense (h02bb). It is used to pass information from nag_mip_ilp_dense (h02bb) to nag_mip_ilp_info (h02bz) and therefore the contents of this array must not be changed before calling nag_mip_ilp_info (h02bz).
4:     rwork(lrwork) – double array
This must be the same parameter rwork as supplied to nag_mip_ilp_dense (h02bb). It is used to pass information from nag_mip_ilp_dense (h02bb) to nag_mip_ilp_info (h02bz) and therefore the contents of this array must not be changed before calling nag_mip_ilp_info (h02bz).

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

liwork lrwork

Output Parameters

1:     bl(n + mn+m) – double array
If nag_mip_ilp_dense (h02bb) exits with ifail = 0ifail=0, 77 or 99, the values in the array bl contain the lower bounds imposed on the integer solution for all the constraints. The first n elements contain the lower bounds on the variables, and the next m elements contain the lower bounds for the general linear constraints (if any).
2:     bu(n + mn+m) – double array
If nag_mip_ilp_dense (h02bb) exits with ifail = 0ifail=0, 77 or 99, the values in the array bu contain the upper bounds imposed on the integer solution for all the constraints. The first n elements contain the upper bounds on the variables, and the next m elements contain the upper bounds for the general linear constraints (if any).
3:     clamda(n + mn+m) – double array
If nag_mip_ilp_dense (h02bb) exits with ifail = 0ifail=0, 77 or 99, the values in the array clamda contain the values of the Lagrange-multipliers for each constraint with respect to the current working set. The first n elements contain the multipliers (reduced costs) for the bound constraints on the variables, and the next m elements contain the multipliers (shadow costs) for the general linear constraints (if any).
4:     istate(n + mn+m) – int64int32nag_int array
If nag_mip_ilp_dense (h02bb) exits with ifail = 0ifail=0, 77 or 99, the values in the array istate indicate the status of the constraints in the working set at an integer solution. Otherwise, istate indicates the composition of the working set at the final iterate. The significance of each possible value of istate(j)istatej is as follows.
istate(j)istatej Meaning
2-2 The constraint violates its lower bound by more than tolfes (the feasibility tolerance, see nag_mip_ilp_dense (h02bb)).
1-1 The constraint violates its upper bound by more than tolfes.
0-0 The constraint is satisfied to within tolfes, but is not in the working set.
1-1 This inequality constraint is included in the working set at its lower bound.
2-2 This inequality constraint is included in the working set at its upper bound.
3-3 This constraint is included in the working set as an equality. This value of istate can occur only when bl(j) = bu(j)blj=buj.
4-4 This corresponds to an integer solution being declared with xjxj being temporarily fixed at its current value. This value of istate can occur only when ifail = 0ifail=0, 77 or 99 on exit from nag_mip_ilp_dense (h02bb).
5:     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
On entry,n0n0,
orm < 0m<0.

Accuracy

Not applicable.

Further Comments

None.

Example

function nag_mip_ilp_info_example
n = int64(6);
m = int64(3);
itmax = int64(0);
msglvl = int64(0);
a = [ 110,  205,  160,  160,  420,  260;
        4,   32,   13,    8,    4,   14;
        2,   12,   54,  285,   22,   80];
bl = [0;
      0;
      0;
      0;
      0;
      0;
      2000;
      55;
      800];
bu = [4;
      3;
      2;
      8;
      2;
      2;
      1e+20;
      1e+20;
      1e+20];
intvar = [int64(1);1;1;1;1;1];
cvec = [3;24;13;9;20;19];
maxnod = int64(0);
intfst = int64(0);
toliv = 0;
tolfes = 0;
bigbnd = 1e+20;
x = zeros(6,1);

[itmax, toliv, tolfes, bigbnd, x, objmip, iwork, rwork, ifail] = ...
     nag_mip_ilp_dense(itmax, msglvl, a, bl, bu, intvar, cvec, maxnod, intfst, toliv, tolfes, bigbnd, x);

[bl, bu, clamda, istate, ifail] = nag_mip_ilp_info(n, m, iwork, rwork)
 

bl =

           4
           0
           0
           5
           2
           0
        2000
          55
         800


bu =

   1.0e+20 *

    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    1.0000
    1.0000
    1.0000


clamda =

     3
    24
    13
     9
    20
    19
     0
     0
     0


istate =

                    3
                    1
                    1
                    1
                    3
                    1
                    0
                    0
                    0


ifail =

                    0


function h02bz_example
n = int64(6);
m = int64(3);
itmax = int64(0);
msglvl = int64(0);
a = [ 110,  205,  160,  160,  420,  260;
        4,   32,   13,    8,    4,   14;
        2,   12,   54,  285,   22,   80];
bl = [0;
      0;
      0;
      0;
      0;
      0;
      2000;
      55;
      800];
bu = [4;
      3;
      2;
      8;
      2;
      2;
      1e+20;
      1e+20;
      1e+20];
intvar = [int64(1);1;1;1;1;1];
cvec = [3;24;13;9;20;19];
maxnod = int64(0);
intfst = int64(0);
toliv = 0;
tolfes = 0;
bigbnd = 1e+20;
x = zeros(6,1);

[itmax, toliv, tolfes, bigbnd, x, objmip, iwork, rwork, ifail] = ...
     h02bb(itmax, msglvl, a, bl, bu, intvar, cvec, maxnod, intfst, toliv, tolfes, bigbnd, x);

[bl, bu, clamda, istate, ifail] = h02bz(n, m, iwork, rwork)
 

bl =

           4
           0
           0
           5
           2
           0
        2000
          55
         800


bu =

   1.0e+20 *

    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    0.0000
    1.0000
    1.0000
    1.0000


clamda =

     3
    24
    13
     9
    20
    19
     0
     0
     0


istate =

                    3
                    1
                    1
                    1
                    3
                    1
                    0
                    0
                    0


ifail =

                    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