Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operations Research Instructor: Xiaoxi Li (李晓蹊) Wuhan University, Fall

Similar presentations


Presentation on theme: "Operations Research Instructor: Xiaoxi Li (李晓蹊) Wuhan University, Fall"— Presentation transcript:

1 Operations Research Instructor: Xiaoxi Li (李晓蹊) Wuhan University, 2017 Fall

2 Introduction to LP (week two)
Linear Programming Problem: an overview Problem Formulation A Simple Maximization Problem Graphical Solution Procedure Extreme Points and the Optimal Solution Computer Solutions A Simple Minimization Problem Special (Irregular) Cases Examples from Hillier and Lieberman

3 Linear Programming: An Overview
Objectives of business decisions frequently involve maximizing profit or minimizing costs. Linear programming uses linear algebraic relationships to represent a firm’s decisions, given a business objective, and resource constraints. To illustrate: both the objective f(x) and the constraint g(x) are linear in x.

4 Model Components Decision variables (the decisions) - mathematical symbols representing levels of activity of a firm -- the vector “x”. Objective function (goal)- a linear mathematical relationship describing an objective of the firm, in terms of decision variables -- the function “f(x)” , to be maximized or minimized. Constraints (physical restrictions) – requirements or restrictions placed on the firm by the operating environment, stated in linear relationships of the decision variables – the inequality “g(x) ≦ b” . [Note: =, ≦ or ≧ is allowed but not >or <.] Parameters (model in detail) - numerical coefficients and constants used in the objective function and constraints – the number “b” and “c1, c2” when “f(x)=c1x1 + c2x2 , x=(x1x2 )”.

5 Summary of Model Formulation Steps
Step 1 : Clearly define the decision variables. Step 2 : Construct the objective function in terms of the decisions variables, including fixing the parameters. Step 3 : Formulate the constraints in terms of the decisions variables, including fixing the parameters.

6 Assumptions of Linear Programming Model
Proportionality - The rate of change (slope) of the objective function and constraint equations is constant. Additivity - Terms in the objective function and constraint equations must be additive, i.e. f(x,y)=3x+5y. Divisibility -Decision variables can take on any fractional value and are therefore continuous as opposed to integer in nature. Certainty - Values of all the model parameters are assumed to be known with certainty (non-probabilistic).

7 Linear Programming (LP) Problem
A feasible solution satisfies all the problem's constraints. An optimal solution is a feasible solution that results in the largest possible objective function value when maximizing (or smallest when minimizing). A graphical solution method can be used to solve a linear program with two variables.

8 Example 1: A Simple Maximization Problem
Objective Function Max Z=5x1 + 7x2 s.t x < 6 2x1 + 3x2 < 19 x1 + x2 < 8 x1 > 0 and x2 > 0 “Regular” Constraints Non-negativity Constraints

9 Example 1: Graphical Solution
First Constraint Graphed x2 8 7 6 5 4 3 2 1 x1 = 6 (x1 ≦ 6 ) Shaded region contains all feasible points for this constraint (6, 0) x1

10 Example 1: Graphical Solution
Second Constraint Graphed x2 8 7 6 5 4 3 2 1 (0, 19/3): x1 =0, x2 = 19/3 2x1 + 3x2 = 19 (2x1 + 3x2 ≦ 19) Shaded region contains all feasible points for this constraint (19/2, 0): x2 =0, x1 = 19/2 x1

11 Example 1: Graphical Solution
Third Constraint Graphed x2 (0, 8) 8 7 6 5 4 3 2 1 x1 + x2 = 8 (x1 + x2 ≦ 8 ) Shaded region contains all feasible points for this constraint (8, 0) x1

12 Example 1: Graphical Solution
Combined-Constraint Graph Showing Feasible Region x2 x1 + x2 = 8 8 7 6 5 4 3 2 1 x1 = 6 2x1 + 3x2 = 19 Feasible Region x1

13 Example 1: Graphical Solution
Objective Function Line x2 8 7 6 5 4 3 2 1 (0, 5) Objective Function 5x1 + 7x2 = 35 (7, 0) x1

14 Example 1: Graphical Solution
Selected Objective Function Lines x2 8 7 6 5 4 3 2 1 5x1 + 7x2 = 35 5x1 + 7x2 = 39 Direction for increasing Z 5x1 + 7x2 = 42 x1

