Linear Programming Theory

104
LINEAR PROGRAMMING 1 LINEAR PROGRAMMING Vassilis Kostoglou E-mail: [email protected] URL: www.it.teithe.gr/~vkostogl/en

description

Linear Programming

Transcript of Linear Programming Theory

Page 1: Linear Programming Theory

LINEAR PROGRAMMING 1

LINEAR PROGRAMMING

Vassilis Kostoglou

E-mail: [email protected] URL: www.it.teithe.gr/~vkostogl/en

Page 2: Linear Programming Theory

LINEAR PROGRAMMING 2

The problem of limited resources • Every business activity requires resources (means)

• There are many types of resources

– Capital

– Human resources

– Equipment

– Available time

– Raw materials

• Existing constraints in every type of resources

• The problem: the optimal allocation of limited resources

Page 3: Linear Programming Theory

LINEAR PROGRAMMING 3

What is Mathematical Programming? Mathematical programming is used to find the best or optimal solution to a problem that requires a decision or set of decisions about how best to use a set of limited resources to achieve a state goal of objectives. Steps involved in Mathematical Programming - Conversion of 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 most suitable or optimum solution.

Linear programming requires that all the mathematical functions in the model be linear functions.

Page 4: Linear Programming Theory

LINEAR PROGRAMMING 4

What is Linear Programming (LP)? A mathematical technique to help plan and make decisions relative to the trade-offs necessary to allocate resources. Will find the minimum or maximum value of the objective. Guarantees the optimal solution to the model formulated. Linear programming is a widely used mathematical modeling technique to determine the optimum allocation of scarce resources among competing demands. Resources typically include raw materials, manpower, machinery, time, money and space.

Page 5: Linear Programming Theory

LINEAR PROGRAMMING 5

The technique is very powerful and found especially useful because of its application to many different types of real business problems in areas like finance, production, sales and distribution, personnel, marketing and many more areas of management. As its name implies, the linear programming model consists of linear objectives and linear constraints, which means that the variables in a model have a proportionate relationship.

Page 6: Linear Programming Theory

LINEAR PROGRAMMING 6

Historical perspective 1928 – John von Neumann published related central theorem of game theory.

1944 – Von Neumann and Morgenstern published 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. 1939 – Kantoravich (Russia) actually formulated and solved a LP problem. 1941 – Hitchcock poses transportation problem (special case of LP). WW II – Allied forces formulate and solve several LP problems related to military.

Page 7: Linear Programming Theory

LINEAR PROGRAMMING 7

A breakthrough occurred in 1947...

US Air Force wanted to investigate the feasibility of applying mathematical techniques to military budgeting and planning.

George Dantzig had proposed that interrelations between activities of a large organization can be viewed as a LP model and that the optimal program (solution) can be obtained by minimizing a (single) linear objective function.

Air Force initiated project SCOOP (Scientific Computing of Optimum Programs) SCOOP began in June 1947 and at the end of the same 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.

Page 8: Linear Programming Theory

LINEAR PROGRAMMING 8

Essentials of a Linear Programming model For a given problem situation, there are certain essential conditions that need to be solved by using Linear Programming. 1. Limited resources: limited number of labour, material equipment and finance.

2. Objective: refers to the aim to optimize (maximize the profits or minimize the costs). 3. Linearity: increase in labour input will have a proportionate increase in output. 4. Homogeneity: products, workers, efficiency, and machines are assumed to be identical. 5. Divisibility: it is assumed that resources and products can be divided into fractions (in case the fractions are not possible, like production of one-third of a computer - a modification of linear programming called integer programming can be used).

Page 9: Linear Programming Theory

LINEAR PROGRAMMING 9

Some characteristic LP applications 1. Scheduling school buses to minimize total distance traveled.

2. Allocating police patrol units to high crime areas in order to minimize

response time to 911 calls. 3. Scheduling tellers at banks so that needs are met during each hour of the day while

minimizing the total cost of labour. 4. Selecting the product mix in a factory to make best use of machine- and labor-

hours available while maximizing the firm’s profit. 5. Picking blends of raw materials in feed mills to produce finished feed

combinations at minimum costs.

Page 10: Linear Programming Theory

LINEAR PROGRAMMING 10

6. Determining the distribution system that will minimize total shipping cost. 7. Developing a production schedule that will satisfy future demands for a firm’s

product and at the same time minimize total production and inventory costs. 8. Allocating space for a tenant mix in a new shopping mall so as to maximize

revenues to the leasing company.

Page 11: Linear Programming Theory

LINEAR PROGRAMMING 11

Requirements of an LP problem 1. LP problems seek to maximize or minimize some quantity (usually profit or cost)

expressed as an objective function.

2. The presence of restrictions, or constraints, limits the degree to which we can pursue our objective.

3. There must be alternative courses of action to choose from. 4. The objective and constraints in linear programming problems must be expressed in

