LINEAR PROGRAMMING

131 downloads 374 Views 6MB Size Report
Linear programming is a widely used mathematical modeling technique to determine ... As its name implies, the linear programming model consists of linear  ...
LINEAR PROGRAMMING Vassilis Kostoglou E-mail: [email protected] URL: www.it.teithe.gr/~vkostogl/en

LINEAR PROGRAMMING

1

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

LINEAR PROGRAMMING

2

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. LINEAR PROGRAMMING

3

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.

LINEAR PROGRAMMING

4

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.

LINEAR PROGRAMMING

5

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.

LINEAR PROGRAMMING

6

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.

LINEAR PROGRAMMING

7

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

LINEAR PROGRAMMING

8

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 laborhours available while maximizing the firm’s profit. 5. Picking blends of raw materials in feed mills to produce finished feed combinations at minimum costs.

LINEAR PROGRAMMING

9

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.

LINEAR PROGRAMMING

10

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.

LINEAR PROGRAMMING

11

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

LINEAR PROGRAMMING

12

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

LINEAR PROGRAMMING

13

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.

LINEAR PROGRAMMING

14

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.

LINEAR PROGRAMMING

15

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.

LINEAR PROGRAMMING

16

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

LINEAR PROGRAMMING

17



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

LINEAR PROGRAMMING

18

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?

LINEAR PROGRAMMING

19

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 LINEAR PROGRAMMING

20

The standard LP model

max f ( X )  c1 x1  c2 x...  cn xn with structure constraints:

a 11 x 1  a 12 x 2  ...  a 1 n x n  b1 a 21 x 1  a 22 x 2  ...  a 2 n x n  b 2 .......... .......... .......... .......... .... a m 1 x 1  a m 2 x 2  ...  a mn x n  b m and non-negativity constraints

x1  0, x 2  0, ... , x n  0 LINEAR PROGRAMMING

21

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

LINEAR PROGRAMMING

22

Alternative LP model formulation

max f ( X )  C * X with constraints

A * X  P0

X0

where

 a11 a12 ... a1n  a  a ... a 22 2n   21 . . . .   A . . . .    . . .   .  an1 an 2 ... ann 

 x1  x   2 .   X    .    .   x n 

 b1 b  2 .  P0   .   .  b m

LINEAR PROGRAMMING

       

C  [c1 c 2 ... cn ] 23

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.

LINEAR PROGRAMMING

24

 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

LINEAR PROGRAMMING

25



Slack value: Any excess of an available resource (constraint symbol < or 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 () (non-zero slack or surplus respectively)

LINEAR PROGRAMMING

26



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.

LINEAR PROGRAMMING

27

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.

LINEAR PROGRAMMING

28

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 Profit (€)

25

30

LINEAR PROGRAMMING

Super

Hightech

40

100

29

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.

LINEAR PROGRAMMING

30

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

LINEAR PROGRAMMING

31

Model formulation max F  25 x1  30 x2  40 x3  100 x4 with constraints

12 x1  15 x2  15 x3  25 x4  2500 10 x1  12 x2  13 x3  20 x4  3000 (1 / 2) x1  (3 / 5) x2  2 x3  2 x4  240 x1  50 x2  50 and

x1 , x 2 , x 3 , x 4  0 LINEAR PROGRAMMING

32

Observing the first two structure constraints it can be seen that:

10 x1  12 x 2  13 x 3  20 x 4  12 x1  15 x 2  15 x 3  25 x 4  2500  3000 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:

x1  50  x1  50  0  x1  0 x 2  50  x 2  50  0  x 2  0

LINEAR PROGRAMMING

33

Substituting in the constraints

x1  x1  50 and

x2  x2  50 indicates that

12 x1  15 x2  15 x3  25 x4  1150 (1 / 2) x1  (3 / 5) x2  2 x3  2 x4  185 Dividing the first constraint by ~ 6.22 (= 1150/185) indicates that

1.93x1  2.4 x2  2.4 x3  4 x4  185 This relation 'covers' the second constraint of the problem LINEAR PROGRAMMING

34

Final LP model of the problem

max F   25x1  30x2  40x3  100x4 with just one structure constraint

12 x1  15x2  15x3  25x4  1150 and

x 1 , x 2 , x 3 , x 4  0 where

x 1  x 1  50

x 2  x 2  50

F   F  2750

LINEAR PROGRAMMING

35

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.

LINEAR PROGRAMMING

36

Meat

Potatoes

Vegetables

Carbohydrates

3

1

1

Proteins

4

3

4

Vitamins

1

3

1

Cost (€/kg)

10

1

2

Foods Nutrients

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.

LINEAR PROGRAMMING

37

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?

LINEAR PROGRAMMING

38

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)