15 Example 1: Graphical Solution
Optimal Solution x2 Maximum Objective Function Line 5x1 + 7x2 = 46 8 7 6 5 4 3 2 1 Optimal Solution (x1 = 5, x2 = 3) x1

16 Summary of the Graphical Solution Procedure for Maximization Problems
Prepare a graph of the feasible solutions for each of the constraints. Determine the feasible region that satisfies all the constraints simultaneously. Draw an objective function line (e.g. iso-profit line). Move parallel objective function lines toward larger objective function values without entirely leaving the feasible region. Any feasible solution on the objective function line with the largest value is an optimal solution.

17 Computer Solutions LP problems involving 1000s of variables and 1000s of constraints are now routinely solved with computer packages. Linear programming solvers are now part of many spreadsheet packages, such as Microsoft Excel. Leading commercial packages include CPLEX, LINGO, MOSEK, Xpress-MP, and Premium Solver for Excel.

18 Interpretation of Computer Output
In this chapter we will discuss the following output: objective function value values of the decision variables slack and surplus In the next chapter we will discuss how an optimal solution is affected by a change in: a coefficient of the objective function the right-hand side value of a constraint

19 Example 1: Spreadsheet Solution
Partial Spreadsheet Showing Problem Data

20 Example 1: Spreadsheet Solution
Partial Spreadsheet Showing Solution Decision variables: B10:C10; Maximized Objective: C12=B6*B10+C6*C10; Constraints: define B15=B3*B10+C3*C10 and set B15<=D3; define B16=B4*B10+C4*C10 and set B15<=D4; define B15=B5*B10+C5*C10 and set B15<=D5.

21 Example 1: Spreadsheet Solution
Interpretation of Computer Output We see from the previous slide that: Objective Function Value = 46 Decision Variable #1 (x1) = 5 Decision Variable #2 (x2) = 3 “Slack” in Constraint #1 = 6 – 5 = 1 “Slack” in Constraint #2 = 19 – 19 = 0 “Slack” in Constraint #3 = 8 – 8 = 0

22 Example 2: A Simple Minimization Problem
LP Formulation Min x1 + 2x2 s.t x1 + 5x2 > 10 4x1 - x2 > 12 x1 + x2 > 4 x1, x2 > 0

23 Example 2: Graphical Solution
Graph the Constraints Constraint 1: When x1 = 0, then x2 = 2; when x2 = 0, then x1 = 5. Connect (5,0) and (0,2). The ">" side is above this line: check that (0,0) is not in the feasible area. Constraint 2: When x2 = 0, then x1 = 3. But setting x1 to 0 will yield x2 = -12, which is not on the graph. Thus, to get a second point on this line, set x1 to any number larger than 3 and solve for x2: when x1 = 5, then x2 = 8. Connect (3,0) and (5,8). The ">" side is to the right. Constraint 3: When x1 = 0, then x2 = 4; when x2 = 0, then x1 = 4. Connect (4,0) and (0,4). The ">" side is above this line.

24 Example 2: Graphical Solution
Constraints Graphed x2 6 5 4 3 2 1 Feasible Region 4x1 - x2 > 12 x1 + x2 > 4 2x1 + 5x2 > 10 x1

25 Example 2: Graphical Solution
Graph the Objective Function Set the objective function equal to an arbitrary constant (say 20) and graph it. For 5x1 + 2x2 = 20, when x1 = 0, then x2 = 10; when x2= 0, then x1 = 4. Connect (4,0) and (0,10). Move the Objective Function Line Toward Optimality Move it in the direction which lowers its value (down), since we are minimizing, until it touches the last point of the feasible region, determined by the last two constraints.

26 Example 2: Graphical Solution
Objective Function Graphed x2 Min 5x1 + 2x2 6 5 4 3 2 1 4x1 - x2 > 12 x1 + x2 > 4 2x1 + 5x2 > 10 x1

27 Example 2: Graphical Solution
Solve for the Extreme Point at the Intersection of the Two Binding Constraints 4x1 - x2 = 12 x1+ x2 = 4 Adding these two equations gives: 5x1 = 16 or x1 = 16/5 Substituting this into x1 + x2 = 4 gives: x2 = 4/5 Solve for the Optimal Value of the Objective Function 5x1 + 2x2 = 5(16/5) + 2(4/5) = 88/5