terms of linear equations or inequalities.

Page 12: Linear Programming Theory

LINEAR PROGRAMMING 12

A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear constraints. The linear model consists of the following components: - A set of decision variables

- An objective function

- A set of constraints

Page 13: Linear Programming Theory

LINEAR PROGRAMMING 13

The importance of Linear Programming Many real world problems lend themselves to linear programming modeling. Many real world problems can be approximated by linear models. There are well-known successful applications in: – Manufacturing – Marketing – Finance (investment) – Advertising – Agriculture

There are efficient solution techniques that solve linear programming models. The output generated from linear programming packages provides useful “what if” analysis (sensitivity analysis).

Page 14: Linear Programming Theory

LINEAR PROGRAMMING 14

Assumptions of the linear programming model The parameter values are known with certainty. The objective function and constraints exhibit constant returns to scale. Τhe additivity assumption: There are no interactions between the decision variables. The continuity assumption: Variables can take any value within a given feasible

range.

Page 15: Linear Programming Theory

LINEAR PROGRAMMING 15

Integer and mixed-integer problems A linear programming 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.

Page 16: Linear Programming Theory

LINEAR PROGRAMMING 16

Generally about LP Problems of resources’ optimal allocation. Expressed with a linear first degree function. Optimization of a function which is subjected to constraints. For non linear functions “non linear programming” is used. Other cases: Mathematical programming, Integer programming, Programming of

separable variables.

Page 17: Linear Programming Theory

LINEAR PROGRAMMING 17

Model example A chemical factory produces three independent products A, B and C.

Each product is processed sequentially by the machines Χ, Y and Ζ as following:

- Product Α: processing by the machines Χ and Y - Product Β: processing by the machines Χ, Y and Ζ - Product C: processing by the machines Y and Ζ

Graphical representation of the production process

Page 18: Linear Programming Theory

LINEAR PROGRAMMING 18

Each product liter requires one unit of machine capacity

Daily machine capacity - Χ: 100 units - Υ: 200 units - Ζ: 400 units

Net profits for each liter of Α, Β and C in proportion 3:4:2 Unlimited demand for products Α and C

Maximum daily demand of Β: 80 liters

Page 19: Linear Programming Theory

LINEAR PROGRAMMING 19

According to current management’s decision, the following amounts are produced during one day:

– 80 liters of product Β

– 20 liters of product Α

– 120 liters of product C

Is this the most appropriate policy regarding profit maximization?

Page 20: Linear Programming Theory

LINEAR PROGRAMMING 20

Configuration of the mathematical model

max F = 3*x1+4*x2+2*x3

with structure constraints:

x1+x2 100 (for Χ)

x2+x3 200 (for Y)

x1+x2+x3 400 (for Ζ)

x2 80

and non-negativity constraints

x1, x2, x3 0

Page 21: Linear Programming Theory

LINEAR PROGRAMMING 21

The standard LP model

with structure constraints:

and non-negativity constraints

