A Computer Technique For Sensitivity Ana
A Computer Technique For Sensitivity Ana
A Computer Technique For Sensitivity Ana
Abstract
Sensitivity Analysis is a systematic study of how sensitive solutions are to (small) changes in the
data. In our paper, we develop a computer oriented method for analyzing sensitivity. This method
shows the changes in optimal solution of a Linear Programming problem for a small change in data
values. A numerical example is illustrated to demonstrate our algorithm.
A basic solution is a solution obtained by Basis matrix B is the matrix, whose elements
setting (n-m) variables equal to zero and are the original columns corresponding to the
solving for the remaining m variables, basic variables.
provided the determinant of the coefficient of
II. Algorithm
these m variables are non-zero. The m
variables are called basic variables. In this section, we present the algorithm of
our computer oriented method.
Basic Feasible Solution
Start
A basic feasible solution is a basic solution
which also satisfies the nonnegative Input type of problem d, number of
restrictions xj 0; that is all basic variables variables n, number of constraints m, cost
are nonnegative. coefficients c[i], cost coefficients of basic
variables cBV, basis matrix B, columns of
Optimal Solution
variables a[i], right hand side vector b.
Any feasible solution which optimizes
Step 1 calculate B-1 and B-1b.
(minimizes or maximizes) the objective
function of an LP is called optimal solution to Step 2 for i m, x = solve equation B-1b = 0
the LP.
if x ≠ φ, solve inequality B-1b 0
Cost/Profit Coefficient
Print inequality solution.
The vector c (c1, c2, … … , cn)T which is
Step 4 calculate cBVB-1, for i n
formed by the coefficients of the objective
function is called cost/profit coefficient. if d = 1, calculate cj[i] = cBVB-1a[i] –
c[i]
Right Hand Side Constant
T
else, calculate cj[i] = c[i] – cBVB-1a[i]
The vector b (b1, b2, … … , bn) which is
formed by the right hand side values of the Step 6 for i n, M = 0, x = solve equation
constraints is called right hand side constant. cj[i] = 0, clear the value of M
version, but it will run on any version of Do[c[i] = Input["c"], {i, 1, n}]; z = Input["z"]; B =
Mathematica. In this program we have used Input["B"];
some mathematica codes like as,
i = 1; Do[a[i] = Input["a"], {i, 1, n}]; b =
Input["b"];
Solve[equations, vars] attempts to solve
equations for vars. IB = Inverse[B]; IBb = IB.Transpose[b]; i = 1;
Take[lst, {m, m}] returns a list consisting of While[i <= m, x = Solve[Take[IBb, {i, i}] == 0];
If[condition, true, false] evaluates condition If[d == 1, Do[ca[i] = ((zB.Transpose[a[i]]) - c[i]), {i,
and executes true if condition is True and 1, n}],
executes false if condition is False.
Do[ca[i] = (c[i] - (zB.Transpose[a[i]])), {i, 1, n}]];
Do[expr,{i, imin, imax}] evaluates expr with i = 1; While[i <= n, M = 0; x = Solve[ca[i] == 0];
the value of i changing from imin to imax in Clear[M]; If
increments of 1.
[x != {{}} && x != {},
Print[N[InequalitySolve[(ca[i].{1}).{1} >= 0,
While[condition, expr] evaluates condition,
then expression, repetitively, until condition is p]]]]; i++]; zBb = zB.Transpose[b];
False.
Print[N[MatrixForm[IBb]] // Simplify]; Print[
N[zBb] // Simplify]; Print[
For our program we need an LP problem
which is solved by any method. Then our Array[ca, n] // Simplify // N];
We have generalized and designed the + 7/3 X3 + X5 = 3\n\n X1, X2, X3, X4, X5 >= 0"], {i,
used an example in the input box, so that one z = Input["Input the cost coefficents of Basic
can easily understand which data values he variables. Example:
has to enter in the each input boxes. It makes {{2,3}} in\n\n Z = 2 X1 + 3 X2 + X3\n\n 1/3 X1 + 1/3
the program so easy that any one can use this X2 + 1/3 X3 +
program to analyze the sensitivity of any LP
X4 = 1\n 1/3 X1 + 4/3 X2 + 7/3 X3 + X5 = 3\n\n X1,
problem. The generalized form of the main X2, X3, X4, X5 >= 0"];
program is given below:
B = Input["Input the Matrix B. Example:
<< LinearAlgebra`MatrixManipulation` {{1/3,1/3},{1/3,4/3}} \n in\n\n
zB = z.IB; i = 1;
Output 1
## Optimal Solution:
33.3333
The right hand side column of optimal tableau is: 66.6667
100.
The Optimum value is: z 733.333
The Zero Row: 0. , 0. , 2.66667 , 3.33333 , 0.666667 , 0.
Changing the Objective Function optimal row and the value of z are changed.
Coefficient of Basic Variable The ranges of p in output 3 are like as p - 6,
p 15 and p 6. So the minimum range will
x1, the variable for the daily production level
be 6 p 15. By this we can say that the
of product 1 is a basic variable in this
solution will be optimal if we change the
example. The coefficient of x1 in the objective
value of c[1] by any value in this range.
function is c[1] = 10. If we replace c[1] by p
Hence in order to maximizing the profit we
in our program then the output of the program
can afford the changes in the profit value of
will be as like below Output 3. In Output 3,
product 1 from 6 to 15.
the right hand side is same as before. Only the
Output 3
## Optimal Solution:
The range of p is:
p 6.
p 15.
p 6.
33.3333
The right hand side column of optimal tableau is: 66.6667
100.
The Optimum value is: z 400. 33.3333 p
The Zero Row: 0. , 0. , 0.166667 6. p , 10. 0.666667 p , 0.166667 6. p , 0.
By the same way, we can show the sensitivity 3. D. C. Aucamp and D. I. Steinberg
of the optimal solution of this particular (June 1982), “The Computation of
factory problem for the other changes of data Shadow Prices in Linear
values. Programming”, “The Journal of the
Operational Research Society”, Vol.
V. Conclusion
33, No. 6, pp. 557-565.
In our paper, we have developed a computer
4. W. L. Winston, “Operation Research,
oriented method for analyzing sensitivity of
Application and Algorithms, 3rd
the optimal solution for any changes of data
edition”.
and for any kind of LP problem. And we have
showed sensitivity of the optimal solution of a 5. Kambo, N.S., 1984, “Mathematical
particular factory problem for some changes programming technique,” Affiliated
in data values. Our program is capable of East-West Press Pvt. Ltd., New Delhi.
handling any number of constraints and any
6. G. B. Dantzig, “Linear Programming
number of variables. This method can also be
and extension”, Princeton university
extended for solving any kind of LP
press, Princeton, N.J (1962).
problems. We concluded that our technique is
more efficient for performing sensitivity 7. Ravindran, Phillips and Solberg,
analysis. “Operation Research Principles and
Practice.”
……………..
8. Eugene D., “Schaum’s outlines-
1. J. L. Higle & S. W. Wallace (July-
Mathematica”, Mc-Graw-Hill.
August 2003), “Sensitivity Analysis
and Uncertainty in Linear 9. H. A. Taha, “Operations Research: An
Programming”, Interfaces © 2003 introduction, 6th edition”, Prentice Hill
Informs, Vol. 33, No. 4, pp. 53–60. of India, PVT. LTD., New Delhi
(1997).
2. M. B. Hasan, A. F. M. K. Khan and
M. A. Islam (2001), “Basic Solution 10. Saul I. Gass, “Linear Programming,
of Linear System of Equations through Methods and Applications, third
Computer Algebra”, “Ganit: J. edition”, World Systems Laboratories,
Bangladesh Math”, Soc. 21, pp. 1-7. Inc. The American University.