28 Example 2: Graphical Solution
Optimal Solution x2 6 5 4 3 2 1 4x1 - x2 > 12 x1 + x2 > 4 Optimal Solution: x1 = 16/5, x2 = 4/5, 5x1 + 2x2 = 17.6 2x1 + 5x2 > 10 x1

29 Summary of the Graphical Solution Procedure for Minimization Problems
Prepare a graph of the feasible solutions for each of the constraints. Determine the feasible region that satisfies all the constraints simultaneously. Draw an objective function line (e.g. iso-cost line). Move parallel objective function lines toward smaller objective function values without entirely leaving the feasible region. Any feasible solution on the objective function line with the smallest value is an optimal solution.

30 Example 2: Spreadsheet Solution
Partial Spreadsheet Showing Problem Data

31 Example 2: Spreadsheet Solution
Partial Spreadsheet Showing Formulas

32 Example 2: Spreadsheet Solution
Partial Spreadsheet Showing Solution

33 Example 2: Spreadsheet Solution
Interpretation of Computer Output We see from the previous slide that: Objective Function Value = 17.6 Decision Variable #1 (x1) = Decision Variable #2 (x2) = “Surplus” in Constraint #1 = = 0.4 “Surplus” in Constraint #2 = = 0.0 “Surplus” in Constraint #3 = = 0.0

34 Special (Irregular) Cases
Case 1: Infeasibility Case 2: Unbounded solution Case 3: Infinitely many optimal solutions

35 Case 1: Infeasibility No solution to the LP problem satisfies all the constraints, including the non-negativity conditions. Graphically, this means a feasible region does not exist. Causes include: A formulation error has been made. Too many restrictions have been placed on the problem (i.e. the problem is over-constrained).

36 Example: Infeasible Problem
Consider the following LP problem. Max 2x1 + 6x2 s.t x1 + 3x2 < 12 2x1 + x2 > 8 x1, x2 > 0

37 Example: Infeasible Problem
There are no points that satisfy both constraints, so there is no feasible region (and no feasible solution). x2 10 2x1 + x2 > 8 8 6 4x1 + 3x2 < 12 4 2 x1

38 Case 2: Unbounded Solution
The solution to a maximization LP problem is unbounded if the value of the solution may be made indefinitely large without violating any of the constraints. For real problems, this is the result of improper formulation. (Quite likely, a constraint has been inadvertently omitted.)

39 Example: Unbounded Solution
Consider the following LP problem. Max 4x1 + 5x2 s.t x1 + x2 > 5 3x1 + x2 > 8 x1, x2 > 0

40 Example: Unbounded Solution
The feasible region is unbounded and the objective function line can be moved outward from the origin without bound, infinitely increasing the objective function. x2 10 3x1 + x2 > 8 8 6 Max 4x1 + 5x2 4 x1 + x2 > 5 2 x1

41 Case 3: Infinitely Many Optimal Solutions
The objective function is parallel to a constraint line. Any point between B and C achieves the maximal value Maximize Z= 40x1 + 30x2 subject to: x1 + 2x2  40 4x2 + 3x2  120 x1, x2  0 Figure. An Example with Infinitely Many Optimal Solutions

42 Prototype Model from Hillier and Lieberman
The Wyndor Glass Co. produces high-quality glass products, including windows and glass doors. It has three plants: Plant 1 produces Aluminum frames Plant 2 produces wood frames Plant 3 produces the glass and assembles the products.

43 Product 1: An 8-foot glass door with aluminum framing
The company has decided to produce two new products. Product 1: An 8-foot glass door with aluminum framing Product 2: A 4x6 foot double-hung wood framed window Problem: Assume that all the products can be sold. The company wants to know what should be the best mix of the two products in order to maximize their total profit, subject to the restriction imposed by the limited production capacities available in the 3 plants.

44 To get the answer, we need to collect the following data:
Products produced in batches of 20, and the production rate is defined as the number of batches produced per week. To get the answer, we need to collect the following data: (a). Number of hours of production time available per week in each of plant for new products (available capacity); (b). Production time used (needed) in each plant for producing each batch of each new product (production rate); (c). Profit per batch of each new product (unit contribution).

45 (a) Number of hours of production time available per week in each plant for these two new products. (Most of the time in the 3 plants is already committed to current products, so the available capacity for the 2 new products is quite limited). The number of hours of production time available per week for the new products: in Plant 1 is at most 4; in Plant 2 is at most 12; in Plant 3 is at most 18.