nnxcxcxcf ...)(max 211X

mnmnmm

nn

nn

bxaxaxa

bxaxaxabxaxaxa

...............................................

......

2211

22222121

11212111

0 , ... ,0 ,0 21 nxxx

Page 22: Linear Programming Theory

LINEAR PROGRAMMING 22

Model variations Minimization of the objective function

Some constraints may have > or >= or < or =

Some of the decision variables are not necessarily non-negative

In every case, a mathematical representation equivalent to the standard LP model can be identified

Page 23: Linear Programming Theory

LINEAR PROGRAMMING 23

Alternative LP model formulation

with constraints

where

] ...[ 2 1 ncccC

XCX *)(max f

0PXA * 0X

nnnn

n

n

aaa

aaaaaa

......

.

.

.

.

.

.

.

.

.......

21

22221

11211

A

nx

xx

.

.

.2

1

X

mb

bb

.

.

.2

1

0P

Page 24: Linear Programming Theory

LINEAR PROGRAMMING 24

LP terminology Restrictive line: A straight line corresponding to a constraint of the model.

Vertex or extreme point: A point at which two restrictive lines are intersecting.

Solution: Each combination of the decision variables’ values.

Feasible solution: A solution satisfying all the constraints.

Non feasible solution: A solution not satisfying at least one of the constraints.

Extreme point feasible solution: Is one of the vertexes of the feasible region.

Page 25: Linear Programming Theory

LINEAR PROGRAMMING 25

Neighboring feasible solutions: They are connected with an edge (boundary) of the feasible region.

Feasible region: The (curved) region of feasible solutions formed by the restrictive lines.

Basic solution (extreme point solution): A solution corresponding to a vertex (has non-zero variables equal to the number of the constraints)

Non basic solution: A solution that is not on a vertex of the feasible region and can be feasible or non feasible

Basic feasible solution: A basic solution that corresponds to a vertex of the feasible region and effectively all its variables are non-negative

Page 26: Linear Programming Theory

LINEAR PROGRAMMING 26

Slack value: Any excess of an available resource (constraint symbol < or <).

Surplus value: Any "surpassing" of a requirement (constraint symbol > or >). Auxiliary variables: Variables that correspond to slack values and surplus values. Basic (non basic) variable: A non-zero (zero) variable in a solution that contains

decision and auxiliary variables Mandatory or active constraint: When the resource is completely consumed or

there is no surplus (zero slack or surplus respectively)

Non mandatory constraint : When a resource is not exhausted (<) or a requirement is being surpassed (>) (non-zero slack or surplus respectively)

Page 27: Linear Programming Theory

LINEAR PROGRAMMING 27

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, but there are cases with unlimited optimal solutions, no optimal solution, or the value of the objective function tends to infinity. In every case the amount of feasible solutions of the 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.

Page 28: Linear Programming Theory

LINEAR PROGRAMMING 28

Example 1 A manufacturing industrial unit produces three conventional television models (standard, deluxe and super) and a high-tech model (high-tech). The management is certain that all production can be purchased in the market. Each device passes in the production process from all three relevant departments: the workshop, the assembly, and the final control. The number of working hours required for each device type in each section is listed in the following table.

Page 29: Linear Programming Theory

LINEAR PROGRAMMING 29

Departments /TV types Standard Deluxe Super High-tech

Workshop 12 15 15 25

Assembly 10 12 13 20

Control 1/2 3/5 2 2

The total capacity of the unit and the capacities of the three individual departments do not allow more than 2500, 3000 and 240 man-hours per day in the workshop, assembly and control respectively. Moreover, due to existing signed contracts at least 50 standard and 50 deluxe devices must be produced daily. The net profit (selling price - total unit cost) from the sale of one unit of each device is:

Standard Deluxe Super Hightech

Profit (€) 25 30 40 100

Page 30: Linear Programming Theory

LINEAR PROGRAMMING 30

Required: 1. Formulate a linear programming model to determine the optimal production mix. 2. Investigate the possibility of reducing the dimensions of the Simplex tableau by

removing any redundant constraints.

Page 31: Linear Programming Theory

LINEAR PROGRAMMING 31

Problem analysis 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

Constraints for each department Constraints for the production quantities

Page 32: Linear Programming Theory

LINEAR PROGRAMMING 32

Model formulation with constraints and

5050

24022)5/3()2/1(300020131210250025151512

2

1

4321

4321

4321

xx

xxxxxxxxxxxx

0,,, 4321 xxxx

4321 100403025max xxxxF

Page 33: Linear Programming Theory

LINEAR PROGRAMMING 33

Observing the first two structure constraints it can be seen that: i.e. the left side of the second constraint is obviously less than the right side. So, the second constraint is surplus and can be removed. The problem can be simplified more if the following transformation of variables is carried out:

300025002515151220131210 43214321 xxxxxxxx

005050005050

222

111

xxxxxx

Page 34: Linear Programming Theory

LINEAR PROGRAMMING 34

Substituting in the constraints

and

indicates that

Dividing the first constraint by ~ 6.22 (= 1150/185) indicates that

This relation 'covers' the second constraint of the problem

5011 xx

18522)5/3()2/1(115025151512

4321

4321

xxxxxxxx

18544.24.293.1 4321 xxxx

5022 xx

Page 35: Linear Programming Theory

LINEAR PROGRAMMING 35

Final LP model of the problem with just one structure constraint and where

4321 100403025max xxxxF

115025151512 4321 xxxx

0,,, 4321 xxxx

5011 xx 5022 xx 2750 FF

Page 36: Linear Programming Theory

LINEAR PROGRAMMING 36

Example 2 A housewife faces the problem of purchasing quantities of meat, potatoes and vegetables, which constitute her main personal diet. She has already been informed by a women's magazine dietitian that her full weekly diet nutrition should contain as a minimum requirement 8 units of carbohydrates, 15 units of protein and 6 units of vitamins.

The unit numbers of these three constituents contained in each unit of weight (kg) of the three foods below and the food unit costs are shown in the following table.

Page 37: Linear Programming Theory

LINEAR PROGRAMMING 37

Foods Nutrients

Meat Potatoes Vegetables

Carbohydrates 3 1 1

Proteins 4 3 4

Vitamins 1 3 1

Cost (€/kg) 10 1 2

The housewife would like to know the quantities of each food she should purchase, so that to meet the minimum requirements of these basic ingredients and minimize the total purchasing cost.

Page 38: Linear Programming Theory

LINEAR PROGRAMMING 38

After some time a new nutrient requirement consisting of 7 units of calcium was added to housewife’s dietary. Each weight unit 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?

Page 39: Linear Programming Theory

LINEAR PROGRAMMING 39

Problem analysis 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

Constraints of nutrients (minimum required quantities)

Page 40: Linear Programming Theory

LINEAR PROGRAMMING 40

Model formulation

with constraints

and

321 210min xxxF

613115434

8113

321

321

321

xxxxxxxxx

0,, 321 xxx

Page 41: Linear Programming Theory

LINEAR PROGRAMMING 41

For the new additional nutrient (calcium) it is require the addition of a new constraint If the problem with the new constraint is solved the influence of the new nutrient to the cost and composition of the diet can be found. What is sensitivity analysis

7412 321 xxx

Page 42: Linear Programming Theory

LINEAR PROGRAMMING 42

Example 3 A hydraulic components production small company manufactures two types of safety valves. For this purpose the company buys matrices (molds) from an external supplier, and then processes, holes and smoothes them. The respective production rates - expressed in number of valves per hour - of the above three phases are presented in the following table.

Valves production rates per phase

Valve type Phase

Type Α Type Β

Processing 30 40

Holing 28 35

Smoothing 30 25

Page 43: Linear Programming Theory

LINEAR PROGRAMMING 43

Each matrix for valves of type A costs € 2, while that for type B costs € 3. The ready valves of type A and B are sold € 5 and € 6 respectively. The use of the three basic production machines (lathe, drill, and grinder) implies a current operating cost, which equals € 20, € 14 and € 20 per working hour respectively. It is also considered that there is no problem in the promotion to the market of any combination of the valves types. Develop an appropriate mathematical model to determine the mix of production, which maximizes the net profit.

Page 44: Linear Programming Theory

LINEAR PROGRAMMING 44

Problem analysis 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 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)

