1 / 60

Mathematical Modelling

Mathematical Modelling. Dr. Michael Hanke Dept. of Quant. Management (Operations Research). Contents. Formulation of Math. Programming Problems Network Analysis PERT-CPM Inventory Models Data Envelopment Analysis Transportation and Route Planning Introduction to LINGO.

aron
Download Presentation

Mathematical Modelling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mathematical Modelling Dr. Michael Hanke Dept. of Quant. Management (Operations Research)

  2. Contents • Formulation of Math. Programming Problems • Network Analysis • PERT-CPM • Inventory Models • Data Envelopment Analysis • Transportation and Route Planning • Introduction to LINGO

  3. Formulation of Math. Programming Problems • Use of Indicator Variables • Fixed-Charge Problem • Logical Constraints • Peculiarities of Integer and Binary Programming • Solution of Binary Programs

  4. Introductory Example A company is considering expansion by building a new factory in either L.A. or San Francisco, or even in both cities. It also is considering building at most one new warehouse, but the choice of location is restricted to a city where a new factory is built. It has $10 million of capital available. Decision Net Present Value Capital Required Build factory in L.A. $9 million $6 million Build factory in S.F. $5 million $3 million Build warehouse in L.A. $6 million $5 million Build warehouse in S.F. $4 million $2 million

  5. Example 1: Choices When Decision Variables Are Continuous Product 1 2 3 Available Hours per Week Plant 1 3 4 2 30 2 4 6 2 40 Unit Profit 5 7 3 (thousands of $) Sales Potential 7 5 9 (units per week) Additional Restrictions: + At most two of the products should be produced. + Just one of the plants should be chosen to produce the products.

  6. Example 2: Violating Proportionality A company is considering purchasing a total of 5 TV spots for three of its products. The question is how to allocate the spots to the products with a maximum of three spots per product. Profit for Product No. of Spots 1 2 3 0 0 0 0 1 1 0 -1 2 3 2 2 3 3 3 4

  7. Example 3: Covering Problem An airline needs to assign its crews to cover upcoming flights. Three crews based in San Francisco are to be assigned to the flights shown on the following slide. Exactly 3 out of 12 possible sequences need to be chosen in such a way that every flight is covered. It is permissible to have more than one crew on one flight, where the extra crew would fly as passengers, but still be paid as if they were working. The cost of assigning a crew to a particular sequence of flights is given in gehe bottom row of the table. The objective is to minimize the total cost of the three crew assignments that cover all the flights.

  8. Problem 12.1-2. Investment Opportunity 1 2 3 4 5 6 7 Net present value 17 10 15 19 7 13 9 Capital required 43 28 34 48 17 32 23 Total amount of capital available: $100 million * Alternative 1 and 2 are mutually exclusive, and so are 3 and 4. * Neither 3 nor 4 can be taken unless one of the first two is taken. Objective: Select the combination that maximizes net present value. Formulate a BIP model for this problem.

  9. Additional Questions in IP/BIP • No. of constraints vs. no. of variables • Notion of „LP relaxation“ • Rounding - pro‘s and con‘s

  10. Automatic Problem Preprocessing for Pure BIP • Fixing variables • Eliminating redundant constraints • Tightening constraints

  11. Fixing Variables • If one value of a variable cannot satisfy a certain requirement, even when the other variables equal their best values for trying to satisfy the constraint, then that variable should be fixed at its other value. • Procedure: For any -constraint, identify the variable with the largest positive coefficient. If the sum of that coefficient and any negative coefficient exceeds the RHS, then that variable should be fixed at 0 (analogously, for -constraints, this may enable us to fix variables at a value of 1).

  12. Eliminating Redundant Constraints • Redundant constraints are constraints that are satisfied even by the „most challenging“ binary solution. • Procedure: For a -constraint, set all variables with positive coefficients equal to 1, all others to 0 (and vice versa for -constraints). • Often, constraints become redundant after fixing variables!

  13. Tightening constraints • Tightening constraints reduces the feasible region for the LP relaxation without eliminating any feasible solutions for the BIP problem. Thus, the chance of the solution of the relaxed problem to coincide with the solution of the BIP problem is increased. • Procedure (for -constraints): • Calculate the sum S of the positive aj. • Identify any aj0 such that S<b+|aj| a) if none, stop. b) if aj>0, go to step 3, otherwise go to step 4. • (aj>0) Calculate aj*=S-b and b*=S-aj. Reset aj=aj* and b=b*. Go to step 1. • (aj<0) Increase aj to aj=b-S. Go to step 1.

  14. Generating Cutting Planes for BIPs • A cutting plane („cut“) for any IP problem is a new functional constraint that reduces the feasible region for the LP relaxation without eliminating any feasible solution for the IP problem. • Procedure: • Consider any functional constraint in -form with only positive coefficients. • Find a group of N variables (called a minimum cover) such that a) the constraint is violated if every variable in the group equals 1 and all other variables equal 0. b) but becomes satisfied if the value of any one of these variables is changed from 1 to 0. • The cutting plane has the form sum of variables in group N-1

  15. Problem 12.2-2. Product 1 2 3 4 Start-up cost 50000 40000 70000 60000 Marginal revenue 70 60 90 80 * No more than two of the products can be produced. * Either product 3 or product 4 can be produced only if either product 1 or product 2 is produced. * Either 5x1+3x2+6x3+4x46000 or 4x1+6x2+3x3+5x46000 Introduce auxiliary binary variables to formulate an MIP model.

  16. Problem 12.2-4. max Z=3x1+2f(x2)+2x3+3g(x4) s.t. 1) 2x1-x2+x3+3x415 2) At least one of the following two inequalities holds: x1+x2+x3+x44 3x1-x2-x3+x43 3) At least two of the following four inequalities hold: 5x1+3x2+3x3-x410 2x1+5x2-x3+3x410 -x1+3x2+5x3+3x410 3x1-x2+3x3+5x410 4) x3{1,2,3}, xj0 5)

  17. Problem 12.3-4. max Z=4x12-x13+10x22-x24 s.t. x1+x23 x1,x20, x1,x2Z Formulate a BIP model where the binary variables have the interpretation Formulate a BIP model where the binary variables have the interpretation

  18. Problem 12.4-1. max Z=5x1+2x2 s.t. -x1+2x24 x1-x21 4x1+x212 x1,x20, x1,x2Z a) Solve this problem graphically b) Solve the LP relaxation graphically, round the solution in all possible ways and check the solutions for feasibility and opti- mality.

  19. Problem 12.7-1. For each of the following constraints of pure BIP problems, use the constraint to fix as many variables as possible: a) 4x1+x2+3x3+2x42 b) 4x1-x2+3x3+2x42 c) 4x1-x2+3x3+2x47

  20. Problem 12.7-3. Use the following set of constraints for the same pure BIP problem to fix as many variables as possible. Also identify the constraints which become redundant because of the fixed variables. 3x3-x5+x71 x2+x4+x6 1 x1-2x5+2x62 x1+x2-x40

  21. Problem 12.7-10. One of the constraints of a certain pure BIP problem is 3x1+4x2+2x3+5x47 Identify all the minimal covers for this constraint, and then give the corresponding cutting planes.

  22. Network Analysis • Prototype Example • Terminology • Shortest-Path Problem • Minimum-Spanning-Tree Problem • Maximum-Flow Problem

  23. Prototype Example

  24. Shortest-Path Problem • Objective of the nth iteration: Find the nth nearest node to the origin (repeat until n is destination) • Input for nth iteration: n-1 nearest nodes to the origin (solved for at prev. Iterations), including their shortest path and distance to the origin • Candidates for nth nearest node: Each solved node that is directly connected to one or more unsolved nodes provides a candidate - the unsolved node with the shortest connecting link • Calculation of nth nearest node: For each solved node and the candidate, add the distance between them and the distance of the shortest path from the origin to this solved node. The candidate with the smallest sum is the nth nearest node, the shortest path is the one generating this distance.

  25. Minimum Spanning Tree Problem • Select any node arbitrarily, then connect it (i.e., add a link) to the nearest distinct node • Identify the unconnected node that is closest to a connected node, and then connect these two nodes. Repeat this step until all nodes have been connected • Tie breaking: Ties for the nearest distinct node (step 1) or the closest unconnected node (step 2) may be broken arbitrarily, and the algorithm must still yield an optimal solution. However, such ties are a signal that there may be (but need not be) multiple optimal solutions. All such optimal solutions can be identified by pursuing all ways of breaking ties to their conclusion

  26. Maximum-Flow Problem • Identify an augmenting path by finding some directed path from the supply node to the demand node in the residual network such that every arc on this path has strictly positive residual capacity (if no augmenting path exists, the net flows already assigned constitute an optimal flow pattern) • Identify the residual capacity c* of this augmenting path by finding the minimum of the residual capacities of the arcs on this path. Increase the flow in this path by c* • Decrease by c* the residual capacity of each arc on this augmenting path. Increase by c* the residual capacity of each arc in the opposite direction on this augmenting path. Return to step 1

  27. Data Envelopment Analysis • Description of the Method • Example: Evaluating the Performance of Hospitals • Example: Evaluating the Performance of Universities • Some Important Aspects

  28. Data Envelopment Analysis • Purpose: DEA can be used to measure the relative efficiency of units with the same goals and objectives. • Applications: Hospitals, banks, schools,... • Algorithm: Construction of a (hypothetical) „composite unit“ (weighted average of all units under consideration), comparison of input/output of each unit to be examined with the composite unit  assessing the efficiency of each unit relative to the composite unit.

  29. Example: Hospitals • Data: Hospital Input Measure General University County State # Personnel 285.2 162.3 275.7 210.4 Supply Exp. 123.8 128.7 348.5 154.1 Bed-days av. 106.72 64.21 104.1 104.04 Output Measure Medicare patient days 48.14 34.62 36.72 33.16 Non-medicare pat. days 43.1 27.11 45.98 56.46 Nurses trained 253 148 175 160 Interns trained 41 27 23 84

  30. Example: Hospitals Components of the DEA model: For each output measure: Output of composite unit  output of unit currently investigated For each input measure: Input of composite unit  input of unit currently inv. * E Objective function: min E Interpretation: If a solution with E < 1 can be found, the unit investigated is relatively inefficient.

  31. Example: Universities There exist several slightly different formulations of DEA models. For the university example, the following model is used: Inputs yjk: Budget (excl. personnel), Personnel budget, # students Outputs xik: # graduates, # teaching hrs., # research projects, # publ. ui,vj...weights for output and input factors Basic model:

  32. Example: Universities To break the overall efficiency ek down into the components „research efficiency“ and „teaching efficiency“, the model is refined as follows: Additional variables: qj...proportion of input factor j associated with teaching (1-qj)...proportion of input factor j associated with research tk...relative teaching efficiency of university k rk...relative research efficiency of university k Additional constraints:

  33. Some Important Aspects • E < 1 means „relatively inefficient“, E = 1 does not necessarily mean „relatively efficient“ • In case of a „super-unit“ (produces the most of every output while using the least of every input), all units but the super-unit are relatively inefficient • In practical problems, roughly 50% of the operating units can be identified as inefficient • Sensitivity analysis is possible and can yield important insights: Vary one input or output of an inefficient unit at a time to see which level of this factor would turn the unit efficient

  34. Inventory Theory • Examples • Components of Inventory Models • Deterministic Models • Stochastic Models

  35. Example 1: Manufacturing Speakers for TV Sets A TV manufacturing company produces its own speakers. TV sets are assembled on a continuous production line at a rate of 8000 per month, with one speaker needed per set. Speakers are produced in batches and placed into inventory until they are needed for assembly into TV sets. The company is interested in deter-mining when to produce a batch of speakers and how many speakers to produce in each batch. Several costs must be considered: 1) Each time a batch is produced, a setup cost of 12000 is incurred. The existence of setup costs argues for producing speakers in large batches. 2) The unit production cost of a single speaker (excluding setup) is 10$, independent of the batch size produced. 3) The holding cost of keeping a speaker in stock is 0.3 per month. The existence of holding costs argues for producing small batches. 4) Each speaker not available when required leads to shortage costs of 1.10 per month.

  36. Example 2: Wholesale Distribution of Bicycles A wholesale distributor purchases bicycles from the manufacturer monthly and supplies them to various shops in response to purchase orders. The total demand from bicycle shops in a given month is uncertain. The wholesale distributor faces the problem of how many bicycles to order from the manufacturer for any given month, given the stock level leading into that month. The following costs have been determined to be important: 1) The ordering cost (fixed cost of $200 per order plus variable cost of $35 per bicycle) 2) The holding cost (= cost of maintaining an inventory, $1 per bicycle and month) 3) The shortage cost (= cost of not having a bicycle on hand when needed), estimated at $15 per bicycle. Included in this cost is loss of goodwill, cost of delay in revenue received,...

  37. Lesson Inventory models and production planning models are closely related.

  38. Components of Inventory Models • Cost of ordering/manufacturing z units: c(z) • e.g. c(z)=K+cz (linear cost function) • Holding cost • Shortage cost („unsatisfied demand cost“) • Backlogging: excess demand is not lost, but satisfied later using the next normal delivery • No backlogging: excess demand can only be satisfied by a priority shipment and is lost otherwise

  39. Components of Inventory Models • Revenue may or may not be included in the model. However, if revenue is neglected, the loss in revenue must be included into the shortage cost. • Salvage value stands for the value of items left over when no inventory is needed anymore. • The discount rate is used to take into account the time value of money (holding cost through capital tied up in inventory).

  40. The Standard EOQ Model Assumptions: • Inventory is depleted at a constant rate a • Inventory is replenished by immediate arrival of Q ordered units at the desired time Costs to be considered: • K...setup cost for producing or ordering one batch • c...unit cost for producing or purchasing one unit • h...holding cost per unit and unit of time held in inventory ?: When and by how much should the inventory be replenished so as to minimize the sum of these costs per unit of time.

  41. The Standard EOQ Model A) No shortages permitted: The time between production runs (between orders placed) is referred to as a cycle (length: Q/a). Total cost per unit time consists of the following: • production/ordering cost per cycle: K+cQ • holding cost per cycle: hQ2/2a (=hQ/2 * Q/a) • total cost per cycle: K+cQ+hQ²/2a • total cost per unit time: T=aK/Q+ac+hQ/2 • minimization by setting the first derivative to zero: dT/dQ=-aK/Q²+h/2=0

  42. The Standard EOQ Model B) Shortages permitted: Shortages are allowed, but incur a cost of p...shortage cost per unit and unit of time short, S...inventory level just after adding a batch of Q units, Q-S...shortage just before a batch of Q units is added. To determine the total costs, note that ordering costs per cycle do not change! • Holding cost per cycle: hS/2*S/a=hS²/2a (inventory only positive for a time S/a!) • shortage cost per cycle: p(Q-S)/2*(Q-S)/a=p(Q-S)²/2a • total cost per cycle: K+cQ+hS²/2a+p(Q-S)²/2a • total cost per unit time: T=aK/Q+ac+hS²/2Q+p(Q-S)²/2Q. The model has 2 decision variables (S and Q), so minimization requires setting the partial derivatives to 0.

  43. The Standard EOQ Model B) (continued) Solving these equations simultaneously leads to Optimal cycle length:

  44. The Standard EOQ Model C) Quantity discounts, no shortages permitted: If quantity discounts are introduced into the standard EOQ model, the standard procedure is to find the minimum for each of the resulting cost curves, compare the total cost per unit time, and choose the minimum.

  45. Stochastic Models A) Single period, no setup cost: „Bicycle Example“, Assumptions: • no reorders possible (production of bicycle discontinued,...) • no setup cost for wholesaler • holding cost + salvage value = $9 • selling price = $45, profit per bicycle = $25 • no goodwill lost in case of unsatisfied demand D...demand by bicycle shops (random variable), y...number of bicycles purchased by distributor Net income = 45 min{D,y} - 20y + 9 max{0,y-D}= = 45D - 45 max{0,D-y} - 20y + 9 max{0,y-D}

  46. Stochastic Models A) Single period, no setup cost (continued) Objective: minimize expected total cost Probability distribution of D is needed to determine an optimal policy: PD(d)=P{D=d} is known for all values of d Summary: • Planning is done for just a single period. • The demand D is a random variable with a known probability distribution. • There is no initial inventory at hand. • The only decision variable is y, the number of units to purchase or produce for inventory at the beginning of the period. • The objective is to minimize the expected total cost.

  47. Stochastic Models The discrete random variable D is often approximated by a continuous random variable for simplicity of solution.

  48. Stochastic Models Expected cost then becomes

  49. LINGO • Basic features of the LINGO modelling language • Basic LINGO syntax • Sets and derived sets • Example models

  50. Basic Features Lingo is a specification language - you tell it what you want, not how to do it! Lingo can solve • direct models, • simultaneous models, • optimization models, where models may be linear or non-linear, continuous or integer.

More Related