Sie sind auf Seite 1von 5

Example 2.

5: Feeding an Army
Suppose that two basic types of food are supplied to soldiers in an army:
meats and potatoes. Each pound of meats costs $1, while each pound of potatoes costs $0.25. To
minimize expenses, army officials consider serving only potatoes. However, there are some basic
nutritional requirements that call for meats in a soldiers diet. In particular, each soldier should get at
least 400 grams of carbohydrates, 40 grams of dietary fiber, and 200 grams of protein in their daily
diet. Nutrients offered per pound of each of the two types of food, as well as the daily requirements,
are provided in the following table:

Nutrient

Meat
(Kg / pound)

Potatoes
(Kg / pound)

Daily
Requirement (g)

carbohydrates

0.040

.2

400

dietary fiber

.005

.04

40

protein

.1

.02

200

Consider the problem of finding a minimal cost diet comprised of meats and potatoes that satisfies
the nutritional requirements. Let X and Y denote the number of pounds of meat and potatoes to be
consumed daily.

2.6.2 Simplex method of solving Linear Programming problems


Most of the real world linear programming (LP) problems involve more than two variables. These
problems cannot be conveniently solved by the graphical method. A systematic procedure developed
by George B. Dantzin in 1947 has been proved to be a remarkably efficient method that is used
usually to solve more complex LP problems on todays computers. Except for its use on tiny
problems, this method is always executed on a computer, and sophisticated software packages are
widely available. To approach the optimal solution when using simplex method, the same set of steps
is repeated over and over. Therefore the computational procedure in this method always involve with
an iterative process.

2.6.2.1 The standard form of a Linear Programming Problem


General formulation of LPP can be put in the following compact form;

M.P.Dhanushika

CM4140| Page 16

The general LPP can always be put in the standard form.


The characteristics of the standard form are,
The objective function is of the maximization or minimization type.
All the constraints are expressed in the form of equations except the non-negativity constraints.
(1) Constraints,
are converted into equations by adding a slack variable to each constraint. A slack variable
represents the quantity of unused resource.

(2) Constraints,
are converted into equations by subtracting a non-negative surplus variable from the left
hand side of the inequality. The surplus variable tells us how much the solution exceeds the
minimum requirement.

The right hand side of each constraint equation is non-negative.


All decision variables are non-negative.

Write the standard form for the following LPP.


Example 2.6:
Maximize Z = 3x1 + 2x2
Subject to,
2x1 + x2 2,
3x1 + 4x2 12,
and x1, x2 0
Example 2.7:
Maximize Z = 3x1 + 2x2+ 5x3
Subject to,
2x1 - 3x2 3,
x1 + 2x2 + 3x3 5,
3x1 + 2x3 2,
and x1, x2 0
M.P.Dhanushika

CM4140| Page 17

2.6.2.2 Simplex method in tabular form to solve maximization problems

Step 1: Convert the model into the standard form


Since slack variables are unused resources they contribute nothing to the profit (zero profit) of the
objective function. Therefore, objective function coefficient of a slack variable is zero. Also the
simplex method requires that any variable that appear in one equation must appear in all the
equations. This can be done by proper placement of a zero coefficient.

Step 2: Determine an initial feasible solution


An initial feasible solution is obtained by setting decision variables to zero. Thus, slack variables are
equal to the constant terms (right-hand-side value) in the constraint equations.
- The variables that are set equal to zero are called non-basic variables.
- The variables that have positive value are called basic variables.
- The set of basic variables is called the basis.

Step 3: Construct the Initial Simplex Table


The initial feasible solution is summarized in a table form known as the first simplex table.

Basis = The basic variables in the current basic feasible solution.


Solution = The solution values for corresponding variables in the basis.

Step 4: Determine which variable to enter into the basis


Select an entering variable using the optimality condition. Stop if there is no entering variable;
last solution is optimal. This is called as the key column or pivot column.
Optimality conditionThe entering variable in a maximization (minimization) problem is the non-basic variable having
the most negative (positive) coefficient in the Z-row. Ties are broken arbitrary.
M.P.Dhanushika

CM4140| Page 18

Step 5: Determine which variable to leave the basis


We must decide which basic variable will have to leave the basis to make room for the entering
non-basic variable. To determine the leaving variable, feasible condition will be used. This row
is called as the key row or pivot row.
Feasible conditionFor the maximization and minimization problems, the leaving variable is the basic variable
associated with the smallest non negative ratio. Ties are broken arbitrary.
Ratio = value in the solution column / corresponding pivot column value

Step 6: Compute the new basic solution by using appropriate Gauss-Jordan computations.

(1)

Compute the new values for the pivot row


New pivot row value = Current pivot row / pivot element

The value at the intersection of the pivot column and pivot row is called key element or pivot
element.

(2)

Convert other elements except pivot element in the pivot column into 0
New row value = current row value
(Its pivot column coefficient value New pivot row value)

If all Z-row coefficients are zero or non negative, an optional solution has been reached. If this is
not the case, return to step 4. The optimum is reached at the iteration where all the Z-row
coefficients of the non-basic variables are non-negative (for minimization problem, it should be
non-positive)

Example 2.8:
Solve following maximization problem by using the simplex method
Z = 7x1 + 5x2 (maximize)
2x1 + x2 100
4x1 + 3x2 240
x1, x2 0
M.P.Dhanushika

CM4140| Page 19

Example 2.9:
Reddy Mikks products both interior and exterior paints from two raw materials, M1 and M2. The
following table provides the basic data of the problem.

A market survey indicates that the daily demand for interior paint cannot exceed that of exterior
paint by more than 1 ton. Also, the maximum daily demand of interior paint is 2 tons. Reddy
Mikks wants to determine the optimum (best) product mix of interior and exterior paints that
maximizes the total daily profit.
Example 2.10:

A furniture manufacturer plans to make two products chairs and tables. From the available
resources which consists of 400 square feet of type A timber and 450 man hours of labors. It is
known that to make a chair requires 5 square feet of timber and 10 man hours and yield a profit
of Rs. 45, while each table uses 20 square feet and 15 man hours and as a profit of Rs. 80. The
problem is to determine how many chairs and tables can make keeping with fixed resources
constraints so that maximize the profit.
Example 2.11:
A soft drink firm has two bottling plants. One allocated at P and other at Q. Each plant produces

3 different soft drinks A, B, and C. the capacity of the two plants in number of bottles per day are
given below.

A market survey indicates during the next month there will be a demand of 24000 bottles of A,
16000 of B and 48000 of C. the operating cost per day of running plants P & Q are respectively
600 and 400 in dollars. How many days should the firm run each plant in next month so that the
production cost is minimized while still meeting the market demand?

M.P.Dhanushika

CM4140| Page 20

Das könnte Ihnen auch gefallen