Page 45: Linear Programming Theory

LINEAR PROGRAMMING 45

Drill (phase 2): In one hour produces 28 valves of type Α or 35 valves of type Β

one unit of type Α is produced in 1/28 of the hour and the 1Β in 1/35 x1 units of A in x1/28 and x2 units of B in x2/35 total time: x1/28 + x2/35 The time constraint of lathe is: x1/28 + x2/35 1 (hour)

Grinder (phase 3): In one hour produces 30 valves Α or 25 valves Β

one unit of type Α in 1/30 of the hour, while one unit of type Β in 1/25 x1 units of A in x1/30 and x2 units of B in x2/25 total time: x1/30 + x2/25

the constraint coming out is: x1/30 + x2/25 1 (hour)

Page 46: Linear Programming Theory

LINEAR PROGRAMMING 46

Cost of each valve of type Α:

If in 1 hour the lathe produces 30 units and the hourly operating cost is 20 €, this means that the cost of each unit is € 20/30. In the drill (with the same reasoning) the cost is € 14/28. In the grinder the production cost of each unit is € 20/30. Total cost of producing a unit of type A: 20/30 +14/28 +20/30 = € 11/6

Cost of each valve of type B:

With the same analysis and summing the individual costs on the 3 machines, the total production cost of each unit is: 20/30 +14 / 28 +20 / 30 = 11/6 €

Page 47: Linear Programming Theory

LINEAR PROGRAMMING 47

Net profit from the sale of each unit:

Profit from the sale of each unit of type A: 5€ - (2 € + 11/6 €) = 7/6 €

Profit from the sale of each unit of type B: 6€ - (3 € + 17/10 €) = 13/10 €

Total hourly production profit: (7/6)*x1 + (13/10)*x2

Page 48: Linear Programming Theory

LINEAR PROGRAMMING 48

Final LP model

with constraints

and

21 1013

67max xxF

12530

13528

14030

21

21

21

xx

xx

xx

0, 21 xx

Page 49: Linear Programming Theory

LINEAR PROGRAMMING 49

Example 4 A company manufactures two new models of ultramodern refrigerators with corresponding names "no frost'' and" freezer ". The production area is divided in three departments: formatting (F) where the final surfaces are formed, assembly (A), and painting (P) where the final finishing and painting of the refrigerators are made. 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" 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.

Page 50: Linear Programming Theory

LINEAR PROGRAMMING 50

Problem analysis Decision variables:

Number of batches of the 2 refrigerators types - xNF, xF Constraints in the available working hours in each department:

Formatting (F): 60xNF + 70xF 2400 Assembly (A): 80xNF + 85xF 3000 Painting (P): 20xNF + 10xF 600

The difficulty of the problem lies in the creation of the objective function while there are no economic data, the aim being to minimize the unused time.

Page 51: Linear Programming Theory

LINEAR PROGRAMMING 51

Observing the composition of the three constraints referred to man-hours, it comes up that the unused time in each department is the difference between the right (available working hours) and the left (actual working hours) side of the corresponding constraint.

Thus we can define new variables x1, x2, and x3, symbolizing the unused (idle) times of departments F, A and P respectively.

Idle times of each department:

