Professional Documents
Culture Documents
Foundations
Linear programming is one if the best known tools of management science. Its objective is to identify an optimal allocation
of an organizations limited resources among competing demands.
The study of the conditions in which an economic activity takes place with the aid of programming leads to system of
constraints that contain the problem variables and the technical coefficients. These relations are named constraints. The result is
dependent on the same variables that appear in the constraints and is represented in a form of a function, called objective
function (efficiency function). The optimum value of this function is an extreme: maximum or minimum.
Linear problems
A linear problem is that problem in which all the model components are linear functions of variables. The standard form of
a linear mathematical model is expressed as follows:
n
aij Xj bi , i 1,..., m
j1
Xj 0 , j 1,... ,n
max
min
(6.1)
(6.2)
c X
j
(6.3)
j 1
The relations (6.1) represent the system of constraints. Coefficients aij are technical coefficients representing input/output; bj are the available
resources.
The relations (6.2) are called non-negativity conditions, resulted from the economic character of the problem that imposes for Xj variables
positive or null values.
The relation (6.3) is the mathematical expression of the objective to be achieved.
1
Standardize problem
format with the aid of
slack variables
Is solution
optimal?
NO
Identify incoming
variable
Identify outgoing
variable
Generate improved
solution
End
Step 4. Identify one variable that will leave the basis and one
variable that will enter the basis
Step 5. Generate an improved solution and test is for optimality.
If is not optimal, continue in the same manner.
Step 6. Find if more than one optimal solution exists.
*Slack variable: a variable representing the difference between the use
of a resource and its availability. If the value obtained is nonzero, it means
there are unused quantities of that resource.
Example
The algorithm will be better understood by taking the following example, having constrains of the smaller-than-equal-to
type:
a11X1 a12X2 b1
a21X1 a22X2 b2
X1 0 , X2 0
Step 1. Standardize the problem into a linear programming tableau, by adding the slack variables to each type of constrains.
a11X1 a12X2 X3 b1
a21X1 a22X2 X4 b2
Xj 0 , j 1,... ,4
a11
a21
a12
a22
1 0
0 1
Iterations
For each iteration a tableau is built:
cj
i= 1,...,m
Xr,k
aij,k
bi,k
iI,k
j= 1,...,n,n+1,...n+m
k
j,k
Zk
j 1,..., n, n 1,..., n m
(6.4)
If the solution is not optimal, it can be improved by exchanging one variable in the solution. The improvement is done by:
Identifying an incoming variable: that variable with the maximum value among negative values, max (j,k<0). This
incoming variable is noted with Xi,K and aiI,K is the column corresponding to Xi,K in the matrix.
Identifying an outgoing variable: once the incoming variable has been identified, the outgoing must to be found, by using
iI,k. The outgoing variable, noted XE,K, is that with the minimum positive value of iI,k.
min iI , k
bi , k
, aiI , k 0
aiI , k
(6.5)
The computation must be continued untill the optimum solution is achieved (iteration K+1 by replacing an X rk variables
with the Xik variable).
c2
X3
a11
a12
b1
X4
a21
a22
b2
k=0
-c1
-c2
Z0=0
The solution is improved by introducing the incoming variable into the basis and removing the outgoing variable. This is done
row by row on the old tableau, forming, in the process, a new one.
that XI,K variable that assures the largest increase of the objective function Z is introduced; as the column that
corresponds to variable Xi,K is known, the iI,k values can be computed;
XE,K variable is withdrawn from the basis;
The element placed at the intersection of the line of XE variable and the column of XI is called pivot.
Lets suppose that:
c2 > c1 > 0
a11 >0; a12 >0; a21 >0; a22 >0.
By examining the last row of the table one may notice that there are two negative values (-c1, -c2), so the computation must be
carried on. In the case of iteration 1, X2 will enter in the base for which max j,k<0, since -c1<-c2. The values are calculated as:
1I,0=12,0=(b1/a12); 22,0=(b2,0/arI,0)=(b2/a22)
Considering that 12,0<22,0, it means that variable X3 is the outgoing variable. The pivot is represented by a 12. The zero
iteration table looks like:
c1
c2
X3
a11
a12
X4
a21
a22
k=0
-c1
-c2
0
1
0
0
b1
b1/a11
b2
b2/a21
Z0=0
B
P
-pivot line
Column
Pivot
of computed element
Column
where:
P = pivot = aPI,K (a12 in this case)
E = eij,K
B = epj,K
C = eiI,K.
The following relationship is applied:
eij, (k 1)
EP BC
BC
E
P
P
c2
X2
a11/a12
X4
a21-a11a22/a12
k=1
-c1+c2a11/a12
0
1/a12
-a22/ a12
c2/a12
0
0
1
0
b1/a12
b2-b1a22/ a12
Z1=c2b1/a12
The iterations must be continued with another one (k+1), in the same manner. The named steps are repeated till the optimum
solution is identified or a cycling process is noticed indicating that more optimal solutions exist.
Finally, the verifying of the solutions is done by replacing the true variables X 1 ,..., Xn values in the initial constraints system, and
checking if they are fulfilled.
9
Example
Solve the following linear program:
4 X1 X2 6 X3 4
X1 X2 5 X3 3
X1 0 , X2 0 , X3 0
max Z 4 X1 X2 3X3
Solution
1. Standardize by adding the slack variables:
4 X1 X2 6 X3 X4 4
X1 X2 5 X3 X5 3
Xj 0 , j 1,...5
max Z 4 X1 X2 3X3 0 X4 0 X5
2. Elaboration of 0 iteration:
Tableau 1.1
4
-1
X4
-6
X5
k=0
-4
-3
0
10
3. There are negative solutions on the last row of the tableau, the optimum solution was not found yet.
4. The variable that enters in the base, XI,0, is X1 that has 1,0=-4.
5. The values of the criteria are:
11,0=b1,0/a11,0=4/4=1;
21,0=3/1=3
6. The outgoing variable, XE,k, is X4.
7. The pivot is marked in the complete tableau of the 0 iteration (see tableau 1.2.)
Tableau 1.2
4
-1
X4
-6
X5
k=0
-4
-3
Z0=0
a11,1 = 1 (pivot);
a21,1 = 1,1 = 0 (elements from the pivot column);
a12,1 = a12,0/a11,0 = 1/4 ;.....b1,1 = b1,0/a11,0 = 4/4 (elements from the pivot raw);
a22,1 = 1 - (1x1/4) = 3/4 and so on.
Tableau 1.3
4
-1
X1
1/4
-3/2
1/4
X5
3/4
26/4
-1/4
k=1
-9
Z1=4
Due to the fact that still negative values are on the last raw, the optimum was not reached. So, variable X3 which has 31=-9 will
enter in the basis and variable X5 will leave the basis as this variable satisfies the relation 6.5.
The next iteration is computed as follows:
Tableau 1.4
4
-1
X1
11/26
X3
3/26
-1/26
k=2
79/26
17/13
18/13
0
5/26
0
3/13
19/13
4/13
Z2=88/13
12
As one may notice the optimum was reached, the solution being:
X1 = 19/13=1.46
X2 = 0
X3 = 4/13=0.31
maxZ = Z2 = 88/13=6.78
The slack variables are 0.
The optimal solution is verified by replacing the real variables X1, X2, X3 into the initial system:
19
4 76 24 52
06
4
13
13
13
13
19
4 19 20 39
05
3
13
13
13
13
Bibliography
1. Loomba, N.P., "Linear Programming. A Managerial Perspective", McMillan, London, 1976.
2. Turban, E., Meredith, J. R., Fundamentals of Management Science, 4th ed. Business Publications, Inc., Plano, 1988.
3. Kallrath, J., Wilson, J.M., Business Optimisation using Mathematical programming, MacMillan, London, 1997.
4. Radu C., Stanciu D.R., Momete D.C., Management industrial aplicatii practice, Editura Bren, 2001.
13
Case study
The production program of a dyes section of a chemical enterprise has planned to produce during a month three products from the
gamut of alchylic dyes, symbolised with P1, P2, and P3. To produce them three types of equipments are used: dosage,
homogenisation and scrubbing.
The time consumption, expressed in hours, for each batch of product and each equipment category is as follows:
Product
P1
Dosage
Homogenisation
Scrubbing
P2
P3
14