Integer Programming by Cutting Planes Methods
Integer Programming by Cutting Planes Methods
DigitalCommons@USU
1973
Recommended Citation
Wu, Sung-Yen, "Integer Programming by Cutting Planes Methods" (1973). All Graduate Plan B and other
Reports. 1161.
https://digitalcommons.usu.edu/gradreports/1161
PLANES METHODS
by
Sung- Yen Wu
of
MASTER OF SCIENCE
1n
Applied Statistics
Plan B
Approved:
1973
ii
Dr. Grace Y. Chen for their time spent and support given in this
e ffort.
Sung-Y'en Wu
iii
TABLE OF CONTENTS
Page
ACKNOWLEDGMENTS ii
LIST OF TABLES . iv
V
LIST OF FIGURES .
INTRODUCTION . . 1
Description ...... . . . 5
Slack, surplus and artificial variables 6
The simplex method 7
The dual simplex algorithm . . . . 13
Description 14
Formulation methods and solutions • 15
NUMERICAL EXAMPLES 23
Summary 35
REFERENCES 37
APPENDIX .. 38
Computer Programs . 39
lV
LIST OF TABLES
Table Page
4. Computation of D! 27
3
5. Computation of D . 28
5
6. Computation of D~ . 28
LIST OF FIGURES
Fi gure Page
In this day and age, most planners and decision makers will
simplex method in 1947, progress in that field has been rapid. Al-
though the first applications were military in nature, it was not long
methods are:
3. Decomposition (Benders)
4. Enumerative
(Balas)
3
Tomlin).
plane methods and to compare one with another in terms of the nUITiber
each method.
ming problems until the optimal solution has satisfied the integerality
can limit the parallel movement of the hyperplane of the cut toward
rotate for a deeper cut. This method removes these two limitations
The cut means to add a new constraint to the original linear program-
ming problem such that some areas in the convex set are cut off.
(See Figure 1)
-- . -·-····
....- ----- X
I
-; ):,l(J_ry I _, L, l L,
Description
function.
b., i = 1, ... ,m ( 2)
l
that some or all of the variables are allowed to take only integral
values .
r
:E ah .x . < bh ( 3)
j= 1 J J -
r
/21ah{j + xr+h = bh ( 4)
r
:E ak.X. > bk ( 5)
J J -
j=l
r
~ ak.x - x = bk (6)
j=l J J r+k
problem has the same set of optimal solutions as the original one
(Hadley, 1962).
matrix B = I.
variable, the initial basic feasible solution may not be easy to find.
of cutting plans. the simplex method seems more suitable and common
than the revised simplex method. The reason is in the simplex method,
integer programming.
and storage saving over the standard simplex method, it does not yield
all the information to form a cut. This is due to the fact that only the
the extreme points of the convex set in terms of the objective function
solution.
better basic feasible solution which increases the value of the maximi-
zing function (or vis vasa) by means of replacing one of the current
basis vectors with a non- basis vector. The non- basic vector to enter
After the vectors to enter and leave the basis have been found,
th(' new basis is ~stablish~d, it forms the new starting point for re-
r
~ a .. x. b., i=l, ... ,m (7)
j=l lJ J 1
r
Z = 2_; C . X , (8)
j= 1 J J
X. > 0, (j= 1, .. , , r)
J -
Then
r
~ a .. x . < b.
j= 1 lJ J- 1
will bcome
10
r
~ a . .X . +X . = b ., X . > 0 ( 9)
j= l lJ J r+1 1 r+1 -
and
r
~ a .. X . > b.
j= l lJ J - 1
will become
r
~a .. x . -x . = b., X . > 0 ( 1 0)
j=l lJ J r+1 1 r+1 -
Ax = b, x > 0, max z = ex
where
function
s
z = ~ (- 1 )x . =- 1X (1 1 )
i=l at a
C a. - C ( l 2)
B J j
insures feasibility is
X X 'l
Br i Bi '}
= min I
\ yik > 0 I ( 14)
yrk i yik
\
11
feasible solution. The "ring around the rosy method is
I\
y . . = y .. - y . : allj, i=l, ... ,m+l, i*j
lJ lJ rJ
( 1 5)
all j
solving the primal problem. In many cases, the duality can be of con-
When the simplex tableau have one or more x . < 0, but with
Bl
z . - c. > 0 for all j, the criteria for the change of basis is;
J J -
1. Vector to be removed from basis: Choose
( 1 6)
determined from
Z - C Z - C
k k j j
0 = = max y .< 0 ( 1 7)
yrk J y rj rJ
Note that in the dual simplex algorithm one first determines the vector
to leave the basis and then the vector to enter. This is the reverse of
PLANES METHODS
Description
problem with the additional feature that some or all of the variables
written as
time involved to obtain the solution (even with today's computer) and
the effect of round-off error and machine storage size, more research
is (Hadley, 1964).
ness.
where
= x +~ y,x. ( 1 9)
8 jER J J
Now write
( 21 )
f Q - ~ f ,X , < 0 ( 22)
u jER UJ J -
where
f
1 -f
uO j1
y uj
I '
J.E"R,:, (24)
uO
d .
UJ
f . , jER()J , f .< f , for the variables require to take
UJ 1 UJ- U0
integer value.
f
uO , f
1 - f ( l - f UJ. ) , j E R ( IJ 1 , f . > u O'
uO ~
,,.
,.
where R is the sub~et of R not in R0J ,
1
,,, .,.
_,, ,,,,.
R~ and R are the subsets of R for which
cutting- plane method to obtain the first cut and then allows the hyper-
plane of that cut to be rotated in any direction until the final hyperplane
passes through as many integer points not in convex set S (defined below)
( 25)
and
18
n I
= ( x , . . . , xn) 1
x E"S: ~ a .x . < L ! (26)
1 I j=l J J- !
A = X
r ,
~ l XcS; j~= l , j *r a.x.+a'x
J J r
<L
r-
\
)
( 27)
n
~ a .x . + a/1. x < L (28)
j=l, j;tr J J r r-
n
~ a.x.< L ( 29)
j=l J J-
X = 1) , A cA and A =A for a 1 = a
r 1 r r r r
A
this is equivalent to selecting a as
r
/\ n
a = L -maxX A~ a.x. (3 0)
r E j=l,j;i:r J J
where
19
r r
S (L -a ) = L- a - F (L-a ) ( 31}
n r r n r
and
n
F: (L -a ) = maxX A l:: a .x . (3 2)
r E 1. 1 ·...1. J J
J= ,J+r
Theorem 1. let
j n
M = ,, X = (x , .. . ,x )ll:: a.x.< L; x. = 0, 1 , 2, ... , all j ~(3 3}
; 1 n 'j=l J J- J
'
I n
N = ~ X = (x , ...
1 l
, x } .2: .
I a .x.+ (a + k )x < L;
n J= 1, J:#r J J r r r -
X
j
= 0, 1, 2, ... , all j f, (34)
where
r
O~k;:.minn=l, 2 , ... , [ L/a ] (Sn (L-har)/h)
r
Proposition 1.
S ( k) = k - a , a < k < L; (3 5)
1 1 1- -
'
S. (k) = min~ S. (k), S. (k-a . )} (j=2, ... , n)
J l J- 1 J-1 J )
20
Proposition 2.
Where S. (k) = k - k' and k' is the largest integer p < k such that S.(p)=0.
J - J
Now let
r r r n
S (k) = k - F (k), wher e F (k) = max :E a.x.
n n n j= 1 , j fr J J
n
subject to :E a.x.= k, x = 0, 1, all j,
j= l , jf r J J j
then
,.
'Jr = a + Sr (L-a ) (3 7)
r n r
and
21
(
Using (37) and (38) we comp ute a next, we set r = n - 1
n
n -1 n
and compute D but D., j=l, ... , n - 2 and hence
n J
r n 1/\ n fl }
D
r +l
= D
r-
+ lk+a
1 j
'
r +1
1
I
kt: D
r-1
, k+a < L
r + 1-
( 40)
I .
D~ = D~
J
+ ) kt~. \ kt:D~ l k+~.< L
J- 1 ) J, J- , r J~ , (j=r+2, . .. , n) (41)
(42)
where
k
is the vector of the constants of this cut. T has 1 as
Also we define
22
k
F p (43)
-1
where P is an (n+l) x (n+l) matrix whose inverse p
k O -1
A = A P ( 44)
n
St e p 3. If r = 1 go to step 4; also check whether (L -a ) ~ D • If
r r - 1
Step 4. Set D~ = ~O, ~~- Use (41) to compute D:, and use (37) and
NUMERICAL EXAMPLES
E x ample 1.
subject to
2x + 4x - 4x + 2x + 4x ~ 7
1 2 3 4 5
xl + 3x + 2x 3 + X - x5 ~ 4
2 4
(46)
2x - 2x - x4 + x5 ~ 3
2 3
X
,B 1 xl x2 ~3 x4 ~5
z 0 -7 8 9 -4 -5
x6 7 2 4 -4 2 4
x7 4 1 3 2 1 -1
XS 3 0 2 -2 -1 1
24
Table 1. Continued
x9 1 1 0 0 0 0
xlO 0 1 0 0 0
xl I 0 0 l 0 0
xl2 l 0 0 0 l 0
xl3 l 0 0 0 0 l
X x2 x3 x6 x9
XB xl2
x8 3. 2 5 l. 00 -1. 00 o. 25 o. 50 1. 50
X l. 00 0,00 0.00 0.00 l. 00 0.00
l
xlO 1. 00 1. 00 o.oo 0.00 0.00 o. 00
xll l. 00 o. 00 1. 00 0.00 0.00 0.00
y
212
= -1. 50. We see that £
20
= 0. 75, £
22
= 0, £
23
= 0, £
26
= 0. 25,
£29 = o. 5, £2.12= o. 5
Thus by (22), the cut is
0. 75 - 0. 25x - 0. 5x - 0. 5x ~ 0 ( 4 7)
6 9 12
Annex (47) to the original problem and apply the dual simplex
solution given in Table 3, all x are integers. Thus, one has obtained
xB 1 xz x3 x4 x9 xsl
x7 4.00 4. 00 1. 00 2. 00 -2. 00 1. 00
X 1. 00 0.00 0.00 0.00 1. 00 0,00
1
xlO 1. 00 1. 00 0.00 0.00 0.00 0 .. 00
0.00 -1. 00 1. 00 -1. 00 1. 00 -1. 00
xl3
XS 1. 00 1. 00 -1. 00 1. 00 -1. 00 1. 00
0. 75 - 0. 25x - 0. 5x - 0. 5x f 0
6 9 12
or
to convert this cut to a cut that contains only 0, 1 variables, cme first
finds
1 0 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
P= 7 -2 -4 4 -2 -4
1 -1 0 0 0 0
1 0 0 -1
...
0 0
J
0
Then F = FP = (-2, 1, l, -1, 1, 1)
or
(48)
27
inequalities;
Table 4. Computation . o£ D5
5
5 5 5 D5=D5
Dl D2 D3 4 5
0 0 0 0
1 1 1 1
2 2 2
28
3
T a bl e 5 . Computation of D
5
3 3 5 3
D :5= D l o2 D5
0 0
1 l
2 2
T a bl e 6 . Computation . o f D_l
- :,
1 l 1 Dl
D2 D3 D4 5
0 0 0 0
1 l 1 1
2 2
( 49)
-1
To compute F we need p , which can be obtained from Table 2.
(
i 1. 00 0,00 0.00 0.00 0.00 0. 00 I
!
I 1. 00 0.00 0.00 0.00
l -1. 00 0.00
-1 0.00 1. 00 0.00 0.00 0.00 o. 00
p =
0.00 0.00 1. 00 0.00 0.00 0, 00 I
The vector F is
-1
F = F P = (0. 75, 0, 1, -0. 25, -0. 50, -0. 50)
0
tableau of Table 2 is
0. 75 + x3 - 0. 25x
6
- 0. 5x - O. 5x ~ 0
9 11
Table 7 shows the optimal tableau. For this solution , the integer
requirements are satisfied. Thus one has obtained the optimal solu-
tion to (46). It is
xl = X = 1, X = X = X = 0, z = 1 2.
5 2 3 4
XB x2 x3 x4 x9 X
sl
z 12. 00 13 . 00 9.00 1. 00 2.00 5.00
x5 1. 00 1. 00 0.00 1. 00 -1. 00 1. 00
provided below.
Example 2.
subject to
x . = 0 or 1, j = 1, ... ,5
J
Initial solution Z = 5. 77
1st cut Z = 5. 42
2nd cut Z = 5. 00
Initial solution Z = 5. 77
1st cut Z = 5. 00
except this method only needs one cut to obtain an integer solution,
Example 3,
Max. 1 5x
1
- 2x + l 6x + 6x
2 3 4
subject to
78x
1
+ 9lx
2
+ 69x
3
16x
4
< 122
x. = 0 or 1, j=l, ... ,4
J
Here the Kianfar's algorithm uses only two cuts to reach the
solution.
Example 4.
10x 1 -7x
2
+ x -12x
3 4
+ 2x
5
+ 8x -3x - x + Sx + 3x = Max
6 7 8 9 10
x +10x + x - x + 7x + x
2 3 5 6 7 8
< 13
Sx
1
+ 3x - x + 2x 6
2 3 8
4x - 2x
3 4 < 8
33
= < 12
8x + 5x - 2x - 7x + x .. 5x < 16
1 2 3 4 5 7
x . = 0 or 1, (j = 1, ... , 10)
J
did not obtain the solution (Z = 24. 12) while Kianfar's algorithm
The solution is
=X9 = 0
z = 23.
34
these two methods is that after the cut the Gomory's method has been
the Kianfer 's method can be seen. The results from Kianfer 1 s method
Due to the fact that the computer programs and the numerical
35
examples given are problem specific, the comment made here can
Summary
will be discussed.
e asier to learn and perform, and more suitable for small problems.
the problem turns large, the nurn ber of cuts needed to solve the problem
increases rapidly.
are needed to form a cut, however if the problem turns large the
1 5 4 2.69 o. 25 1 6
2 5 4 2. 79 0. 24 1 4
3 4 4 2. 58 o. 25 2 8
4 10 7 3. 59 0.42 13 50
,:, Both compilation time and execution time are all included in memory
and time calculation.
,:n:,Problem No. 4 by Gomory's algoritlun after 88 cuts still does not
obtain the answer.
37
REFERENCES
APPENDIX
39
Computer Programs
B(K)=S(K, J)
L(K)=J
42 CONTINUE
C TEST FOR L(K).
REGB=l.
45 IF(L(K)) 46, 62, 46
C FIND OUT THE PIVOT COLUMN
4 6 KJ=L(K)
DO 120 I=2, II
IF (S (I, K J)) 1 2 0, 1 2 0, 1 21
1 20 CONTINUE
WRITE(6, 130)
DO205J=l,JJ
205 S(JK, J)=S(JK, J)/X
KKK=KKK+l
WRITE(6, l 05) KKK, S(K, JJ), L(JK)
105 FORMAT (1X,I4,6X,Fl5.2,10X.I4)
GO TO 44
62 IF (K-1) 70, 70, 63
63 IJ=JJ-1
C TEST TO SEE WHETHER ALL THE ELEMENTS ON THE
C LAST ROW ARE CLOSE TO ZERO.
DO 65 J=l, IJ
IF(S(K, J)-. 0001) 65, 65, 66
65 CONTINUE
WRITE (6,103)
103 FORMAT (lX, 'FE ASIBLE')
WRITE(6, l 01)
101 FORMAT(lX, 'ITERATION OBJ. FUNCTION NEW BASIC VAR.'
C TEST TO SEE WHETHER ALL THE ELEMENTS ON THE LAST
C ROW
DO140J =l,JJ
140 S(III), J)=0.
K=l
KKK=0
IF(REGB. EQ. 0) GO TO 31
GO TO 44
31 REGB=l.
GO TO 500
66 WRITE(6, 6)
6 FORMA T(l X, 'INFEASIBLE')
GO TO l
70 WRITE(6, 8) S(l, JJ)
8 FORMAT(/// /lX, '0 BJ. FUNCTION,', F20. 8/, lX)
C FIND THE LARGEST S(I, JJ)
199 FUO=0.
DO 202 I= 2, II
REMAN=S(I, JJ)-AINT(S(I, JJ))
IF(REMAN. GE. 0. 9999995) GO TO 201
IF(REMAN. LE. 0. 0000005) S(I, JJ)=AINT(S(I, JJ))
IF(REDMAN. LE. FUO) GO TO 202
FUO=REMAN
LL=I
GO TO 202
201 S(I, JJ)=S(I, JJ)+0. 0000005
S(I, JJ)+AINT(S(I, JJ))
202 CONTINUE
IF(FUO. LE. 0. 5E-5) GO TO l
42
C
3 00 INTS=JJ-II
DO 216 I=l, INTS
216 DUJ(I)=O.
JC=l
DO 21 8 I= 1 , J J
DO 220 J= 2, II
220 IF ( I. EQ . L ( J)) GO TO 21 8
LD(JC )= I
JC=JC+l
218 CONTINUE
JC=JC-1
DO 21 2 J = l , JC
NOTB=LD(J)
IF(S(LL,NOTB).LT. 0. )GO TO 213
FUJ =S(LL, NO TB)-AINT(S(LL, NO TB))
GO TO 212
213 ABSY=ABS(S(LL, NOTB))
FUJ:=A BSY-AINT(A BSY)
FUJ=l. -FUJ
21 2 DUJ( .T)=FUJ
C INSERT THE NEW CUT INTO MATRIX
JJJ=JJ+l
DO 226 I=l, II
226 S(I,JJJ)=S(I,JJ)
DO 228 I=l, III
228 S(I, J J)=O.
S(Ill,JJ)=l.
S(III, JJJ)=-FUO
DO 230 I=l, INTS
NEWCUT=LD(I)
230 S(III, NEWCUT)=-;JUJ(I)
L(III)=J J
JJJ=JJ
JJ=JJ+l
II=II+l
III=II+l
IF(III. EQ. 50) GO TO l
DO 232 I=l, JJ
232 S(III,I)=O.
REGA=!.
GO TO 21
C MIN XBI
500 JK=O
IF(REGB. EQ. 0.) GO TO 62
XMIN=O.
43
DO 3 0 2 1 = 2, II
IF(S(I, JJ). GE. XMIN) GO TO 302
XMIN=S(I, J J)
JK=I
3 02 CONTINUE
IF(XMIN. GE. 0.) GO TO 70
IF(XMIN. LE. 0SE-4) GO TO 70
KJ=0
XMAX=-0. 5El 2
DD 304 J=l, JJJ
IF(S(JK, J). GE.0.) GO TO 304
X=S(l , J)/S(JK, J)
IF(X. LE. XMAX) GO TO 304
306 XMAX=X
KJ=J
304 CONTINUE
IF(KJ. EQ. 0) GO TO 1
GO TO 56
1 WRITE(6, 100)
l 00 FORMAT(////' THE FINAL MATRIX')
DO 78 I= l,III
WRITE(6, 1 50) I
l 50 FOR MA T (/ / 3 5 X, 1 RO W ', I 2 /, 1 X)
78 WRITE(6, 12) (S(I, J), J=l, J J)
WRITE(6, 7)
7 FORMAT (lX, 'VARIABLE VALUE')
DO711=2,II
71 WRITE (6, 5) L(I), S(I, J J)
5 FORMAT (I4, F20. 8)
STOP
END
44
27 CONTINUE
23 CONTINUE
C SEARCHING FOR THE MOST NEGATIVE ENTRY
K=III
44 JJJ=JJ-1
IF(REGA. EQ. 1. ) GO TO 500
B(K)=0.
L(K)=0.
DO 42 J=l, JJJ
IF(S(K, J). GE. 0.) GO TO 42
IF(B(K). LE. S(K, J)) GO TO 42
B(K)=S(K, J)
L(K)=J
42 CONTINUE
C TEST FOR L(K).
45 IF(L(K)) 46,62,46
C FIND OUT THE PIVOT COLUMN
46 KJ=L(K)
DO 120 I=2, II
IF(S(I, KJ)) 120, 120, 121
120 CONTINUE
WRITE(6, 130)
58 IF (B(I))580, 59,580
580 S(I, J)=S( I, J) - B(I)'~(S(JK, J)/X)
59 CONTINUE
C CALCULATING THE NEW ROWS BELOW THE PNOT ROW
IJ=JK+l
DO 61 I=IJ, III
DO 61 J=l, J J
IF (S ( J K, J)) 6 0, 61 , 6 0
60 IF (B(I))600, 61,600
6 00 S(I, J) =S(I, J}--B(I);'(S(JK, J)/,C)
61 CONTINUE
C NORMALIZATION
DO 2 0 5 J = 1 , J J
2Q5 S(JK, J)=S(JK, J)/X
KKK=KKK+l
WRITE(6, 105) KKK, S(l, JJ), L(JK)
105 FORMAT (lX, I4, 6X, Fl 5. 2, 1 OX, I4)
GO TO 44
62 IF(K-1) 70, 70, 63
63 IJ=JJ-1
C TEST TO SEE WHETHER ALL THE ELEMENTS ON THE LAST ROW
C ARE CLOSE TO ZERO.
DO 65 J=l, IJ
IF(S(K, J)-. 0001) 65, 65, 66
65 CONTINUE
WRITE (6,103)
103 FORMAT (lX, 'FEASIBLE')
WRITE(6, 101)
101 FORMAT(lX, 'ITERATION OBJ.FUNCTION NF-W BASIC VAR.
C TEST TO SEE WHETHER ALL THE ELEMENTS ON THE LAST ROW
DO 1 4 0 J = 1 , J J
140 S(III, J)=0.
K=l
KKK=0
GO TO 44
66 WRITE(6, 6)
6 FORMAT(lX, 'INFEASIBLE')
GO TO 1
70 WRITE(6, 8) S(l, J J)
1
8 FORMAT(/ / / / 1 X, '0BJ. FUNCTION. , F 2 0. 8 /, 1 X)
WRITE(6, 7)
7 FORMAT (IX, 'VARIABLE VALUE')
DO 71 I=2, II
71 WRITE (6, 5) L(I),S(I, JJ)
5 FORMAT(I4 ,F2 0.8)
C FIND THE LARGEST S(I, JJ)
47
FUO=0.
DO 202 I=2, II
REMAN=S(I, J J)-AIN T(S( I, J J))
IF (REMAN. GE. 0. 9999995) GO TO 201
IF (REMAN. LE. 0. 0000005) S(I, JJ)=AINT(S(I, JJ))
IF RE MAN. LE. FUO) GO TO 202
FUO=REMAN
LL=I
GO TO 202
201 S(I, J J)=S(I, J J)+0, 0000005
S(I, J J)=AINT(S(I, J J))
202 CONTINUE
C TEST IF OPTIMAL SOLUTION HAS BEEN OBTAINED
IF(FUO. LE. 0. 5E-5) GO TO 1
WRITE(6, 954) J J, FUO, LL
9 54 FORMAT(1X, 1 JJ= 1 ,I6,' FUO= 1 ,Fl0.4, 1
LL= 1 ,I6)
300 INTS=JJ-II
DO 216 I=l, INTS
216 FT(I)=0.
JC=l
DO 21 8 I= 1 , J J
DO 220 J= 2, II
220 IF(I.EQ.L(J))GO TO 218
LD(JC)=I
JC=JC+l
218 CONTINUE
JC=JC-1
INTSS=INTS+l
P(l, 1 )=l.
DO 502 J=2. INTSS
502 P(l, J)=0.
DO 504 J=l, JC
:,,roT B=LD( J)
IF(NOTB. LE. NN) GO TO 503
DO 506 1=2,II
506 IF(SS(I, NOTB). EQ. 1.) GO TO 508
WRITE(6, 510)
510 FORMAT(/' ERROR INS MA TRIX')
508 JT=J+l
DO 51 2 K = 1 , INT S
KT=K+l
51 2 P( JT, KT)=-SS(I, K)
P(JT, 1 )=SS(I, J J)
GO TO 504
503 NOT J=J+l
NOTB=NOT B+l
48
WRITE( 6,938)
938 FORMAT(' FP(I)')
WRITE(6, 12) (FP(I), I=l, INTSS)
WRITE(6, 12) (IFP(I), I=l, INTSS)
INR=INTSS
C FIND Dl AND DJ, J=2, ... , N
IDA(l)=0
IDA(2)=IFP(2)
KC=l
IDRR(l )=2
K=3
MM=2
J=3
53 8 I= 1
536 IF(I. GT. MM) GO TO 532
NSTRAG=IDA ( I)+ IFP(J)
49
IDB( 2)=IAR H( 2)
INR=IN-2
CALL KNAP{INR, MM, K, IDB, IARH, LB, I, IPLUSR, IFP, &770, IR)
GO TO 638
770 DO 64 2 I=2, INTSS
IOU=I-1
642 FT(I)=IARH(LOU)
FT(l )= FP(l)
C GET P-1
DO 704 I=l, NN
IK=I+ 1
DO 7 0 6 J = 2 , II
706 IF{L(J). EQ. NARI(!)) GO TO 708
DO 714 K=l, INTSS
714 P(IK, K)=0.
P ( IK, IK) = 1 .
GO TO 704
708 DO 712 K=l, INTS
KT=K+l
71 2 P(I K, KT)=-S(J, LD(K))
P(IK, 1 )=S(J, J J)
704 CONTINUE
C MA TRIX FOP-1
DO 718 I=l, INTSS
71 8 FP(I)=0.
DO 720 I=l, INTSS
DO 720 J = 1, INTSS
720 FP(I)=P(J, l) ':' FT(J)+FP(I)
WRITE (6,930)
930 FORMAT(' FOP-1 ')
WRITE(6, 12) (FP(I), I=l, INTSS)
C INSERT THE NEW CUT INTO MATRIX
JJJ=JJ+l
DO 226 I=l, II
SS(I, JJJ)=SS(I, JJ)
226 S(I, JJJ)=S(I, JJ)
DO 228 I=l, III
SS(I, J J)= 0.
228 S(I, JJ)=0.
S(III, JJ)=l.
SS(III, JJ)=l.
S(III, JJJ)=:-FP(l)
SS(III, J J J)=-:F T(l)
DO 23 0 I=l , INTSS
WRITE (6, 967) INTS, I, LD(I), FT(I)
96 7 FORMAT( 14, 14, I4, Fl 6. 8)
51
NE WC UT=LD{I)
IQ=I+l
SS(III, I)=FT{IQ)
230 S{III, NEWCUT)=FP(IQ)
L(III)=J J
JJJ=JJ
JJ=JJ+l
II=II+l
III=II+l
IF(III . GE. 25) GO TO 1
DO 23 2 I= l , J J
23 2 S{III, I)=0.
REGA=l.
GO TO 21
C MIN XBI
500 JK=0
XMIN=0.
DO 302 Iz:2, II
IF(S(I, JJ). GE. XMIN) GO TO 302
XMIN=S(I, JJ)
JK=I
302 CONTINUE
C TEST XBR<0
WRITE(6, 997) XMIN
997 FORMAT{' XMIN= ',Flo. 6)
IF(XM!N. GE. 0.) GO TO 70
KJ=0
XMAX=-0. 5El 2
DO 304 J=l, JJJ
IF(S(JK, J). GE. 0.) GO TO 304
X=S(l, J)/S(JK, J)
IF(X, LE. XMAX) GO TO 304
306 XMAX=X
KJ=J
3 04 CONTINUE
IF(KJ. EQ. 0) GO TO 66
GO TO 56
1 WRITE{6, 100)
100 FORMAT(//// 1 THE FINAL MA TRIX')
STOP
END
52
SU BROUTJJ\rE KNAP( INR, MM, K, IDB, IARH, LB, I, IPLUSR, IFP, *, IR)
DIMENSION IARH(30), IDB(300), IFP(30)
DO 631 J=l, INR
636 IF(I.GT.MM) GO TO 629
NS TR BG=ID B( 1 )+ !AR H( IPL USR)
IF(NSTRBG,GT.LB)GO TO 634
IDP=K-1
DO 635 IDD=l, !DP
63 5 IF(NSTRBG. EQ .• IDB(IDD))GO TO 634
IDB(K)=NSTR BG
K=K+l
634 I=I+l
GO TO 636
629 IPLUSR=IPLUSR+l
MM=K-1
I= 1
631 CONTINUE
IPLUSR=IR+l
632 KLA=LB-IFP(lPLUSR)
KSNR=KLA-KPLAN(KLA, IDB, K)
IARH(IR )=IFP(IPL USR )+KSNR
WRITE(6 , 922) IR, IARH(IR)
922 FOR MAT ( 1 X, 1IR= 1 , .:::6,' IA RH( IR )= ' , !6)
IR=IR-1
IF(IR, EQ. 0) RETURN l
RETURN
END