F: 60xNF + 70xF 2400 60xNF + 70xF + x1 = 2400 A: 80xNF + 85xF 3000 80xNF + 85xF + x2 = 3000 P: 20xNF + 10xF 600 20xNF + 10xF + x3 = 600

Page 52: Linear Programming Theory

LINEAR PROGRAMMING 52

LP model formulation with constraints

and

FNF xxF 1651606000min

60010203000858024007060

FNF

FNF

FNF

xxxxxx

0, FNF xx

Page 53: Linear Programming Theory

LINEAR PROGRAMMING 53

Example 5 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 was: "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.

Page 54: Linear Programming Theory

LINEAR PROGRAMMING 54

The three main types of pollution factors in the atmosphere of the region are particulates, sulfuric oxides and hydrocarbons. The new measures require that the company must reduce its annual emissions of these pollution factors by the following amounts (expressed in thousands of tons).

Required annual reductions of contaminants’ emissions

Pollution factor Required reduction of annual

emission rate (thousand tons) Particulates 60

Sulfuric oxides 150

Hydrocarbons 125

Page 55: Linear Programming Theory

LINEAR PROGRAMMING 55

The managing board instructed company’s engineers to determine how the required decreases can be achieved in the most economical manner. The operation of the factory itself implies two main pollution sources: a) the blast furnaces used to produce cast iron, b) the open hearth furnaces used to convert iron into steel. In both cases, engineers suggested that the most effective ways of mitigating pollution are: 1) increasing the height of the furnaces, 2) using filters (including gas traps) in the furnaces, and 3) improving the quality of fuels (using cleaner high-quality ingredients) used in the furnaces. 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.

Page 56: Linear Programming Theory

LINEAR PROGRAMMING 56

Reductions of emission rates by the full use of each method of pollution mitigation (in thousand tons per year)

Higher furnaces Filter use Improved fuels

Pollution factors Blast furnaces

Open hearth furnaces

Blast furnaces

Open hearth furnaces

Blast furnaces

Open hearth furnaces

Particulates 12 9 25 20 17 13

Sulfate oxides 35 42 18 31 56 49

Hydrocarbons 37 53 28 24 29 20

Page 57: Linear Programming Theory

LINEAR PROGRAMMING 57

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. For these reasons the company's engineers concluded that combination of the methods should be used, probably with fractions (percentages) of their full capacity of pollution mitigation based on the corresponding costs. Moreover, because of the differences between the blast furnaces and the open hearth furnaces, probably should not be used the same combination of methods in these two types of furnaces.

Page 58: Linear Programming Theory

LINEAR PROGRAMMING 58

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 cost accounting 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.

Page 59: Linear Programming Theory

LINEAR PROGRAMMING 59

Annual cost of using each pollution mitigation method (in millions of €)

Mitigation method Blast furnaces Open hearth furnaces

Higher furnaces 8 10

Filter use 7 6

Improved fuels 11 9

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?

Page 60: Linear Programming Theory

LINEAR PROGRAMMING 60

Problem analysis 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

Page 61: Linear Programming Theory

LINEAR PROGRAMMING 61

Constraints from the reductions of the pollution factors: For the particulates: 12x1+9x2+25x3+20x4+17x5+13x6 60 For the sulfate oxides: 35x1+42x2+18x3+31x4+56x5+49x6 150

For the hydrocarbons:

37x1+53x2+28x3+24x4+29x5+20x6 125

Page 62: Linear Programming Theory

LINEAR PROGRAMMING 62

The LP model

with nine structure constraints

and

654321 91167108min xxxxxxF

1,,,,,125202924285337150495631184235

6013172025912

654321

654321

654321

654321

xxxxxxxxxxxxxxxxxxxxxxxx

0,,,,, 654321 xxxxxx

Page 63: Linear Programming Theory

LINEAR PROGRAMMING 63

Example 6 A paper industry produces among other products blotting paper, which is wrapped in two meters long pieces in standardized cylinders of one meter height. The blotting 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 a meter, i.e. 10 cm), which is the usual measure of blotting paper.

Weekly orders

Length (palms) Number of items

9 30

7 150

5.5 65

Page 64: Linear Programming Theory

LINEAR PROGRAMMING 64

The industry would like to cut the fixed length of 20 palms blotting papers so that to satisfy all the above orders, and to minimize the total wastage (loss). Design an appropriate mathematical model for solving the problem of the paper industry with the use of Linear Programming.

Page 65: Linear Programming Theory

LINEAR PROGRAMMING 65

Problem analysis It is not possible to cut more than three pieces of blotting 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. Consequently 13 variables are defined: x1, x2, …x13 (i = 1, 2,.. 13): number of cylinders that are cut by the ith way

Page 66: Linear Programming Theory

LINEAR PROGRAMMING 66