LINEAR PROGRAMMING

39

Model formulation

min F  10 x1  x 2  2 x 3 with constraints

3 x1  1 x 2  1 x 3  8 4 x 1  3 x 2  4 x 3  15 1 x1  3 x 2  1 x 3  6 and

x1 , x 2 , x3  0 LINEAR PROGRAMMING

40

For the new additional nutrient (calcium) it is require the addition of a new constraint

2 x1  1 x 2  4 x 3  7 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

LINEAR PROGRAMMING

41

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

Type Α

Type Β

Phase Processing

30

40

Holing

28

35

Smoothing

30

25

LINEAR PROGRAMMING

42

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.

LINEAR PROGRAMMING

43

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) LINEAR PROGRAMMING

44

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)

LINEAR PROGRAMMING

45

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 €

LINEAR PROGRAMMING

46

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

LINEAR PROGRAMMING

47

Final LP model

max F 

7 13 x1  x2 6 10

with constraints x 30 x 28 x 30

1



1



1



x 40 x 35 x 25

2



1

2



1

2



1

and

x1 , x 2  0 LINEAR PROGRAMMING

48

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.

LINEAR PROGRAMMING

49

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.

LINEAR PROGRAMMING

50

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

LINEAR PROGRAMMING

51

LP model formulation

min F  6000  160 x NF  165 xF with constraints

60 x NF  70 x F  2400 80 x NF  85 x F  3000 20 x NF  10 x F  600 and

xNF , xF  0 LINEAR PROGRAMMING

52

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.

LINEAR PROGRAMMING

53

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 Particulates

Required reduction of annual emission rate (thousand tons) 60

Sulfuric oxides

150

Hydrocarbons

125

LINEAR PROGRAMMING

54

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. LINEAR PROGRAMMING

55

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

Filter use

Blast Open hearth Blast Open hearth furnaces furnaces furnaces furnaces

Improved fuels 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

LINEAR PROGRAMMING

56

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.

LINEAR PROGRAMMING

57

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.

LINEAR PROGRAMMING

58

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? LINEAR PROGRAMMING

59

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

LINEAR PROGRAMMING

60



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

LINEAR PROGRAMMING

61

The LP model

min F  8x1  10x2  7 x3  6 x4  11x5  9 x6 with nine structure constraints

12 x1  9 x2  25 x3  20 x4  17 x5  13 x6  60 35 x1  42 x2  18 x3  31x4  56 x5  49 x6  150 37 x1  53 x2  28 x3  24 x4  29 x5  20 x6  125 x1 , x2 , x3 , x4 , x5 , x6  1 and

x1 , x2 , x3 , x4 , x5 , x6  0 LINEAR PROGRAMMING

62

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

LINEAR PROGRAMMING

65

63

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.

LINEAR PROGRAMMING

64

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 LINEAR PROGRAMMING

65

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.

LINEAR PROGRAMMING

66

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

LINEAR PROGRAMMING

67

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. LINEAR PROGRAMMING

68

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.

LINEAR PROGRAMMING

69

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

LINEAR PROGRAMMING

70

Graphical solution of maximization problem

LINEAR PROGRAMMING

71

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.

LINEAR PROGRAMMING

72

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 x 1 , x2  0

LINEAR PROGRAMMING

73

Graphical solution of minimization problem

LINEAR PROGRAMMING

74

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

LINEAR PROGRAMMING

75

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

LINEAR PROGRAMMING

76

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.

LINEAR PROGRAMMING

77

General form of the initial Simplex tableau Base x1

x2 …

xn

xn+1 xn+2 ...

xn+m

R.H.

xn+1

a11

a12 ...

a1n

1

0

...

0

b1

xn+2

a21

a22 ...

a2n

0

1

...

0

b2

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

...

...

xn+m am1 -f

c1

am2 ... amn

0

0

...

1

bm

c2 ...

0

0

...

0

0

cn

LINEAR PROGRAMMING

78

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

...

LINEAR PROGRAMMING

79

New (current) Simplex tableau Base x1 … … ... xr … ... ... xm -f

x1 .. xr .. .. 1 0 - a1sarr 0 ... ... ... 1 0 arr= ars … … ... ... ... ... 0 -amsarr 0 .... csarr.....

xm .... xm+1 ......... xs ............ xn+m 0.. ...a1,m+1 -a1,sar,m+1 0 a1,m+1 -a1,sar,m+1 ... ... … ... ... ... ... ... ar,m+1 ar,n 0 ar,m+1 = 1 arn = ars ars ... ... … … ... ... ... ... ... ... ... ... 1 am,n+1 -am,sar,m+1 0 am,n -am,sar,n 0 cm+1 -csar,m+1 .... 0 .... cn-csar,n

