600 likes | 808 Views
Readings. Readings. Chapter 7 Integer Linear Programming. Overview. Overview. Overview. Tool Summary. Tool Summary Use binary variables to indicate whether an activity, such as a production run, is undertaken.
E N D
Readings • Readings • Chapter 7 • Integer Linear Programming
Overview • Overview
Tool Summary Tool Summary • Use binary variables to indicate whether an activity, such as a production run, is undertaken. • Write a multiple-choice constraint: The sum of two or more binary variables equals 1, so any feasible solution choose one variable to equal 1. • Write a mutually-exclusive constraint: The sum of two or more binary variables is at most 1, so any feasible solution chooses at most one variable to equal 1. All variables could equal 0. • Write a conditional constraint: An inequality constraint so that one binary variable cannot equal unless certain other binary variables also equal 1. • Write a corequisite constraint: An equality constraint of binary variables, so are either both 0 or both 1.
Machine Indicators Machine Indicators
Machine Indicators Overview Machine Use Indicators are binary variables where 0 indicates no use and 1 indicates positive use. They are part of a simple linear model of the fixed cost of machine use. For example, consider a standard Resource Allocation Problem with Machines, where the maximum machine resource available is 20. Suppose fixed setup costs of using a machine restrict machine use X so “either X = 0 or 6 < X < 20”. But “either X = 0 or 6 < X < 20” is not a linear constraint. To make “either X = 0 or 6 < X < 20” a linear constraint, introduce binary variable Y and replace the standard resource constraint X < 20 with “6Y < X < 20Y”. The linear constraints “6Y < X < 20Y” can be satisfied in one of two ways. On the one hand, if Y = 0, then the constraints read “6(0) < X < 20(0)” and so are satisfied only by X = 0. On the one hand, if Y = 1, then the constraints read “6(1) < X < 20(1)” and so are satisfied only by 6 < X < 20.
Machine Indicators Question: Ji-Yang Plastic makes plastic parts in Taiwan used in automobiles and computers. One of its major contracts involves the production of plastic printer cases for a computer company’s portable printers. The printer cases can be produced on two injection molding machines. The M-100 machine has a production capacity of 25 printer cases per hour, and the M-200 machine has a production capacity of 40 printer cases per hour. Both machines use the same chemical to produce the printer cases; the M-100 uses 40 pounds of raw material per hour, and the M-200 uses 50 pounds per hour.
Machine Indicators The computer company asked Ji-Yang to produce as many of the cases as possible during the upcoming week; it will pay $18 for each case. However, next week is a regularly scheduled vacation period for most of Ji-Yang’s production employees. During this time, annual maintenance is performed on all equipment. Because of the downtime for maintenance, the M-100 is only available for at most 15 hours, and the M-200 for at most 10 hours.
Machine Indicators The supplier of the chemical used in the production process informed Ji-Yang that a maximum of 1000 pounds of the chemical material will be available for next week’s production; the cost for this raw material is $6 per pound. In addition to the raw material cost, Ji-Yang estimates that the hourly cost of operating the M-100 and the M-200 are $50 and $75, respectively.
Machine Indicators However, because of the high setup cost on both machines, management requires that, if a machine is used at all, it must be used for at least 5 hours. (That last constraint makes the fixed cost of producing with a machine equal to the cost of using the machine for 5 hours.)
Machine Indicators Answer: • Define decision variables: • M1 = number of hours spent on the M-100 machine • M2 = number of hours spent on the M-200 machine • Total revenue = 18(25) M1 + 18(40) M2 = 450 M1 + 720 M2 • Total cost = 6(40) M1 + 6(50) M2 + 50 M1 + 75 M2 = 290 M1 + 375 M2
Machine Indicators Mixed binary formulation • Define objective: Maximize (profit = revenue-cost) 160 M1 + 345 M2 • Define constraints: • M1<15 (M-100 maximum) • M2<10 (M-200 maximum) • 40M1 + 50 M2<1000 (Raw Material) • M1>5 U1 (M-100 minimum, if M1 > 0) • M2>5 U2 (M-200 minimum, if M2 > 0) • 15U1> M1 (soU1 = 1 if M1 > 0) • 10U2> M2 (soU2 = 1 if M2 > 0) • M1, M2> 0 and U1, U2binary (0 or 1)
Machine Indicators Mixed binary formulation
Machine Indicators Mixed binary solution Use M1 for 12.5 hours, and M2 for 10 hours.
Resource Allocation with Fixed Cost • Resource Allocation with Fixed Cost
Resource Allocation with Fixed Cost Overview Resource Allocation Problems with Fixed Cost trade off the advantage of using a variety of inputs to conform to fixed resources with the positive fixed cost of using each input. The simplest way to model those fixed costs in a linear program is with binary (0 or 1) variables used as indicators, where 0 values indicate no production and 1 indicates positive production. For example, consider a standard Resource Allocation Problem, where for one of the inputs, the maximum resource available is 10, and the cost of using X is 3X. Now suppose there is an added fixed setup costs of 15. To model those fixed costs in a linear program, introduce binary variable Y, replace the resource supply constraint X < 10 with “X < 10Y”, and add the cost term 15Y so total cost becomes 3X + 15Y. The constraint “X < 10Y” can be satisfied in one of two ways. On the one hand, if X = 0, then the constraint reads “0 < 10Y” and so can be satisfied by Y = 0, and so total cost = 3X. On the one hand, if X > 0, then the constraint “X < 10Y” can only be satisfied by Y = 1, and so total cost = 3X + 15.
Resource Allocation with Fixed Cost Question: A businessman is considering opening a small specialized trucking firm. To make the firm profitable, it is estimated that it must have a daily trucking capacity of at least 12 tons. Two types of trucks are appropriate for the specialized operation. Their characteristics and costs are summarized in the table below. Note that each large truck require 2 drivers for long-haul trips. There are 8 potential drivers available and there are facilities for at most 4 trucks.
Resource Allocation with Fixed Cost The businessman's objective is to minimize the total cost outlay for trucks. Capacity Drivers TruckCost (tons)Needed Small $10,000 2 1 Large $30,000 4 2 Formulate and graphically solve a linear programming model for this problem. How many of each type of truck should be used? Reformulate the problem if the trucking firm incurs a fixed setup cost of $2 if it uses any positive quantity of small trucks, and a fixed setup cost of $4 if it uses any positive quantity of large trucks?
Resource Allocation with Fixed Cost Answer: Let S = the number of small trucks used Let L = the number of large trucks used Min 10000S + 30000L s.t. 2S + 4L > 12 (capacity constraint) S + 2L < 8 (driver constraint) S + L < 4 (facility constraint) S, L > 0 A graph of the feasible set and iso-value lines shows the optimal solution occurs where the first and third constraints bind (the second constraint is redundant). Solving the binding form of those two constraints yields the optimal solution: S = 2, L = 2.
Resource Allocation with Fixed Cost Question: How would the formulation change if the trucking firm incurs a fixed setup cost of $2 if it uses any positive quantity of small trucks, and a fixed setup cost of $4 if it uses any positive quantity of large trucks?
Resource Allocation with Fixed Cost Answer: Let SS = 1 if Small Trucks are used; 0 if not Let SY = 1 if Large Trucks are used; 0 if not Objective: Min 10000S + 30000L + 2SS + 4SY Input Constraints: 2S + 4L > 12 (capacity constraint) S + 2L < 8 (driver constraint) S + L < 4 (facility constraint) S, L > 0 Setup Constraints (given input constraints imply S < 4, L < 4): S < 4SS L < 4SL
Product Mix with Fixed Cost • Product Mix with Fixed Cost
Product Mix with Fixed Cost Overview Product Mix Problems with Fixed Cost trade off the advantage of producing a variety of goods to conform to fixed resources with the positive fixed cost of producing each good. The simplest way to model those fixed costs in a linear program is with binary (0 or 1) variables used as indicators, where 0 values indicate no production and 1 indicates positive production. For example, consider a standard Product Mix Problem, where for one of the outputs, the maximum production demanded is 10, and the cost of producing X is 3X. Now suppose there is an added fixed setup costs of 15. To model those fixed costs in a linear program, introduce binary variable Y, replace the demand constraint X < 10 with “X < 10Y”, and add the cost term 15Y so total cost becomes 3X + 15Y. The constraint “X < 10Y” can be satisfied in one of two ways. On the one hand, if X = 0, then the constraint reads “0 < 10Y” and so can be satisfied by Y = 0, and so total cost = 3X. On the one hand, if X > 0, then the constraint “X < 10Y” can only be satisfied by Y = 1, and so total cost = 3X + 15.
Product Mix with Fixed Cost Question: Iron Elegance seeks to maximize profit by making two products from steel. It just received this month's allocation of 19 pounds of steel. It takes 2 pounds of steel to make a unit of product 1, and 3 pounds of steel to make a unit of product 2. The physical plant has the capacity to make at most 6 units of product 1, and at most 8 units of total product (product 1 plus product 2). Product 1 sells for price 7, has marginal cost 2, and fixed cost 3. Product 2 sells for price 8, has marginal cost 1, and fixed cost 2. Formulate a linear program to maximize profit.
Make or Buy with Fixed Cost Answer: A mixed integer linear program can be set up to solve this problem. Binary variables are used to indicate whether or not we setup to produce the two products. • Let x1 and x2 denote this month's production level of product 1 and product 2. • y1 = 1 if x1 > 0; y1 = 0 if not • y2 = 1 if x2 > 0; y2 = 0 if not
Product Mix with Fixed Cost • The total monthly profit = (profit per unit of product 1) x (monthly production of product 1) + (profit per unit of product 2) x (monthly production of product 2) = (7-2)x1 + (8-1)x2 - 3y1 - 2y2 • Maximize total monthly profit: Max 5x1 + 7x2 - 3y1 - 2y2
Product Mix with Fixed Cost Here is a mathematical formulation of constraints. • The total amount of steel used during monthly production = (steel used per unit of product 1) x (monthly production of product 1) + (steel used per unit of product 2) x (monthly production of product 2) = 2x1 + 3x2 • That quantity must be less than or equal to the allocated 19 pounds of steel (the inequality < in the constraint below assumes excess steel can be freely disposed; if disposal is impossible, then use equality =) : 2x1 + 3x2 < 19 • The constraint that the physical plant has the capacity to make at most 6 units of product 1 is formulated x1< 6 • The constraint that the physical plant has the capacity to make at most 8 units of total product (product 1 plus product 2) is x1 + x2 < 8
Product Mix with Fixed Cost • Given resource constraint2x1 + 3x2 < 19 implies x1< 19/2 and x2 < 19/3, setup indicators x1< (19/2) y1 x2< (19/3) y2
Product Mix with Fixed Cost Adding the non-negativity and binary constraints complete the formulation. Objective function Max 5x1 + 7x2 - 3y1 - 2y2 s.t. x1< 6 2x1+ 3x2< 19 x1 + x2<8 x1< (19/2) y1 x2< (19/3) y2 x1> 0 and x2>0 y1 = 0 or 1 y2 = 0 or 1 Standard constraints Setup constraints Non-negativity Binary
Product Mix with Fixed Cost The Management Scientist can solve this mixed integer linear program of 2 binary variables Yi and 2 continuous variables Xi.
Make or Buy with Fixed Cost • Make or Buy with Fixed Cost
Make or Buy with Fixed Cost Overview Make or Buy Decisions with Fixed Cost trade off the lower unit cost of producing a good yourself with the positive fixed cost of production. The simplest way to model those fixed costs in a linear program is with binary (0 or 1) variables used as indicators, where 0 values indicate no production and 1 indicates positive production. For example, consider a standard Make or Buy Decision, where the maximum production demanded is 10, and the cost of producing X is 3X. Now suppose there is an added fixed setup costs of 15. To model those fixed costs in a linear program, introduce binary variable Y, replace the demand constraint X < 10 with “X < 10Y”, and add the cost term 15Y so total cost becomes 3X + 15Y. The constraint “X < 10Y” can be satisfied in one of two ways. On the one hand, if X = 0, then the constraint reads “0 < 10Y” and so can be satisfied by Y = 0, and so total cost = 3X. On the one hand, if X > 0, then the constraint “X < 10Y” can only be satisfied by Y = 1, and so total cost = 3X + 15.
Make or Buy with Fixed Cost Question: Sony produces remote controllers for both televisions and DVD players. Each controller consists of three subassemblies that are made by Sony --- a base, a cartridge, and a keypad. Both controllers use the same base subassembly, but different cartridge and keypad subassemblies. Sony’s sales forecast is that 7000 TV controllers and 5000 DVD controllers will be needed to satisfy demand during the upcoming Christmas season. Because only 500 hours of in-house manufacturing time is available, Sony considers buying some, or all, of the subassemblies from outside suppliers.
Make or Buy with Fixed Cost If Sony makes a subassembly, it incurs a fixed setup cost as well as a variable manufacturing cost. For each subassembly, the following are the fixed setup costs, the manufacturing time, the manufacturing costs, and the purchase costs:
Make or Buy with Fixed Cost Formulate a linear program to determine the optimal production and purchase of each subassembly.
Make or Buy with Fixed Cost Answer: A mixed integer linear program can be set up to solve this problem. Binary variables are used to indicate whether or not we setup to produce the subassemblies. • SB = 1 if bases are produced; 0 if not • STVC = 1 if TV cartridges are produced; 0 if not • SVCRC = 1 if VCR cartridges are produced; 0 if not • STVP = 1 if TV keypads are produced; 0 if not • SVCRP = 1 if VCR keypads are produced; 0 if not
Make or Buy with Fixed Cost Continuous variables are used for the number of units made or purchased. • BM = Number of bases made • BP = Number of bases purchased • TVCM = Number of TV cartridges made • TVCP = Number of TV cartridges purchased • VCRCM = Number of VCR cartridges made • VCRCP = Number of VCR cartridges purchased • TVPM = Number of TV keypads made • TVPP = Number of TV keypads purchased • VCRPM = Number of VCR keypads made • VCRPP = Number of VCR keypads purchased
Make or Buy with Fixed Cost Minimize cost (manufacturing cost) 0.4BM+2.9TVCM+3.15VCRCM+0.3TVPM+0.55VCRPM (purchase cost) +0.65BP+3.45TVCP+3.7VCRCP+0.5TVPP+0.7VCRPP (setup cost) +1000SB+1200STVC+1900SVCRC+1500STVP+1500SVCRP
Make or Buy with Fixed Cost Demand constraints 1) BM+BP=12000 2) TVCM+TVCP=7000 3) VCRCM+VCRCP=5000 4) TVPM+TVPP=7000 5) VCRPM+VCRPP=5000
Make or Buy with Fixed Cost Manufacturing time constraint (in minutes) 6) 0.9BM+2.2TVCM+3VCRCM+0.8TVPM+1VCRPM < 30000 Setup indicators (given demand constraints) 7) BM-12000SB < 0 8) TVCM-7000STVC < 0 9) VCRCM-5000SVCRC < 0 10) TVPM-7000STVP < 0 11) VCRPM-5000SVCRP < 0
Make or Buy with Fixed Cost The Management Scientist can solve this mixed integer linear program of 5 binary variables and 10 continuous variables.
Relational Constraints • Relational Constraints
Relational Constraints Overview Relational Constraints such as “either project i or project j is completed” or “both project i and project j are completed” can be written as linear constraints in binary indicator variables.
Relational Constraints • Binary variables can allow mathematical formulations of some intricate verbal descriptions. • Let xiand xj represent binary variables designating whether projects i and j have been completed (1 means completed, 0 means not completed). • The constraint “either project i or project j is completed” is formulated xi + xj> 1. In particular, xi + xj> 1 if both projects are completed (both variables equal 1) • That is the standard use of “or” in quantitative or mathematical work. It is the inclusive “or”. • For another example, if you are told “your friend is either at the snack bar or on the tennis court”, then you are told the truth if your friend is on the tennis court.
Relational Constraints • The constraint “either project i or project j is completed, but not both” is formulated xi + xj = 1. In particular, xi + xj = 1 is false if both projects are completed (both variables equal 1). • The relation “xi + xj = 1” is sometimes called the exclusive “or”. • There is debate over whether the English word “or” is inclusive or exclusive. • Some say “you may have coffee or tea” is an example of an exclusive “or”. But it turns out that “or” is not a logical or at all because “you may have coffee or tea” is not considered true if you can only have coffee. • In this class, “or” will only mean the inclusive “or”.
Relational Constraints Summary Let xi be a binary variables that is 1 if project i is done; xjlikewise. • xi + xj = 1 means “either project i or project j is done, but not both” • xi + xj< 1 means “project i and project j are not both done” • xi + xj< 1 means “project i and project j will not both be done” • xi + xj> 1 means “at least one of project i or project j is done” • xi<xj means “if project i is done, then project j is done” • xi>xj means “project i is done if project j is done” • xi<xj means “project i is done only if project j is done” • xi = xj means “project i is done if, and only if, project j is done” • xi<xj means “project i will not be done unless project j is done” • xi<xj means “project i will not be done unless project iand project j are done”
Relational Constraints Question: Springer Verlag, a publisher of college textbooks, must decide which new books to adopt and publish next year. The books under consideration are described in the first column below, along with their expected three-year sales in the second column: Book Sales John Susan Monica Business Math 20 12 40 X Finite Math 32 9 24 X General Statistics 17 16 X 30 Mathematical Statistics 10 7 X 24 Business Statistics 25 8 X 16 Finance 18 X X 14
Relational Constraints Three individuals in the company can be assigned to these projects, all of whom have varying amounts of time available. John has 60 days, Susan has 52 days, and Monica has 43 days. The days required by each person to complete each project are showing in the third, fourth, and fifth columns above. For example, if the business calculus book is published, it will require 30 days of John’s time and 40 days of Susan’s time. (X means 0 time.)
Relational Constraints Springer Verlag will not publish more than two statistics books in a single year. And one of the math books must be published, but not both. And the business math will be published only if the finance is published. And the general statistics will be published if the finite math is published. And the mathematical statistics and the finance will not both be published. Formulate a model to decide which books should be published to maximize sales.
Relational Constraints Answer: where 1 is the business calculus book, 2 is the finite math book, … . Here is a binary programming model for maximizing projected sales (thousands of units) subject to the restrictions mentioned.