Total loss: Minimization of the function F = 11*x1 + 2*x2 + 4*x3 + 5.5*x4 + 0*x5 + 13*x6 + 6*x7 + 0.5*x8 + 7.5*x9 + 2*x10 + 14.5*x11 + 9*x12 + 3.5*x13 Constraints: For the 30 pieces of 9 palms: 1x1 + 2x2 + 1x3 + 1x4 + 1x5 = 30 For the 150 pieces of 7 palms: 1x3 + 1x6 + 2x7 + 2x8 + 1x9 + 1x10 = 150 For the 65 pieces of 5.5 palms: 1x4 + 2x5 + 1x8 + 2x9 + 2x10 + 1x11 + 2x12 + 3x13 = 65 Also, for all variables non-negativity constraints apply.

Page 67: Linear Programming Theory

LINEAR PROGRAMMING 67

Organization of the mathematical model 1) Conversion of the objective function and constraints in the ΛΠ model format.

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).

3) Conversion of the structure constraints which are inequalities to equivalent equalities. This is achieved by the accession (addition if the direction of the inequality is < or or deduction if the direction is of the format > or ) of new non-negative variables, which are called dummy variables (slack or surplus).

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.

Page 68: Linear Programming Theory

LINEAR PROGRAMMING 68

Methodology of graphical solution 1. Each constraint is initially considered as equality and is plotted by a line (or a level

at three-dimensional problems). 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 a whole family of lines with a

standard direction coefficient. The different values of the objective function are represented by corresponding parallel lines.

Page 69: Linear Programming Theory

LINEAR PROGRAMMING 69

5. The function line moves in parallel with herself to the direction where her value increases (or decreases if the aim is its minimization), until it meets with the part of the level which is the intersection of all constraints. From the family of lines meeting the intersection of the constraints, only the lines crossing the intersection vertices are considered.

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.

Page 70: Linear Programming Theory

LINEAR PROGRAMMING 70

Graphical solution of maximization problems max f(x) = x1 + 2x2

with structure constraints

2x1 + x2 20

x1 + x2 12

x1 + 3x2 15

and non-negativity constraints

x1, x2 0

Page 71: Linear Programming Theory

LINEAR PROGRAMMING 71

Graphical solution of maximization problem

Page 72: Linear Programming Theory

LINEAR PROGRAMMING 72

Vertex Coordinates f(x) value

Α (0,0) 0

Β (0,5) 10

C (9,2) 13

D (10,0) 10

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.

Page 73: Linear Programming Theory

LINEAR PROGRAMMING 73

Graphical solution of minimization problems

min z(x) = 24x1 + 18x2

with structure constraints

120x1 + 60x2 480

56x1 + 112x2 440

103x1 + 120x2 720

and non-negativity constraints

x1 , x2 0

Page 74: Linear Programming Theory

LINEAR PROGRAMMING 74

Graphical solution of minimization problem

Page 75: Linear Programming Theory

LINEAR PROGRAMMING 75

Solving the system of the two equations results in:

x1 = 1.752 and x2 = 4.496

Thus, the minimum value of the objective function is:

Min Ζ = 24*1.752 + 18*4,496 = 122.98

Page 76: Linear Programming Theory

LINEAR PROGRAMMING 76

The Simplex method A large variety of Simplex-based algorithms exist to solve LP problems. 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 have 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

Page 77: Linear Programming Theory

LINEAR PROGRAMMING 77

Fundamental theorem Extreme point (or Simplex filter) theorem: If the maximum or minimum value of a linear function defined over a polygonal convex region exists, then it is to be found at the boundary of the region. A finite number of extreme points imply a finite number of solutions. Hence, search is reduced to a finite set of points. However, a finite set can still be too large for practical purposes. Simplex method provides an efficient systematic search guaranteed to converge in a finite number of steps.

Page 78: Linear Programming Theory

LINEAR PROGRAMMING 78

General form of the initial Simplex tableau

Base x1 x2 … xn xn+1 xn+2 ... xn+m R.H.

xn+1

xn+2

...

xn+m

a11 a12 ... a1n 1 0 ... 0

a21 a22 ... a2n 0 1 ... 0

.............................................................

am1 am2 ... amn 0 0 ... 1

b1

b2

...

bm

-f c1 c2 ... cn 0 0 ... 0 0

Page 79: Linear Programming Theory

LINEAR PROGRAMMING 79

Previous Simplex tableau

Base x1 ... xm xm+1 ... Xs ... xn+m R.H.

x1 1 ... 0 a1,m+1 ... a1,s ... a1,n b1

... ... ... ... ... ... ...

... 0 0 ... ... ... ...

... ... ... ... ... ... ...

xr 0 0 ar,m+1 ... ar,s ar,n br

... ... ... ... ... ... ...

... 0 0 ... ... ... ...

... ... ... ... ... ... ...

xm 0 ... 1 ar,m+1 ... am,s ... am,n bm

... 0 ... 0 cm+1 ... cs ... cn -f0

