Linear Programming Theory
Linear Programming Theory
Vassilis Kostoglou
E-mail: [email protected]
URL: www.it.teithe.gr/~vkostogl/en
• In real life there are constraints in all types of resources making them limited
- Conversion of a stated problem into a mathematical model that abstracts all the
essential elements of the problem
- Exploration of different solutions of the problem
- Finding out the optimal of most suitable solution
Linear programming requires that all the mathematical functions of the model are
linear functions.
Resources typically include raw materials, manpower, machinery, time, capital, space,
volume etc.
As its name implies, the LP model consists of linear objective function and linear
constraints, implying that the variables of the model have a proportionate relationship.
1928 – John von Neumann published the Relative Central Theorem of Game
Theory
1944 – Von Neumann and Morgenstern published the Theory of Games and
Economic Behavior
1936 – W.W. Leontief published "Quantitative Input and Output Relations in the
Economic Systems of the US" which was a linear model without objective function
Air Force initiated the project SCOOP (Scientific Computing of Optimum Programs).
SCOOP began in June 1947 and at the end of that summer Dantzig and
associates had developed:
1) An initial mathematical model of the general linear programming problem.
2) A general method of solution called the Simplex method.
3. Linearity: the increase of labour input will cause a proportionate increase of output
5. Divisibility: it is assumed that resources and products can be divided into fractions
(in practice these fractions are not possible, like production of one-third of a
computer - in these cases a modification of Linear Programming called Integer
Programming can be used)
2. Allocating police patrol units to high crime areas in order to minimize response time
to calls.
3. Scheduling bank tellers so that needs are met during each hour of the day while
minimizing the total labour cost.
4. Selecting the product mix in a factory to make best use of machine and labour
hours available while maximizing the company's net profit.
5. Picking blends of raw materials in animal feed production plants to produce finished
feed combinations at minimum cost.
8. Allocating the available renting space in a new shopping mall so that to maximize
the revenues of a leasing company.
4. The objective function and the constraints in linear programming problems must be
expressed in terms of linear equations or inequalities.
The objective function and the constraints exhibit constant scale returns.
Τhe additivity assumption: There are no interactions between the decision variables.
The continuity assumption: Variables can take any value within a given feasible
range.
A LP problem in which all the decision variables must have integer values is called an
integer programming problem.
A problem in which only some of the decision variables must have integer values is
called a mixed-integer programming problem.
Sometimes, some (or all) of the decision variables must have the value of either 0 or 1.
Such problems are then called zero-one mixed-integer programming problems.
Simplex method cannot be used to such problems. Advanced methods are available for
this purpose.
max F = 3*x1+4*x2+2*x3
x1 0, x2 0, ... , xn 0
max f (X) C * X
with constraints
A * X P0 X0
where
a11 a12 ... a1n x1 b1
a a ... a x b
21 22 2n 2 2
A
. . . .
X
.
P0
.
. . . . . .
. . . . . .
an1 an 2 ... ann xn
bm C [c1 c2 ... cn]
Restrictive line
A straight line corresponding to a constraint of the model.
Solution
Every combination of the decision variables’ values.
Feasible solution
A solution satisfying all the constraints.
Slack value
Any excess of an available resource (constraint symbol < or <).
Surplus value
Any "surpassing" (surplus) of a requirement (constraint symbol > or >).
Auxiliary variables
Variables corresponding to slack values and surplus values.
Optimal solution
The feasible solution of an extreme point that gives to the objective function the
optimal value (maximum or minimum).
The optimal solution can be only one; however there are a case with unlimited
optimal solutions or no optimal solution or the value of the objective function tends
to infinity. In every case the amount of feasible solutions of an extreme point is
finite. When a feasible solution of an extreme point is better than all its neighboring
then this solution is the optimal.
Optimal value
The value of the objective function that corresponds to the optimal solution.
The number of working hours required for each device type in each department is listed
in the following table.
Questions:
Decision variables:
The production quantities of the four TV types: x1, x2, x3, x4
Objective function:
Maximization of the total profit - F = 25*x1 + 30*x2 + 40*x3 + 100*x4
with constraints
12 x1 15 x2 15 x3 25 x4 2500
10 x1 12 x2 13x3 20 x4 3000
(1 / 2) x1 (3 / 5) x2 2 x3 2 x4 240
x1 50
x2 50
and
x1 , x2 , x3 , x4 0
x1 50 x1 50 0 x1 0
x2 50 x2 50 0 x2 0
x1 x1 50
and
x2 x2 50
indicates that
x1, x2 , x3 , x4 0
where
x1 x1 50 x2 x2 50 F F 2750
The unit numbers of these three constituents contained in each unit of weight (kg) of
the three foods and the food unit costs are shown in the following table.
Carbohydrates 3 1 1
Proteins 4 3 4
Vitamins 1 3 1
Cost (€/kg) 10 1 2
After some time a new nutrient requirement consisting of 7 units of calcium has been
added to housewife’s dietary. Each kg of meat, potatoes and vegetables contain 2, 1
and 4 units of calcium, respectively.
How this additional requirement of the new ingredient affects the quantities that must
be purchased with a minimum cost?
Decision variables:
The quantities (kg) of meat, potatoes and vegetables - x1, x2, x3
Objective function:
Minimization of total cost:
F = 10*x1 + 1*x2 + 2*x3
min F 10x1 x2 2 x3
with constraints
3 x1 1x2 1x3 8
4 x1 3 x2 4 x3 15
1x1 3 x2 1x3 6
and
x1 , x2 , x3 0
2 x1 1x2 4 x3 7
When the problem with the new constraint is solved the influence of the new nutrient
to the cost and composition of the diet can be determined.
Develop the appropriate mathematical model to determine the mix of production that
maximizes the total net profit.
Decision variables:
The number of valves of type Α and Β produced per hour - x1, x2
Constraints:
There are not obvious constraints originating neither from the production process
nor from the capacities of the 3 phases.
The only constraint is time; essentially the hourly rates of valves production.
Lathe (phase 1):
In one hour it produces 30 valves Α or 40 valves Β
one unit of type Α is produced in 1/30 of the hour, while one unit of type Β in 1/40 of
the hour x1 units of type Α in x1/30 hours and x2 units of type Β in x2/40 hours
total required time: x1/30 + x2/40
The time constraint of lathe is: x1/30 + x2/40 1 (hour)
7 13
max F x1 x2
6 10
with constraints
x1 x2
1
30 40
x1 x2
1
28 35
x1 x2
1
30 25
and
x1 , x2 0
Each refrigerator type needs a different number of working hours in each department.
So, each batch of 12 refrigerators "no frost" needs 60, 80 and 20 working hours in
departments F, A and P respectively, while the respective batch of 12 refrigerators
"freezer" needs 70, 85 and 10 working hours in each of the three departments
respectively. The staffing of the departments is such, that the working hours available
to each of them are 2400, 3000 and 600 respectively during a working month.
Design a monthly production schedule minimizing the total idle time of the staff.
Decision variables:
Number of batches of the 2 refrigerators types - xNF, xF
The difficulty of the problem lies in the creation of the objective function as there are no
economic data, the aim being to minimize the unused time.
Thus we can define new variables x1, x2, and x3, symbolizing the unused (idle) times of
departments F, A and P respectively.
with constraints
60 x NF 70 xF 2400
80 x NF 85 xF 3000
20 x NF 10 xF 600
and
xNF , xF 0
Nori & Leets Co., one of the largest steel producers in the world, is located next to
Steeltown and is nearly the sole employer of its inhabitants. Steeltown grew and
progressed rapidly along with the company, which now employs nearly 50.000 of its
inhabitants. For this reason the mentality of its residents for many years has been:
"whatever is good for Nori & Leets is good for the city too." However this has now
changed, because uncontrolled air pollution from factory furnaces has altered the city
environment and endangered the health of the population.
A recent uprising of the shareholders led to the election of a new enlarged managing
board. New management is determined to pursue a responsible social policy and has
already discussed with officials of the municipality and representatives of the citizens
about what should be done concerning the problem of air pollution. They have mutually
concluded to strict specifications of air quality for city’s atmosphere.
The managing board instructed company’s engineers to determine how the required
decreases can be achieved in the most economical manner.
All these methods have some specific technological limits on the amount of the
emission of the pollution factors that can wipe out as shown in the table below.
Nevertheless, these methods can be used in any fraction (percentage) of their potential
of pollution mitigation. Moreover, as the function of the three methods is independent,
the emission reduction achieved by each of them is not significantly affected by
simultaneous use of anyone of the others.
After the collection of the above data it became obvious that none of the three methods
was sufficient itself to achieve all necessary reductions in environmental pollution.
However, the combination of all methods in full capacity on the one hand would be
more than enough, and on the other hand the total cost would be prohibitive for the
company if, as natural, the prices of its products should continue to be competitive.
It was also specified that the cost of a method’s reduced use is directly proportional to
the percentage of its capacity. Thus, for any given fraction used, the corresponding
annual cost is equal to the appropriate percentage of the full cost. The company then
conducted detailed costing to estimate the total annual cost for the implementation of
each of the three pollution mitigating methods. Apart of the increased operating and
maintenance costs, it was also given emphasis in both the fixed cost of each method
(which was converted to its equivalent on annual basis) and at any intermediate loss in
the efficiency of the production process. This analysis resulted in the following
estimates of the annual cost for using each method to full capacity.
The final stage of the preliminary study was the development of a general frame for the
overall plan of the company on pollution mitigation. The project consists of determining
the methods which will be used for the reduction of the pollution and the possible
fractions of their use.
Due to the combined nature of the problem of determining the plan that meets all the
requirements at minimum cost, an Operational Research group was formed to solve it.
The group adopted an approach using Linear Programming. Which was it?
Decision variables:
x1: heighten the blast furnaces
x2: heighten the open hearth furnaces
x3: filter use in the blast furnaces
x4: filter use in the open hearth furnaces
x5: fuels improvement in the blast furnaces
x6: fuels improvement in the open hearth furnaces
where
xi (i = 1, 2, …6) the fraction used of the corresponding method
Total cost:
8x1+10x2+7x3+6x4+11x5+9x6
12 x1 9 x2 25 x3 20 x4 17 x5 13x6 60
35 x1 42 x2 18 x3 31x4 56 x5 49 x6 150
37 x1 53x2 28 x3 24 x4 29 x5 20 x6 125
x1 , x2 , x3 , x4 , x5 , x6 1
and
x1 , x2 , x3 , x4 , x5 , x6 0
A paper industry produces among other products white high resolution paper, which is
wrapped in two meters long pieces in standardized cylinders of one meter height. The
white paper is cut into a number of smaller and probably different lengths, with fixed
height of one meter, in order to meet all customers’ orders.
The paper industry received last week the following orders. The lengths are expressed
in palms (tenths of meter, i.e. 10 cm), which is the usual measure of this type of paper.
Weekly orders
Design an appropriate mathematical model for solving the problem of the paper
industry with the use of Linear Programming.
It is not possible to cut more than three pieces of white paper from one cylinder
(e.g. 3*5.5 = 16.5 and 3.5 palms as wastage - this way can be symbolized as: 5.5, 5.5,
5.5 – wastage 3.5).
Each cylinder can be cut to one, two or three pieces by the following 13 possible ways
(lengths of pieces - wastage):
(9, 0, 0 - 11) - (9, 9, 0 - 2) - (9, 7, 0 - 4) - (9, 5.5, 0 - 5.5) - (9, 5.5, 5.5 - 0) -
(7, 0, 0 - 13) - (7, 7, 0 - 6) - (7, 7, 5.5 - 0.5) - (7, 5.5, 0 - 7.5) - (7, 5.5, 5.5 - 2) -
(5.5, 0, 0 – 14.5) - (5.5, 5.5, 0 - 9) and (5.5, 5.5, 5.5 - 3.5).
Every possible way of cutting the blotting paper can be represented by a variable xi.
Constraints:
2) Change the inequality direction of the required constraints, so that the right hand
sides of all constraints are non-negative numbers. Consequently, if the right hand
side of a constraint is negative, a change of the sign and the inequality direction is
needed (multiplying both sides by -1).
4) Construction in the left hand side of the structure constraints of a complete unary
table by adding the appropriate number of new variables, called artificial variables.
2. The part of the level (or of the space in three-dimensional problems), which’s all
points verify a specific constraint is identified for every constraint.
[The fastest way is to check whether the intersection of the axes (coordinate 0,0)
verifies the constraint (what is valid for this coordinate will also be valid for all points
belonging to the same semi-level)]
3. The intersection of all semi-levels is defined, which verifies all the constraints.
Consequently all vertices of the intersection are being defined.
4. The objective function f(x) is plotted, consisting of the family of parallel lines with a
standard direction coefficient. The different values of the objective function are
represented by the corresponding parallel lines.
6. The values of the lines crossing the intersection vertices are calculated. The vertex,
from which passes the line with the highest (smallest in minimization problems)
value is the optimum solution of the problem. The values of the variables consisting
the optimum solution are the coordinates of this vertex.
Thus, the maximum value of f(x) is 13, the corresponding line meets vertex C, and the
values of the variables are x1 = 9 and x2 = 2.
Other (polynomial type) algorithms have been developed for solving LP problems:
- Khachian algorithm (1979)
- Kamarkar algorithm (AT&T Bell Labs, mid 80s)
None of these algorithms has been able to beat Simplex in actual practical applications;
hence Simplex (in its various forms) is and will most likely remain the most dominant
LP algorithm for at least the near future.
3. Move to the adjacent extreme point which offers (or at least appears to offer)
the best improvement in the objective function.
Step 3: By elementary operations between the lines of the current tableau the next
Simplex tableau is indicated, in which are reflected the changes that
practically lead to the next vertex of the feasible region.
Step 4: The new (current) basic feasible solution is being tested whether it is optimal.
If this solution is optimal then the procedure stops,
otherwise: Move to step 1.
1. Introduction to the base of the variable xs with the largest positive coefficient cs
(lowest negative in minimization problems).
2. Removal from the base of the variable xr with the smallest positive quotient br/ars,
where ars > 0.
3. Formulation of a new Simplex tableau replacing into the base variable xr with xs.
6. Back to step 1
LINEAR PROGRAMMING - V. Kostoglou 78
The above procedure is repeated continuously until one of the followings occurs:
a) All cost coefficients become negative or zero.
In this case the optimal solution has been found.
or
b) All the ais coefficients become negative or zero.
In this case the problem is unbounded and there is no finite solution.
x1 + x2 + x4 = 100
x2 + x3 + x5 = 200
x1 + x2 + x3 + x6 = 400
x2 + x7 = 80
Base x1 x2 x3 x4 x5 x6 x7 R.H.
x4 1 1 0 1 0 0 0 100
x5 0 1 1 0 1 0 0 200
x6 1 1 1 0 0 1 0 400
x7 0 1* 0 0 0 0 1 80
-f 3 4 2 0 0 0 0 0
x4 1* 0 0 1 0 0 -1 20
x5 0 0 1 0 1 0 -1 120
x6 1 0 1 0 0 1 -1 320
x2 0 1 0 0 0 0 1 80
-f 3 0 2 0 0 0 -4 -320
x1 1 0 0 1 0 0 -1 20
x5 0 0 1* 0 1 0 -1 120
x6 0 0 1 -1 0 1 0 300
x2 0 1 0 0 0 0 1 80
-f 0 0 2 -3 0 0 -1 -380
x1 1 1 0 1 0 0 0 100
x3 0 1 1 0 1 0 0 200
x6 0 -1 0 -1 -1 1 0 100
x7 0 1 0 0 0 0 1 80
-f 0 -1 0 -3 -2 0 0 -700
Optimal solution:
x1 = 100, x2 = 0, x3 = 200, x4 = 0, x5 = 0, x6 = 100, x7 = 80 and maxf = 700
2. Construction of the first Simplex tableau, putting an extra line at the bottom with the
coefficients of the artificial function F under those of the initial function f.
4. Repetition of the minimization procedure for function F, until it takes the value zero
(where all the cost coefficients become negative or zero).
5. Removal of the coefficient row of F and of the columns of all artificial variables.
7. Repetition of the minimization procedure for function f, until all cost coefficients
become positive or zero.
minf = x1 + 2x2
Base x1 x2 x3 x4 x5 x6 R.H.
x3 2 1 1 0 0 0 6
x5 1 1 0 0 1 0 4
x6 1* 3 0 -1 0 1 8
-f 1 2 0 0 0 0 0
-F -2 -4 0 1 0 0 -12
Base x1 x2 x3 x4 R.H.
x3 0 0 1 -½ 0
x1 1 0 0 ½ 2
x2 0 1 0 -½ 2
-f 0 0 0 ½ -6
• Infeasibility:
Occurs when a model has no feasible point.
• Unboundness:
Occurs when the objective function can become infinitely large (max) or infinitely
small (min).
• Alternate solution:
Occurs when more than one point optimizes the objective function
A manufacturer, named Giga Ltd., has fixed amounts of different resources such as
raw material, labour, and equipment.
The quantity of the ith resource required to produce one unit of the jth product is known.
The decision maker wishes to produce the combination of products that will maximize
total income.
The raw material requirements, space needed for storage, production rates, and selling
prices for these products are given in the following table.
Product
I II
Storage space (m2 /unit) 4 5
Raw material (kg/unit) 5 3
Production rate (units/hr) 60 30
Selling price ($/unit) 13 11
The total amount of raw material available per day for both products is 1575 kg.
The total storage space for all products is 1500 m2, and a maximum of 7 hours per day
can be used for production.
When the decision variables are more than two, it is always advisable to use Simplex
method to avoid a lengthy graphical procedure.
The Simplex method is not used to examine all the feasible solutions.
It deals only with a small and unique set of feasible solutions, the set of vertex points
(i.e. extreme points) of the convex feasible space that contains the optimal solution.
The application of the Simplex method yielded the following optimum production
programme for Giga:
The company can maximize its sale income to € 4335 by producing 270 units of
product I and 75 units of product II. There will be no surplus of raw materials or
production time, but there will be 45 units of unused storage space.
• Which is the income value (or marginal value) of each additional unit of each type of
resources?
• Which is the maximum cost (or marginal cost) that they should be willing to pay for
each additional unit of resources?
15 16
Z S2 S 3 $4335
7 7
that is,
15 16
Z $4335 S2 S3
7 7
As S1, S2 and S3 represent the surplus resources, negative values of these variables
(i.e., -S1, -S2, -S3) represent additional units of these resources that can be made
available. The income values (or marginal values) of additional units of these resources
can be obtained by taking the partial derivatives of Z with respect to -S1, -S2 and -S3.
Z
Storage space $0
( S1 )
Z 15
Raw materials $
( S ) 7
2
Z 16
Production time $
( S3 ) 7
Thus, the marginal values of additional units of resources can be obtained directly from
the coefficients of the objective function in the last tableau of a Simplex solution.
If the actual cost of an additional unit of these resources is smaller than the marginal
value, the company should be able to increase its income by increasing production.
However, the marginal values above are valid only as long as there is surplus storage
space available.
This analysis helps to test the sensitivity of the optimal solution with respect to changes
of the objective function coefficients, the coefficients in the constraints’ inequalities, or
the constant terms (right hand sides) of the constraints. For example in the above case
study:
The actual selling prices (or market values) of the two products may vary from time
to time. Over which ranges can these prices change without affecting the optimality
of the present solution?
Will the present solution remain the optimal solution if the amount of raw materials,
production time or storage space is suddenly changed because of shortages,
machine failures or other unexpected events?
The amount of each resource type needed to produce one unit of product type can
be either increased or decreased. Will such charges affect the optimal solution?