Linear Programming Through Solver Tool in Excel
Linear Programming Through Solver Tool in Excel
You may want to solve a system of nonlinear equations in your homework. You can do
this in a wide variety of ways, but a simple way to find a solution is to use Microsoft
Excel's Solver tool. Be warned that Solver is NOT a very robust tool and may fail to find
solutions! In general, finding roots to nonlinear functions is a very difficult problem.
Excel does a poor job compared to more powerful programs such as Matlab, but it will
suffice for simple problems.
As a very simple example, let's suppose you want to solve a system of linear equations
using Solver. (This is a bad idea, because there are exact methods for linear equations,
but this is just an example.) Consider
3x + y + 2 = 0
x + 2y + 5 = 0
We can use linear algebra to find the solution, which is x = 0.2, y = -2.6. You can use the
Solver tool in Excel to find the solution to the above equations.
Example:
He has a total sum of Rs. 2000000 (Twenty Lakhs) available for investment for this year.
But these options have some limitations or rules which need to be followed:
How much amount should he invest for the year in each option to maximize his returns?
Solution:
This is a typical optimization problem in which there is an aim and some constraints and
some values which u need to find.
One way is hit & trial : Other is use Linear Programming technique
Mathematically there is a manual Linear programming technique called simplex method
by which this can be solved. But since we already have so many software tools where this
logic is already built there is no need to do it manually—we can use excel’s solver tool to
solve this.
Objective Function:
Maximize Total Return R = (R1+R2+R3+R4)
Similarly,
R2 = return from Option 1 investment
Assume he invested X2 amount in option2
return would be R2 = 0.125*X2 (12.5% multiplied by X2)
Similarly,
R3 = return from Option 3 investment
Assume we invested X3 amount in option3
return would be R3 = 0.118*X3 (11.8% multiplied by X3)
Similarly,
R4 = return from Option 4 investment
Assume he invested X4 amount in option4
return would be R4 = 0.13*X4 (13% multiplied by X4)
Constraints:
1. Total invested amount cannot be more than Twenty Lakhs (which he has)
Mathematically this means: X1+X2+X3+X4 <= 2000000
3. Since X1,X2,X3 & X4 are already between lower bound & upper bound we need
n’t define non-negativity constraints i.e.( X1>=0,X2>=0,X3>=0 and X4>=0)
Now we need to simply put this model in Excel Solver like the process shown below &
get the results:
***********************************************************************
*