Page 80: Linear Programming Theory

LINEAR PROGRAMMING 80

New (current) Simplex tableau

Base x1 .. xr .. .. xm .... xm+1 ......... xs ............ xn+m R.H. x1

… … ...

xr

… ... ... xm

1 0 - a1sarr 0.. ...a1,m+1 -a1,sar,m+1 0 a1,m+1 -a1,sar,m+1 0 ... ... ... … ... ... ... ... ... ... ... 1 ar,m+1 ar,n 0 arr= 0 ar,m+1 = 1 arn = ars ars ars … … ... ... … … ... ... ... ... ... ... ... ... ... ... ... ... 0 -amsarr 1 am,n+1 -am,sar,m+1 0 am,n -am,sar,n

b1-a1,sb’r … … br

= b’r ars … … … bm-amsbr

-f 0 .... csarr..... 0 cm+1 -csar,m+1 .... 0 .... cn-csar,n -f0-csar,n

Page 81: Linear Programming Theory

LINEAR PROGRAMMING 81

Basic steps of Simplex 1. Begin the search at an extreme point (i.e., a basic feasible solution). 2. Determine if the movement to an adjacent extreme point can improve on the

optimization of the objective function. If not, the current solution is optimal. If, however, improvement is possible, then proceed to the next step. 3. Move to the adjacent extreme point which offers (or, perhaps, appears to offer) the

most improvement in the objective function. 4. Continue steps 2 and 3 until the optimal solution is found or it can be shown that the problem is either unbounded or infeasible.

Page 82: Linear Programming Theory

LINEAR PROGRAMMING 82

Synopsis of Simplex method steps (after the determination of the initial basic feasible solution) Step 1: The incoming non-basic variable is identified. Step 2: The outgoing non-basic variable is identified. Step 3: By elementary operations between the lines of the current tableau next

Simplex tableau is indicated, in which the changes that practically lead to the next vertex of the feasible region are reflected.

Step 4: The new (current) basic feasible solution is being tested as to its perfection

If this solution is optimal then the procedure stops, otherwise: Move to step 1.

Page 83: Linear Programming Theory

LINEAR PROGRAMMING 83

Steps of LP problem solution - Maximization problems 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. 4. Calculation of the elements of the new line of variable xs dividing the corresponding

elements of the previous row of variable xr with the pivot element ars.

Page 84: Linear Programming Theory

LINEAR PROGRAMMING 84

5. Replacement of all remaining elements according to the equation: New element = respective previous element – [(respective element of previous column of xs)*(respective element of new row of xr)]

6. Back to step 1

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.

Page 85: Linear Programming Theory

LINEAR PROGRAMMING 85

Solution of the model example

max F = 3*x1+4*x2+2*x3

with structure constraints

x1+x2 100

x2+x3 200

x1+x2+x3 400

x2 80

and non-negativity constraints

x1, x2, x3 0

Page 86: Linear Programming Theory

LINEAR PROGRAMMING 86

Adding the appropriate number of slack variables (artificial variables are not needed as all the structure constraints are of the type ) the model example is formulated as: maxf = 3x1 + 4x2 + 2x3 x1 + x2 + x4 = 100

x2 + x3 + x5 = 200

x1 + x2 + x3 + x6 = 400

x2 + x7 = 80

Page 87: Linear Programming Theory

LINEAR PROGRAMMING 87

Sequential Simplex tableaux (maximization problem)

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

Page 88: Linear Programming Theory

LINEAR PROGRAMMING 88

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 0 0 1 0 0 -1 20 x3 0 0 1 0 1 0 -1 120 x6 0 0 0 -1 -1 1 1 180 x2 0 1 0 0 0 0 1* 20 -f 0 0 0 -3 -2 0 1 -620

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:

Page 89: Linear Programming Theory

LINEAR PROGRAMMING 89

x1=100 – x2=0 – x3=200 – x4=0 – x5=0 – x6=100 – x7=80 – max f=700

Steps of LP problem solution – Minimization problems 1. Formulation of the artificial function F = Σxi, where xi the artificial variables expressed

as functions of the other variables of the corresponding constraint limitations.

2. Construction of the first Simplex tableau with the coefficients of F under those of the initial function f.

3. Minimization of F with the known procedure of Simplex method (steps 1 to 6 of the

algorithm), inserting each time to the base, the variable with the smallest negative coefficient ci.

4. Repetition of the minimization procedure for function F, until it takes the zero value (all the cost coefficients will become negative or zero).

Page 90: Linear Programming Theory

LINEAR PROGRAMMING 90

5. Removal of the coefficient row of F and of the columns of all artificial variables.

6. Minimization of the initial function f, inserting each time in the base the variable with

the smallest negative coefficient.

7. Repetition of the minimization procedure for function f, until all cost coefficients become positive or zero.

Page 91: Linear Programming Theory

