The Kalo Fertilizer Company makes a fertilizer using two chemicals that provide nitrogen, phosphate, and potassium. A pound of ingredient 1 contributes 10 ounces of nitrogen and 6 ounces of phosphate, whereas a pound of ingredient 2 contributes 2 ounces of nitrogen, 6 ounces of phosphate, and 1 ounce of potassium. Ingredient 1 costs $3 per pound, and ingredient 2 costs $5 per pound. The company wants to know how many pounds of each chemical ingredient to put into a bag of fertilizer to meet minimum requirements of 20 ounces of nitrogen, 36 ounces of phosphate, and 2 ounces of potassium while minimizing cost. Formulate a linear programming model for this problem and solve using the simplex method.
Find the minimum value of the function
F=3x1+5x2
subject to the constraints:
1.This is a necessary condition for solving the problem:
the numbers on the right parts of the constraint system must be non-negative.
This condition is done.
2. This is a necessary condition for solving the problem:
all constraints must be equations.
S1 ≥ 0, S2 ≥ 0, S3 ≥ 0. The entered variables S1, S2, S3, are called slack variables.
3. Finding the initial basis and the value of the function F which corresponds to the found initial basis.
What is a basis?
A variable is called a basic variable for an equation if it enters into this equation with a coefficient of one and does not enter into other equations system (provided that there is a non-negative number on the right side of the equation).
If each equation has a basic variable, then they say that the system has a basis.
Variables that are not basic are called non-basic.
What is the idea of the simplex method?
Each basis is corresponded to one function value. One of them is the minimum value of the function F.
We will move from one basis to another.
The next basis will be chosen in such a way that the value of the function F will be no more than we have now.
Obviously, the number of possible bases for any problem is not very large.
So sooner or later the answer will be received.
How will we move from one basis to another?
It is more convenient to record the solution in the form of tables. Each row of the table is equivalent to a system equation. The highlighted row consists of the coefficients of the function (see the table below). This allows us not to rewrite variables every time. It saves time.
In the highlighted row, select a maximum negative coefficient (we can select any negative coefficient).
This is necessary in order to get a value of the function F no more than we have.
Column is selected.
For the positive coefficients of the selected column, we count the coefficient Θ and select the minimum value.
This is necessary in order to get non-negative numbers in the right part of the equations after moving to another basis.
Row is selected.
An element is found that will be basic. Next, we will need to calculate.
Does our system have a basis?
There is not a basis in our system. We cannot begin to solve our problem.
We need to find it. To do this, we will solve an auxiliary problem.
If there is not a basic variable in the equation, add an artificial variable to it.
R1 ≥ 0, R2 ≥ 0, R3 ≥ 0. The entered variables R1, R2, R3 are called artificial variables.
Let's consider a function W and we will find its minimum value.
W=R1+R2+R3W=(20-10x1-2x2+S1)+R2+R3=20-10x1-2x2+S1+R2+R3W=20-10x1-2x2+S1+(36-6x1-6x2+S2)+R3=56-16x1-8x2+S1+S2+R3W=56-16x1-8x2+S1+S2+(2-x2+S3)=58-16x1-9x2+S1+S2+S3
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see system)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind.
x1 = 0 x2 = 0 S1 = 0 S2 = 0 S3 = 0
R1 = 20 R2 = 36 R3 = 2 => W = 58
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the highlighted row in the table)
x2 = 0 S1 = 0 S2 = 0 S3 = 0 R1 = 0
x1 = 2 R2 = 24 R3 = 2 => W - 26 = 0 => W = 26
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the highlighted row in the table)
x2 = 0 S2 = 0 S3 = 0 R1 = 0 R2 = 0
x1 = 6 S1 = 40 R3 = 2 => W - 2 = 0 => W = 2
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see table)
Function W contains only non-basic variables. Therefore, the value of the function W for this basis can be found in the mind. (see the highlighted row in the table)
S2 = 0 S3 = 0 R1 = 0 R2 = 0 R3 = 0
x1 = 4 x2 = 2 S1 = 24 => W - 0 = 0 => W = 0
There are not any negative coefficients in the highlighted row. Therefore, the minimum value of the function W was found.
The basis was found without artificial variables.
The columns corresponding to artificial variables can be deleted.
As a result, our system has the form:
F=3x1+5x2F=3*(4+1/6S2-S3)+5x2=12+5x2+1/2S2-3S3F=12+5*(2+S3)+1/2S2-3S3=22+1/2S2+2S3
Non-basic variables are zero. In the mind, we can find the values of the basic variables. (see system)
Function F contains only non-basic variables. Therefore, the value of the function F for this basis can be found in the mind.
S2 = 0 S3 = 0
x1 = 4 x2 = 2 S1 = 24 => F = 22
The initial basis was found. The value of the function F corresponding to the initial basis was found.
4. Finding a minimum value of the function F.
There are not any negative coefficients in the highlighted row. Therefore, the minimum value of the function F was found.
Result:
x1 = 4 x2 = 2
Fmin = 22
Comments
Leave a comment