next up previous index
Next: H301 Assignment Problem Up: CERNLIB Previous: G901 Random Points

H101 Linear Optimization Using the Simplex Algorithm

Routine ID: H101
Author(s): M. GyrLibrary: MATHLIB
Submitter: K.S. KölbigSubmitted: 15.02.1994
Language: FortranRevised:

Subroutine subprograms RSMPLX and DSMPLX calculate the quantities x1,x2,...,xm for which the linear form, or objective function,

z = z0- ∑i=1mbixi

assumes a maximum value subject to the n1 inequality constraints

i=1maikxi≤ck(k = 1,2,...,n1)

and the n-n1 equality constraints

i=1maikxi= ck(k = n1+1,n1+2,...,n).

A number m1≤m of the variables xi, (i=1,2,...,m1)

can be restricted to non-negative values (xi≥0 ). The remaining m-m1 variables xi, (i=m1+1,...,m) are then unrestricted (-&inf;<xi<&inf; ). In the case m1=0 , all variables xi

are unrestricted. These subprograms can also be used for the so-called degenerate case.

On computers other than CDC or Cray, only the double-precision version DSMPLX is available. On CDC and Cray computers, only the single precision version RSMPLX is available.

Structure:

SUBROUTINE subprograms
User Entry Names: RSMPLX, DSMPLX
Internal Entry Names: H101S1, H101S2
Files Referenced: Unit 6
External References: MTLMTR (N002), ABEND (Z035)

Usage:

For t=R (type REAL), t=D (type DOUBLE PRECISION),

    CALL tSMPLX(A,B,C,Z0,IDA,M,M1,N,N1,LW,IDW,W,X,Z,ITYPE)
A
(type according to t) Two-dimensional array of dimension (IDA,≥N) . Contains, on entry, the coefficients ai,k, (i = 1,2,...,m; k =1,2,...,n) . Destroyed during execution.
B
(type according to t) One-dimensional array of dimension ≥M . Contains, on entry, the coefficients bi, (i = 1,2,...,m) . Destroyed during execution.
C
(type according to t) One-dimensional array of dimension ≥N . Contains, on entry, the coefficients ck, (k = 1,2,...,n) . Destroyed during execution.
Z0
(type according to t) Contains, on entry, the initial value of the objective function.
IDA
( INTEGER) Declared first dimension of A in the calling program (IDA ≥M ).
M
( INTEGER) The total number m of variables xi

(M ≥0 ).

M1
( INTEGER) The number m1 of restricted variables xi≥0 (0 ≤M1 ≤M) .
N
( INTEGER) The total number n of constraints (N ≥0 ).
N1
( INTEGER) The number n1 of inequality constraints (0 ≤N1 ≤N) .
LW
( INTEGER) Two-dimensional array of dimension (IDW, ≥5) . Used as working space.
IDW
( INTEGER) Declared first dimension of LW in the calling program (IDW ≥M+2*N ).
W
(type according to t) One-dimensional array of dimension ≥M+N . Used as working space.
X
(type according to t) One-dimensional array of dimension ≥M+N . If ITYPE=1 or ITYPE=2 , its first m elements X(1),...,X(M) contain, on exit, the or a solution x1,...,xm , respectively. The next n elements X(M+1),...,X(M+N) contain the values of the so-called slack variables xm+1,...,xm+n . If ITYPE=3 or ITYPE=4 , the elements X(1),...,X(M+N) are undefined.
Z
(type according to t) If ITYPE=1 or ITYPE=2 , Z contains, on exit, the result z of the objective function. Undefined for ITYPE=3 and ITYPE=4 .
ITYPE
( INTEGER) Defines, on exit, the type of the result:
=1: There is exactly one finite solution.
=2: There is more than one solution.
=3: There is no finite solution.
=4: There is no feasable initial solution.

Method:

The method is described in Ref. 1 and Ref. 2.

Error handling:

Error H101.1: M ≤0 or N ≤0 .
Error H101.2: M1 < 0 or M1 > M

or N1 < 0 or N1 > N .
In both cases, a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. H.P. Künzi, H.G. Tzschach and C.A. Zehnder, Numerical methods of mathematical optimization, (Academic Press, New York 1968)
  2. E. Stiefel, Einführung in die Numerische Mathematik, (B.G. Teubner, Stuttgart 1965)

H301



next up previous index
Next: H301 Assignment Problem Up: CERNLIB Previous: G901 Random Points


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995