LINEAR PROGRAMMING 91

Solution of a minimization problem The following minimization problem is given:

minf = x1 + 2x2 with structure constraints

2x1 + x2 6

x1 + x2 = 4

x1 + x2 8

and non-negativity constraints

x1 0, x2 0

Page 92: Linear Programming Theory

LINEAR PROGRAMMING 92

The existing inequalities are transformed to equalities (by adding slack variables x3 and x4) and the unary table is created (by adding the artificial variables x5 and x6). Thus, the problem is formulated as following:

minf = x1 + 2x2

with constraints

2x1 + x2 + x3 = 6

x1 + x2 + x5 = 4

x1 + 3x2 - x4 + x6 = 8

and

x1, x2, x3, x4, x5, x6 0

Page 93: Linear Programming Theory

LINEAR PROGRAMMING 93

According to the minimization algorithm, at first the artificial function F has to be created. F = x5 + x6 = (4 - x1 - x2) + (8 - x1 - 3x2 + x4) F = 12 - 2x1 - 4x2 + x4

Simplex tableaux are following, up to the determination of the optimal solution, minimizing successively functions F and f.

Sequential tableaux of Simplex method (minimization problem)

Page 94: Linear Programming Theory

LINEAR PROGRAMMING 94

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

x3 5/3 0 1 1/3 0 -1/3 10/3 x5 2/3* 0 0 1/3 1 -1/3 4/3 x2 1/3 1 0 -1/3 0 1/3 8/3 -f 1/3 0 0 2/3 0 -2/3 -16/3

-F -2/3 0 0 -1/3 0 4/3 -4/3 x3 0 0 1 -1/2 -5/2 1/2 0 x1 1 0 0 1/2 3/2 -1/2 2 x2 0 1 0 -1/2 -1/2 1/2 2 -f 0 0 0 1/2 -1/2 -1/2 -6 -F 0 0 0 0 1 1 0

Final Simplex tableau

Page 95: Linear Programming Theory

LINEAR PROGRAMMING 95

Base x1 x2 x3 x4 R.H.

x3 x1 x2

0 0 1 - ½ 1 0 0 ½ 0 1 0 - ½

0 2 2

-f 0 0 0 ½ -6 Optimal solution: x1=2, x2=2, x3=x4=x5=0 – min f = 6

Page 96: Linear Programming Theory

LINEAR PROGRAMMING 96

Models without unique optimal solutions • Infeasibility:

Occurs when a model has no feasible point.

• Unboundness: Occurs when the objective can become infinitely large (max) or infinitely small (min).

• Alternate solution:

Occurs when more than one point optimizes the objective function

Page 97: Linear Programming Theory

LINEAR PROGRAMMING 97

LP application A product mix problem A manufacturer has fixed amounts of different resources such as raw material, labour, and equipment. These resources can be combined to produce any one of several different products. 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 Giga company produces two large products: I and II.

Page 98: Linear Programming Theory

LINEAR PROGRAMMING 98

The raw material requirements, space needed for storage, production rates, and selling prices for these products are given in the following table.

Production data for Giga company

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.

Page 99: Linear Programming Theory

LINEAR PROGRAMMING 99

Graphical solution

Page 100: Linear Programming Theory

LINEAR PROGRAMMING 100

When the decision variables are more than two, it is always advisable to use Simplex method to avoid 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 Simplex solution 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.

The managers are interested to know whether it is worthwhile to increase its production by purchasing additional units of raw materials and by either expanding its production facilities or working overtime.

Page 101: Linear Programming Theory

LINEAR PROGRAMMING 101

The critical questions are: • 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?

Answers to these questions can be obtained from the objective function in the last tableau of the Simplex solution:

4335$7

167

1532 SSZ

that is,

Page 102: Linear Programming Theory

LINEAR PROGRAMMING 102

32 716

7154335$ SSZ

Because S1, S2 and S3 represent surplus resources, the negatives 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. Therefore, the marginal value of one additional unit of each resource is:

0$)( 1

SZspaceStorage

715$

)2(

SZmaterialsRaw

716$

)(Pr

3

SZtimeoduction

Page 103: Linear Programming Theory

LINEAR PROGRAMMING 103

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. The Giga Company should be willing to pay up to $ 15/7 for an additional unit of raw materials and $ 16/7 for an additional unit of production time. If the actual cost of an additional unit (i.e. marginal cost) of these resources is smaller than the marginal value, the company should be able to increase its income by increasing production. The marginal values above are valid, however, only as long as there is surplus storage space available.

Page 104: Linear Programming Theory

LINEAR PROGRAMMING 104

Sensitivity analysis This analysis helps to test the sensitivity of the optimum 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 what ranges can these prices change without affecting the optimality of the present solution?

Will the present solution remain the optimum solution if the amount of raw materials, production time, or storage space is suddenly changed because of shortages, machine failures, or other 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?