46 To produce each batch of Product 1, the production time needed
(b) The production time (number of hours) used in each plant for the production of one batch of each new product (Product 1 requires some production capacity in Plants 1 and 3, but none in Plant 2; Product 2 needs only Plants 2 and 3 but not 1). To produce each batch of Product 1, the production time needed in Plant 1 is : 1 hour; in Plant 2 is : 0 hours; in Plant 3 is : 3 hours. To produce each batch of Product 2, the production time needed in Plant 1 is : 0 hour; in Plant 2 is : 2 hours; in Plant 3 is : 2 hours.

47 it is $3,000 for Product 1; it is $5,000 for Product 2。
(c) Profit per batch produced of each new product: it is $3,000 for Product 1; it is $5,000 for Product 2。 The data collected are summarized in Table 3.1. This is a linear programming problem of the classic product mix type.

48 Formulation as a Linear Programming Problem
We put: x1 = number of batches of product 1 produced per week x2 = number of batches of product 2 produced per week Z = total profit (in 1000 dollars) from producing the two new products.  x1 and x2 are the decision variables. Using the data of Table 3.1: (Plant 1:Total production time required) (Production time available, Plant 1) (Plant 2:Total production time required) (Production time available, Plant 2) (Plant 3:Total production time required) (Production time available, Plant 3)

49

50 Graphical Solution Fig Shaded area shows values of (x1, x2) allowed by x1 ≥ 0, x2 ≥ 0, x1 ≤ 4 Fig Shaded area shows values of (x1, x2) , called feasible region

51 Fig. 3.3 The value of (x1, x2) that maximize 3x1 + 5x2 is (2, 6)

52 Additional Example: Design of Radiation Therapy
Goal: select best combination of beams and their intensities to generate best possible dose distribution (dose is measured in kilorads) A large malignant tumor (恶性肿瘤) is in the bladder area 1(膀胱). Beam 1 and 2 are used to pass ionizing radiation through patient’s body, damaging both cancerous (1) and healthy tissues (2,3, etc).

53 Requirements for the beam’s aggregate dose on each part:
a. center of tumor, should be above certain level, to kill the malignant tumor; b. within the tumor area, should be large enough to kill the malignant cells but also be small enough not to kill the healthy ones; c. critical issues (组织), should be below certain level for healthy concern; d. same reason for the entire healthy anotomy(人体), should be minimized.

54 Scientific research gives the following data:

55 Let x1 and x2 be the dose (in kilorads) at the entry point for Beam 1 and Beam 2, respectively.

56 Additional Example: Reclaiming Solid Wastes
SAVE-IT company collects and treats four types of solid waste materials Materials amalgamated into salable products(合格品); Three different grades of product possible; Fixed treatment cost covered by grants; Objective: maximize the net weekly profit. a. determine amount of each product grade b. Determine mix of materials to be used for each grade

57 4 Materials (1,2,3,4) 3 Products (A, B, C)

58 Capacity and restrictions on Materials

59 To fix the decision variables
A direct way (as indicated in the text) is to put (i=A,B,C, j=1,…,4): yi = number of pounds of product grade i produced per week zij = proportion of product grade j in product grade i and let yi and zij be the decision variables. We then obtain: number of pounds of material j used per week = zAj yA + zBj yB + zCj yC, And one constraint we have in the model is: zAj yA + zBj yB + zCj yC≦ However, this is not a legitimate linear programming problem, as zAj yA + zBj yB + zCj yC is not a linear function of yi , zij (decision variables)

60

61 Constraints: amalgamation

62 Constraints: treatment

63 Objective function Maximize Z= (8.5-3)( xA1+ xA2+xA3+xA4)+
Recall: xij = zij yj is the number of pounds of materials j allocated to product grades i per week. Let Z be the company’s total net revenue (which does not include the treatment cost 3000$ covered by grants) Maximize Z= (8.5-3)( xA1+ xA2+xA3+xA4)+ + (7-2.5)( xB1+ xB2+xB3+xB4) + (5.5-2)( xB1+ xB2+xB3+xB4). No way to solve the problem by graphical method. Use Excel Solver.


Download ppt "Operations Research Instructor: Xiaoxi Li (李晓蹊) Wuhan University, Fall"

Similar presentations


Ads by Google