Linear Programming: Formulation and Applications Chapter 3: Hillier and Hillier Agenda Discuss Resource Allocation Problems – Super Grain Corp. Case Study – Integer Programming Problems – TBA Airlines Case Study Discuss Cost-Benefit-Tradeoff-Problems Discuss Distribution Network and Transportation Problems Characteristics of Transportation Problems – The Big M Company Case Study Modeling Variants of Transportation Problems Characteristics of Assignment Problems – Case Study: The Sellmore Company Modeling Variants of Assignment Problems Mixed Problems Resource Allocation Problems It is a linear programming problem that involves the allocation of resources to activities. – The identifying feature for this model is that constraints looks like the following form: • Amount of resource used Amount of resource available Resource Constraint A resource constraint is defined as any functional constraint that has a sign in a linear programming model where the amount used is to the left of the inequality sign and the amount available is to the right. The Super Grain Corp. Case Study Super Grain is trying to launch a new cereal campaign using three different medium: – TV Commercials (TV) – Magazines (M) – Sunday Newspapers (SN) The have an ad budget of $4 million and a planning budget of $1 million The Super Grain Corp. Case Study Cont. Costs Cost TV Category Ad Budget $300,000 Magazine Newspaper $150,000 $100,000 Planning Budget # of Exposures $90,000 $30,000 $40,000 1,300,000 600,000 500,000 The Super Grain Corp. Case Study Cont. A further constraint to this problem is that no more than 5 TV spots can be purchased. Currently, the measure of performance is the number of exposures. The problem to solve is what is the best advertising mix given the measure of performance and the constraints. Mathematical Model of Super Grain’s Problem Max w.r .t .TV , M , SN 1300TV 150 M 500 SN subjectto : 300TV 150 M 100 SN 4000 90TV 30 M 40 SN 1000 TV 5 TV 0, M 0, SN 0 Resource-Allocation Problems Formulation Procedures Identify the activities/decision variables of the problem needs to be solved. Identify the overall measure of performance. Estimate the contribution per unit of activity to the overall measure of performance. Identify the resources that can be allocated to the activities. Resource-Allocation Problems Formulation Procedures Cont. Identify the amount available for each resource and the amount used per unit of each activity. Enter the data collected into a spreadsheet. Designate and highlight the changing cells. Enter model specific information into the spreadsheet such as and create a column that summarizes the amount used of each resource. Designate a target cell with the overall performance measure programmed in. Types of Integer Programming Problems Pure Integer Programming (PIP) – These problems are those where all the decision variables must be integers. Mixed Integer Programming (MIP) – These problems only require some of the variables to have integer values. Types of Integer Programming Problems Cont. Binary Integer Programming (BIP) – These problems are those where all the decision variables restricted to integer values are further restricted to be binary variables. – A binary variable are variables whose only possible values are 0 and 1. – BIP problems can be separated into either pure BIP problems or mixed BIP problems. – These problems will be examined later in the course. Case Study: TBA Airlines TBA Airlines is a small regional company that uses small planes for short flights. The company is considering expanding its operations. TBA has two choices: – Buy more small planes (SP) and continue with short flights – Buy only large planes (LP) and only expand into larger markets with longer flights – Expand by purchasing some small and some large planes TBA Airlines Cont. Question: How many large and small planes should be purchased to maximize total net annual profit? Case Study: TBA Airlines Net Profit Per Plane Purchase cost Maximum Quantity Small Plane $1 million 5 mil. 2 Large Plane $5 million 50 mil. N/A Capital Available $100 mil. Mathematical Model for TBA Max SP 5 LP SP , LP subject to : 5SP 50LP 100 SP 2 SP, LP 0 Graphical Method for Linear Programming Number of large airplanes purchased L 3 2 (2, 1.8) = Optimal solution Profit = 11 = S + 5 L 1 0 Feasible region (2, 1) = Rounded solution (Profit = 7) 1 2 3 Number of small airplanes purchased S Divisibility Assumption of LP This assumption says that the decision variables in a LP model are allowed to have any values that satisfy the functional and nonnegativity constraints. – This implies that the decision variables are not restricted to integer values. Note: Implicitly in TBA’s problem, it cannot purchase a fraction of a plane which implies this assumption is not met. The Challenges of Rounding It may be tempting to round a solution from a non-integer problem, rather than modeling for the integer value. There are three main issues that can arise: – Rounded Solution may not be feasible. – Rounded solution may not be close to optimal. – There can be many rounded solutions New Mathematical Model for TBA Max SP 5LP SP , LP subject to : 5SP 50LP 100 SP 2 SP, LP 0 SP, LP integer The Graphical Solution Method For Integer Programming Step 1: Graph the feasible region Step 2: Determine the slope of the objective function line Step 3: Moving the objective function line through this feasible region in the direction of improving values of the objective function. Step 4: Stop at the last instant the the objective function line passes through an integer point that lies within this feasible region. – This integer point is the optimal solution. Graphical Method for Integer Programming L Number of large 3 airplanes purchased 2 1 0 (0, 2) = Optimal solution for the integer programming problem (Profit = 10) (2, 1.8) = Optimal solution for the LP relaxation (Profit = 11) Profit = 10 = S + 5 L (2, 1) = Rounded solution (Profit = 7) 1 2 3 Number of small airplanes purchased S Cost-Benefit-Trade-Off Problems It is a linear programming problem that involves choosing a mix of level of various activities that provide acceptable minimum levels for various benefits at a minimum cost. – The identifying feature for this model is that constraints looks like the following form: • Level Achieved Minimum Acceptable Level Benefit Constraints A benefit constraint is defined as any functional constraint that has a sign in a linear programming model where the benefits achieved from the activities are represented on the left of the inequality sign and the minimum amount of benefits is to the right. Union Airways Case Study Union Airways is an airline company trying to schedule employees to cover it shifts by service agents. Union Airways would like find a way of scheduling five shifts of workers at a minimum cost. Due to a union contract, Union Airways is limited to following the shift schedules dictated by the contract. Union Airways Case Study The shifts Union Airways can use: – – – – – Shift 1: 6 A.M. to 2:00 P.M. (S1) Shift 2: 8 A.M. to 4:00 P.M. (S2) Shift 3: 12 P.M. to 8:00 P.M. (S3) Shift 4: 4 P.M. to 12:00 A.M. (S4) Shift 5: 10 P.M. to 6:00 A.M. (S5) A summary of the union limitations are on the next page. Union Airways Case Study Cont. Time Periods Covered by Shifts Time Period S1 S2 S3 S4 S5 Minimum # of Agents Needed 6 AM to 8 AM 8 AM to 10 AM 10 AM to 12 PM 65 12 PM to 2 PM 87 Daily Cost Per Agent $170 48 79 $160 $175 $180 $195 Union Airways Case Study Cont. Time Periods Covered by Shifts Time Period S1 2 PM to 4 PM S2 S3 S4 S5 64 73 6 PM to 8 PM 82 8 PM to 10 PM 43 4 PM to 6 PM Daily Cost Per Agent $170 Minimum # of Agents Needed $160 $175 $180 $195 Union Airways Case Study Cont. Time Periods Covered by Shifts Time Period S1 10 PM to 12 AM 12 AM to 6 AM Daily Cost Per Agent $170 S2 S3 S4 S5 Minimum # of Agents Needed 52 15 $160 $175 $180 $195 Mathematical Model of Union Airway’s Problem MIN w.r .t . S 1, S 2 , S 3, S 4 , S 5 170 * S1 160 * S 2 175 * S 3 180 * S 4 195 * S 5 subjectto : S1 48, S1 S 2 79, S1 S 2 65, S1 S 2 S 3 87, S 2 S 3 64, S 3 S 4 73, S 3 S 4 82, S 4 43, S 4 S 5 52 S 5 15 S1, S 2, S 3, S 4, S 5 0 Cost-Benefit-Trade-Off Problems Formulation Procedures The procedures for this type of problem is equivalent with the resource allocation problem. Distribution Network Problems This is a problem that is concerned with the optimal distribution of goods through a distribution network. – The constraints in this model tend to be fixedrequirement constraints, i.e., constraints that are met with equality. – The left hand side of the equality represents the amount provided of some type of quantity, while the right hand side represents the required amount of that quantity. Transportation Problems Transportation problems are characterized by problems that are trying to distribute commodities from a any supply center, known as sources, to any group of receiving centers, known as destinations. Two major assumptions are needed in these types of problems: – The Requirements Assumption – The Cost Assumption Transportation Assumptions The Requirement Assumption – Each source has a fixed supply which must be distributed to destinations, while each destination has a fixed demand that must be received from the sources. The Cost Assumption – The cost of distributing commodities from the source to the destination is directly proportional to the number of units distributed. The General Model of a Transportation Problem Any problem that attempts to minimize the total cost of distributing units of commodities while meeting the requirement assumption and the cost assumption and has information pertaining to sources, destinations, supplies, demands, and unit costs can be formulated into a transportation model. Feasible Solution Property A transportation problem will have a feasible solution if and only if the sum of the supplies is equal to the sum of the demands. – Hence the constraints in the transportation problem must be fixed requirement constraints. Visualizing the Transportation Model When trying to model a transportation model, it is usually useful to draw a network diagram of the problem you are examining. – A network diagram shows all the sources, destinations, and unit cost for each source to each destination in a simple visual format like the example on the next slide. Network Diagram Supply c11 S1 Source 1 c12 c13 c1m S2 Source 2 c21 c22 c23 c2m S3 Source 3 . . . Sn Source n Demand Destination 1 D1 Destination 2 D2 Destination 3 D3 c31 c32 c33 c3m cn1 cn2 cn3 cnm . . . Destination m Dm General Mathematical Model of Transportation Problems c11x11 c12 x12 c1m x1m n m Min i 1 j 1 cij xij c21x21 c22 x22 c2 m x2 m x11 , x12 ,..., x1 m x21 , x22 ,..., x2 m cn1 xn1 cn 2 xn 2 cnm xnm xn1 , xn 2 ,..., xnm General Mathematical Model of Transportation Problems Cont. Subject to : x11 x12 x1m S1 x 21 x 22 x 2m S 2 x n1 x n2 x nm Sn x11 x 21 x m1 D1 x12 x 22 x m2 D 2 x1m x 2m x nm Dm x ij 0 (i 1,2,..., n; j 1,2,..., m) Solving a Transportation Problem When Excel solves a transportation problem, it uses the regular simplex method. Due to the characteristics of the transportation problem, a faster solution can be found using the transportation simplex method. – Unfortunately, the transportation simplex model is not programmed in Solver. Integer Solutions Property If all the supplies and demands have integer values, then the transportation problem with feasible solutions is guaranteed to have an optimal solution with integer values for all its decision variables. – This implies that there is no need to add restrictions on the model to force integer solutions. Big M Company Case Study Big M Company is a company that has two lathe factories that it can use to ship lathes to its three customers. The goal for Big M is to minimize the cost of sending the lathes to its customer while meeting the demand requirements of the customers. Big M Company Case Study Cont. Big M has two sets of requirements. – The first set of requirements dictates how many lathes can be shipped from factories 1 and 2. – The second set of requirements dictates how much each customer needs to get. A summary of Big M’s data is on the next slide. Big M Company Case Study Cont. Shipping Cost for Each Lathe Customer 1 Customer 2 Customer 3 Output Factory 1 $700 $900 $800 12 Factory 2 $800 $900 $700 15 8 9 Order Size 10 Big M Company Case Study Cont. The decision variables for Big M are the following: – – – – – – How much factory 1 ships to customer 1 (F1C1) How much factory 1 ships to customer 2 (F1C2) How much factory 1 ships to customer 3 (F1C3) How much factory 2 ships to customer 1 (F2C1) How much factory 2 ships to customer 2 (F2C2) How much factory 2 ships to customer 3 (F2C3) Big M Company Case Study Cont. Customer 1 10 Lathes $700 Factory 1 12 Lathes $900 $800 Customer 2 8 Lathes $800 Factory 2 15 Lathes $900 Customer 3 9 Lathes $700 Mathematical Model for Big M’s Problem MIN w.r .t . F 1C1, F 1C 2 , F 1C 3, F 2 C1, F 2 C 2 , F 2 C 3 7 * F1C1 9 * F1C 2 8 * F1C 3 8 * F 2C1 9 * F 2C 2 7 * F 2C 3 subjectto : F1C1 F1C 2 F1C 3 12 F 2C1 F 2C 2 F 2C 3 15 F1C1 F 2C1 10 F1C 2 F 2C 2 8 F1C 3 F 2C 3 9 F1C1, F1C 2, F1C 3, F 2C1, F 2C 2, F 2C 3 0 Modeling Variants of Transportation Problems In many transportation models, you are not going to always see supply equals demand. With small problems, this is not an issue because the simplex method can solve the problem relatively efficiently. With large transportation problems it may be helpful to transform the model to fit the transportation simplex model. Issues That Arise with Transportation Models Some of the issues that may arise are: – The sum of supply exceeds the sums of demand. – The sum of the supplies is less than the sum of demands. – A destination has both a minimum demand and maximum demand. – Certain sources may not be able to distribute commodities to certain destinations. – The objective is to maximize profits rather than minimize costs. Method for Handling Supply Not Equal to Demand When supply does not equal demand, you can use the idea of a slack variable to handle the excess. A slack variable is a variable that can be incorporated into the model to allow inequality constraints to become equality constraints. – If supply is greater than demand, then you need a slack variable known as a dummy destination. – If demand is greater than supply, then you need a slack variable known as a dummy source. Handling Destinations that Cannot Be Delivered To There are two ways to handle the issue when a source cannot supply a particular destination. – The first way is to put a constraint that does not allow the value to be anything but zero. – The second way of handling this issue is to put an extremely large number into the cost of shipping that will force the value to equal zero. Assignment Problems Assignment problems are problems that require tasks to be handed out to assignees in the cheapest method possible. The assignment problem is a special case of the transportation problem. Characteristics of Assignment Problems The number of assignees and the number of task are the same. Each assignee is to be assigned exactly one task. Each task is to be assigned by exactly one assignee. There is a cost associated with each combination of an assignee performing a task. The objective is to determine how all of the assignments should be made to minimize the total cost. Case Study: Sellmore Company Sellmore is a marketing company that needs to prepare for an upcoming conference. Instead of handling all the preparation work inhouse with current employees, they decide to hire temporary employees. The tasks that need to be accomplished are: – – – – Word Processing Computer Graphics Preparation of Conference Packets Handling Registration Case Study: Sellmore Company Cont. The assignees for the task are: – – – – Ann Ian Joan Sean A summary of each assignees productivity and costs are given on the next slide. Case Study: Sellmore Company Cont. Required Time Per Task Employee Word Processing Graphics Packets Registration Wage Ann 35 41 27 40 $14 Ian 47 45 32 51 $12 Joan 39 56 36 43 $13 Sean 32 51 25 46 $15 Assignment of Variables xij – i = 1 for Ann, 2 for Ian, 3 for Joan, 4 for Sean – j = 1 for Processing, 2 for Graphics, 3 for Packets, 4 for Registration Mathematical Model for Sellmore Company 490 x11 574 x12 378 x13 560 x14 Minimize 564 x21 540 x22 384 x23 612 x24 x11 , x12 , x13 , x14 x21 , x22 , x23 , x24 507 x31 728 x32 468 x33 559 x34 x31 , x32 , x33 , x34 480 x31 765 x32 375 x33 690 x34 Mathematical Model for Sellmore Company Cont. Subject to : x11 x12 x13 x14 1 1 x11, x12 , x13 , x14 0 x21 x22 x23 x24 1 1 x21 , x22 , x23 , x24 0 x31 x32 x33 x34 1 1 x31 , x32 , x33 , x34 0 x41 x42 x43 x44 1 1 x31 , x32 , x33 , x34 0 x11 x21 x31 x41 1 x12 x22 x32 x42 1 x13 x23 x33 x43 1 x14 x24 x34 x44 1 Modeling Variants of the Assignment Problem Issues that arise: – Certain assignees are unable to perform certain tasks. – There are more task than there are assignees, implying some tasks will not be completed. – There are more assignees than there are tasks, implying some assignees will not be given a task. – Each assignee can be given multiple tasks simultaneously. – Each task can be performed jointly by more than one assignee. Mixed Problems A mixed linear problem is one that has some combination of resource constraints, benefit constraints, and fixed requirement constraints. Mixed problems tend to be the type of linear programming problem seen most.