Linear Programming Exercises
Linear Programming Exercises
Vassilis Kostoglou
E-mail: [email protected]
URL: www.it.teithe.gr/~vkostogl
A company manufactures 3 products a, b and c, which sells € 14, €15 and € 22 per unit
respectively. These prices are constant and independent of the market state they are
addressed to, and it is also supposed that any produced quantity can be sold. For the
manufacturing of these products four types of raw materials are required. The prices of
raw materials, the raw material units needed for each product type and the
corresponding available quantities within a certain time period are included in the
following table.
The company's goal is to determine the quantities of each product which should be
produced in order to achieve the highest profit.
Define in detail the decision variables and form the objective function and all
constraints of the problem.
Product 1 2 3
Machines
Α 9 3 5
Β 5 4 0
C 3 0 2
A transportation company has signed contracts with a big customer for transporting to
him ammunitions, weapons and drugs. The customer has agreed to receive all
quantities transferred to him.
Density Profit
(kilos/cubic palm) (€/kg)
Ammunitions 30 0.20
Weapons 40 0.30
Drugs 20 0.10
Formulate - with all the necessary documentation – the appropriate model to solve this
problem. Comment also on which unit is appropriate to be represented the decision
variables of the problem.
Μ1 Μ2 Μ3 Μ2 or Μ3
Product Α 25 30 50
Product Β 40 15 40 20
A rural family owns 125 acres and has $ 40,000 stock for investment. Each member
can provide 3500 hours of work during the winter months (mid October – mid April) and
4000 hours during the summer. If any of these hours are not necessary then the
younger members of the family can go and work in the nearby farm for $ 5 per hour for
the winter months and $ 6 per hour during the summer.
Income in cash can come from the three crops, from cows and from chickens. No stock
investment is needed for crops. In contrary an investment of $ 1200 for each cow and
$ 9 for each chicken is needed.
The estimated hours of personal work and the income per cultivated hectare for the
three types of crop are the following:
The family wants to determine how much land should be cultivated for each crop type
and how many chickens and cows should be kept to maximize the annual net profit.
Design a linear programming model to solve this problem.
A farmer has 200 acres of land and wants to cultivate potatoes or pumpkins or a
combination of both. He has discovered that there is sufficient demand for these
products and does not consider other alternatives. The maximum yield of potatoes is
five tons per acre, and if pumpkins will grow only three tons per acre will be produced.
The potatoes can be sold at a profit of 50 pounds per ton, while the pumpkins at a profit
of 105 pounds per ton. There is a defined demand for both species. A maximum of 750
tons of potatoes and of 300 tons of pumpkins should be produced per year in order to
be placed freely in the market.
Both seeds will need fertilizers and the ratio for each growing seed has a limit regarding
the available fertilizer. The farmer uses two types of fertilizer, A and B, which are mixed
in the right proportion for each seed. He believes that the mix for potatoes should be
composed of 40% of fertilizer A and 60% of fertilizer B. The mix for the pumpkins
should consist of 55% of fertilizer A and 45% of fertilizer B. Each acre of potatoes
needs 0.4 tons of fertilizer and each acre of pumpkins needs 0.5 tons of fertilizer.
2) Give arguments for how to strengthen this plan, assuming that the optimal solution
has already been calculated.
A cargo plane has three sections for storing goods. Front, middle and tail. These three
parts have capacity limits in weight and space, according to the following table.
Also, the weight of the cargo in the corresponding sections must be in the same
proportion as the weight limits for each department so the plane has balance. The
following four cargoes are given for transfer to a later flight.
Any amount of these cargoes can be accepted for transfer. The goal is to determine
what proportion of these cargoes must be transferred and how to be settled in those
parts of the plane, so as to maximize the profit of the flight.
An investor has the available profitable investment activities A and B for each year of
the next five ones. Every dollar invested at the beginning of the one year in activity A
becomes $1.40 two years later. Every dollar invested in the activity B for each year
becomes $1.70 three years later.
Also, investing activities C and D will be available shortly. Every dollar invested in C at
the beginning of year 2 will become $1.90 at the end of year 5. Every dollar invested in
D at the beginning of year 5 will become $1.30 at the end of year 5.
The investor starts with $50,000 and wants to know the way, which will maximize the
amount of money he will receive at the beginning of the sixth year.
x1/30 + x2/40 1
x1/28 + x2/35 1
x1/30 + x2/25 1
and
x1, x2 0
Solve using the Simplex method, the following linear programming problem:
F = 4x1 + 2x2 - x3 + x4
and
x1 + x2 + x3 + x4 = 100 (A)
x2 + x4 50 (B)
6x1 + 3x2 -1.5x3 +1.5x4 220 (C)
Using the Simplex method for the solution of the problem gives the following optimal
solution (where x5 is the slack variable which cooperates with constraint C and x6 the
artificial variable that cooperates with the constraint Β):
1) From the final Simplex table results there are other optimal solutions.
Explain the reason of this situation and how can this be revealed from the final
table.
2) There are two other basic optimal solutions. Beginning from the table given above,
determine the final table for each of the other best solutions.
3) The production manager prefers the above optimal solution that contains the
variables x1, x2 and x3 at the base. For this he decided to apply this solution
instead of the two alternative ones that were calculated at the question (2).
However he would like to achieve a profit near 160. He may be ready to
slack constraints B and C in order to succeed his goal, as far as variables x1, x2
and x3 continue to have non zero values. What would you advise him?
Function maximization
Base x1 x2 x3 x4 x5 x6 Right
hand side
x3 * 0 1 0 0 2 *
x5 * 0 0 -3 1 -2 *
x2 1 1 0 0 0 -1 *
-f * 0 * -10 0 * -600
where x4 and x5 are the slack variables for the first and the second constraint and x6 is
the artificial variable for the third constraint. Unfortunately, some parts of the table in
which there are asterisks are covered with brown spots.
Robotix manufactures two domestic robots - Mavis and Charles - each with different
capabilities. Both require special circuits, of which only 1000 can be obtained each
week. Mavis takes three of them, and Charles two of them.
Work is limited to 400 hours per week. The construction of each Mavis consumes two
working hours and Charles one hour. Profits are 500 and 300 pounds respectively for
each Mavis and Charles that is sold. The Robotix has signed a contract with a major
customer to make and supply 200 Charles each week.
Mathprog computer program was used to produce the following Simplex method for the
problem of Robotix:
b) With overtime, the company may increase the working hours to 480 hours. Would
you give such an advice?
c) It is foreseen that soon Robotix will have 100 fewer available channels.
How will this change affect the production of company products?
An English wine merchant introduces two types of wine, A and B, from vineyards that
are far away and after the process, puts it in bottles and thus produces his two own
brands, the Fein Wein and Party Plonk. Both wines A and B cost 0.80 and 0.20 pounds
per liter, respectively, including the processing and bottling. The Fein Wein consists of
60% wine A and 40% wine B while the Party Plonk has 20% wine A and 80% wine B.
The merchant shop sells 2 pounds per liter from Fein Wein and 1.20 pounds per liter
from Party Plonk. The processing, bottles and distribution cost 0.5 pounds per liter for
both brands.
The merchant has agreed to buy at least 24,000 liters of wine A this year and there are
available 120.000 liters most of wine B. It is estimated that sales of Fein Wein during
the year will reach 50,000 liters but the demand for the Party Plonk is uncertain. The
merchant has this year only 60,000 pounds to buy the wines A and B.
How many liters of the two brands must the merchant produce to maximize his profit?
An industrial company that is situated in the capital conducts its activities in three
regional branches (factories) that have enough excess capacity. All three factories
have the equipment required and the producing ability of a new specific product and it
has already been decided to use part of the extra capacity for this purpose. The
product can be manufactured in three sizes - large, medium and small - with a net unit
profit of € 35, € 30 and € 25 respectively. The three factories of the company, X, Y and
Z, have the necessary additional manpower and technological equipment to produce
750, 900 and 450 units per day of the new product, respectively, regardless of the
prevailing conditions.
However, the available storage areas are still limiting the rates of production. The
factories X, Y and Z store the daily production of the new product 1300, 1200 and 5000
m2 respectively. Each unit produced of the large size requires for its storage 2m2, each
unit requires a medium size of 1.5m2 and finally each unit's small size requires 1.2m2.
The company's management wants to know the quantities of each size that will
produce each of the factories in order to maximize the total profit.
Of these, on the one hand product A is used for the production of B and C, on the other
hand product B is used for the production of C in the following way: To produce two
units of product B requires the consumption of one unit of product A. To produce one
unit of product C requires the consumption of two units of B and one unit of A.
The company's management wants to invest in all three industries the amount of €
5000000, in order to maximize its profits from the export of the three new products.
Profits from the sale of each unit are in the ratio 1: 3: 11 for products A, B and C
respectively. The production capacities for each € 100000 invested in each of the three
factories are respectively 1000, 500 and 300 units annually for the products A, B and C.
Red Sash Canning company produces cans with anchovies and sardines for super
markets across the country. Production is planned on a monthly basis. The decision for
next month is under consideration at the moment and the company needs your help.
Design an approach you would take in each of the following questions:
1) Formulate the linear programming model with paper and pencil before a computer
program is used.
2) Describe each variable and limitation in such way that any solution will be
explanatory by itself.
Red Sash operates two canning machines which must give 300 hours canning per
month. The company makes frequent checks on the quality of its products. All cans are
electronic examined for defects. Next month 640 hours will be available for electronic
testing.
a) Before taking any final decision, the company wants your recommendations, your
advices and your estimates.
1) Which do you think should be the plan of the enterprise?
2) What total profit will it give?
c) If the budgets of fish goods and canning materials will be combined, can the
company make more profit? If so, how?
Suppose that x1, x2, x3 and x4 represent the numbers of product units 1, 2, 3 and 4
respectively that will be produced the next period. The objective is to maximize the total
profit, using the constraints on the three machines A, B and C. The problem turned into
a linear programming problem under the following model:
and
1.5x1 + 2x2 + 4x3 + 3x4 550 (hours of machine Α)
4x1 + x2 + 2x3 + x4 700 (hours of machine Β)
2x1 + 3x2 + x3 + 2x4 200 (hours of machine C)
x1, x2, x3, x4 0
: LOOK ALL
1) 525.000000
VARIABLE VALUE REDUCED COST
X1 .000000 .050000
X2 25.000000 .000000
X3 125.000000 .000000
X4 .000000 3.500000
LINEAR PROGRAMMING: EXERCISES - V. Kostoglou 38
ROW SLACK OR SURPLUS DUAL PRICES
2) .000000 .300000
3) 425.000000 .000000
4) .000000 1.800000
NO. ITERATIONS = 2
DO RANGE(SENSITIVITY) ANALYSIS?
?yes
RANGES IN WHICH THE BASIS IS UNCHANGED:
OBJ COEFFICIENT RANGES
VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 4.000000 .050000 INFINITY
X2 6.000000 3.000000 .076923
X3 3.000000 9.000000 .999999
X4 1.000000 3.500000 INFINITY
3) It is possible to increase the capacity of engines against 100 hours in total costs
1.50 pounds per hour. Is it worthwhile to do this and if so where should the extra
hours be used? What change will the total profit have?
Unfortunately, evergreen shrubs require twice the attention the deciduous require while
growing, so the nursery can only supply 36000 deciduous and 18000 evergreen
shrubs or any possible combination of these two.
Until recently, the profit margin for deciduous shrubs was three times greater than that
of evergreen, but some change in the market equated them. What effect will this
change cause to the number of shrubs, if the manager of the nursery wants
to maximize the total profit?
LINEAR PROGRAMMING: EXERCISES - V. Kostoglou 42
PROBLEM 23
Suppose you inherited 6000 € and you want to invest them. Once the news are known,
two friends of yours made the offer to become a partner in two different economic
plans, each designed by each friend. In both cases the investment will work for some
time in the summer and you should give some amount. To become a full partner in the
first friend’s project you need 500 € and 400 hours of employment and the
profit (ignoring the waste of time) will be 4500 €. The corresponding figures for the
second project is 400 € and 500 hours with profit 4500 €. But your friends are
quite flexible and give you the chance to do any cooperation you want. The distributed
profit between the partners will be equivalent with the degree of cooperation.
As a busy summer with maximum 600 hours time is expected, you decided to work with
both your friends in any way of cooperation will offer the greatest profit. Solve the
problem and find the right solution, by successively answering the following questions:
A company intends to maximize its global profits by producing and selling three new
products. This problem is formulated as a linear programming model, where B,
R and D represent the number of units in the budget, normal products and luxury
products each week, respectively. There are limitations in the available production
time in sections cutting, sewing and packing and marketing study that lead to low
production levels in normal and luxury goods. The formulation and the solution given by
the linear programming problems’ solution package LINDO is as follows:
: LOOK ALL
MAX 3.75 B + 7.63 R + 8.07 D
SUBJECT TO
2) 1.5 B + 2 R + D 9600 (Cutting department)
3) 4 B + 5 R + 10 D 38400 (Sewing department)
4) B + 1.5 R + D 6000 (Packing department)
5) R 1000
6) D 3000
END
: GO
LINEAR PROGRAMMING: EXERCISES - V. Kostoglou 45
LP OPTIMUM FOUND AT STEP 3
1) 37028.3984
VARIABLE VALUE REDUCED COST
B 0.000000 2.354000
R 1680.000000 0.000000
D 3000.000000 0.000000
NO OF ITERATIONS =
DO RANGE (SENSITIVITY) ANALYSIS?
b) Should the administration increase the capacity of the sewing department at 600
cents if the cost of change is 120 €? If so (or not) why exactly?
c) The cost of construction of one product unit is 10€. What are the selling prices of
the products included in the optimal solution?
d) The profit per unit for each product will increase by 20%.
Will it change the optimal production plan? Why exactly?
e) The administration decided that the budget units should be developed in at least
one quarter of the total units produced.
Give this extra constraint, so it can be given for entry to LINDO.