LINEAR PROGRAMMING

R.H. b1-a1,sb’r … … br = b’r ars … … … bm-amsbr -f0-csar,n

80

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.

LINEAR PROGRAMMING

81

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.

LINEAR PROGRAMMING

82

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.

LINEAR PROGRAMMING

83

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.

LINEAR PROGRAMMING

84

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

LINEAR PROGRAMMING

85

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 x2 + x3 + x5

= 100 = 200

x1 + x2 + x3

= 400

x2

+ x6 + x7

= 80

LINEAR PROGRAMMING

86

Sequential Simplex tableaux (maximization problem)

Base x4 x5 x6 x7 -f

x1 1 0 1 0 3

x2 x3 1 0 1 1 1 1 1* 0 4 2

x4 1 0 0 0 0

x5 0 1 0 0 0

x6 0 0 1 0 0

x7 0 0 0 1 0

R.H. 100 200 400 80 0

x4 x5 x6 x2 -f

1* 0 1 0 3

0 0 0 1 0

1 0 0 0 0

0 1 0 0 0

0 0 1 0 0

-1 -1 -1 1 -4

20 120 320 80 -320

0 1 1 0 2

LINEAR PROGRAMMING

87

x1 x5 x6 x2 -f

1 0 0 0 0

0 0 0 1 0

0 1* 1 0 2

1 0 -1 0 -3

0 1 0 0 0

0 0 1 0 0

-1 -1 0 1 -1

20 120 300 80 -380

x1 x3 x6 x2 -f

1 0 0 0 0

0 0 0 1 0

0 1 0 0 0

1 0 -1 0 -3

0 1 -1 0 -2

0 0 1 0 0

-1 -1 1 1* 1

20 120 180 20 -620

x1 x3 x6 x7 -f

1 0 0 0 0

1 1 -1 1 -1

0 1 1 0 0 -1 0 0 0 -3

0 1 -1 0 -2

0 0 1 0 0

0 0 0 1 0

100 200 100 80 -700

Optimal solution: LINEAR PROGRAMMING

88

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

LINEAR PROGRAMMING

89

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.

LINEAR PROGRAMMING

90

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

LINEAR PROGRAMMING

91

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 + x 3

x1 +

x2

x1 + 3x2

=6 + x5

- x4

=4 + x6 = 8

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

LINEAR PROGRAMMING

92

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) LINEAR PROGRAMMING

93

Base x3 x5 x6 -f -F

x1 2 1 1* 1 -2

x2 1 1 3 2 -4

x3 1 0 0 0 0

x4 0 0 -1 0 1

x5 0 1 0 0 0

x6 0 0 1 0 0

R.H. 6 4 8 0 -12

x3 x5 x2 -f

5/3 2/3* 1/3 1/3

0 0 1 0

1 0 0 0

1/3 1/3 -1/3 2/3

0 1 0 0

-1/3 -1/3 1/3 -2/3

10/3 4/3 8/3 -16/3

-F x3 x1 x2 -f -F

-2/3 0 1 0 0 0

0 0 0 1 0 0

0 1 0 0 0 0

-1/3 -1/2 1/2 -1/2 1/2 0

0 -5/2 3/2 -1/2 -1/2 1

4/3 1/2 -1/2 1/2 -1/2 1

-4/3 0 2 2 -6 0

Final Simplex tableau LINEAR PROGRAMMING

94

Base x3 x1 x2 -f

x1 0 1 0 0

x2 0 0 1 0

x3 1 0 0 0

x4 R.H. -½ 0 ½ 2 -½ 2 ½ -6

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

LINEAR PROGRAMMING

95

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

LINEAR PROGRAMMING

96

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.

LINEAR PROGRAMMING

97

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 Storage space (m2 /unit) Raw material (kg/unit) Production rate (units/hr) Selling price ($/unit)

I 4 5 60 13

II 5 3 30 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. LINEAR PROGRAMMING

98

Graphical solution

LINEAR PROGRAMMING

99

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. LINEAR PROGRAMMING

100

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: 15 16 S2  S 3  $ 4335 7 7 that is, Z 

LINEAR PROGRAMMING

101

Z  $ 4335 

15 16 S2  S3 7 7

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: Storage

space 

Raw materials 

Z  $0  ( S1 )

Z 15 $  ( S ) 7 2

Production time 

Z 16 $  (  S3 ) 7 LINEAR PROGRAMMING

102

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.

LINEAR PROGRAMMING

103

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?

LINEAR PROGRAMMING

104