Mathematics for Management Science Notes 07 prepared by Professor Jenny Baglivo © Jenny A. Baglivo 2002. All rights reserved. Calculus and nonlinear programming (NLP): In nonlinear programming (NLP), either the objective function or the constraints or both are nonlinear functions of the decision variables. Solver will use a sequence of approximations to search for a solution. There are several important things to note about Solver implementations: • • • • You need to supply a valid feasible point as a starting point of the search. (In all of the previous cases, initializing all the changing cells with zero was fine. In fact, the algorithms never looked at the initial values in the changing cells.) The algorithm then takes “steps” in its search for an optimal solution. At each point, the direction of the search is the one judged to give the maximum improvement in the objective function value. At the point where the algorithm judges that no improvement is possible from the current position, it declares victory and reports the results. You may not get the optimum solution. (1) You may be at a local optimum instead of a global optimum. (2) The step size may not be set correctly to judge whether or not searching further would improve the optimum value. • To counteract problem (1), you can start the search at many different initial values, using points that are of the same magnitude as where you expect the solution to be. To counteract problem (2), you can use an “automatic scaling” option in the Solver options box. Ideas from calculus are central to NLP problems. So, we will review one-variable calculus and introduce ideas from two-variable calculus. Example 1: Consider the one-variable function f(x) = –3 x4 + 4 x3 + 12 x2 + 40 when 0 ≤ x ≤ 3, whose graph is at the top of the next page. Notice that • • The maximum value is f(2)=72, which occurs at an interior point of the interval and The minimum value is f(3)=13, which occurs at an endpoint of the interval. page 1 of 17 We will consider the slope of the curve at various points in the interval. For example, the slope at the point (1,f(1)) = (1,53) is obtained as the limit of a sequence of approximations, as illustrated below: x 0.000 0.500 0.900 0.990 0.999 f(x) 40.0000 43.3125 50.6677 52.7606 52.9760 Slope = (f(x)-f(1))/(x-1) 13.0000 19.3750 23.3230 23.9392 23.9940 The slope of the curve when x=1 is the limit of the approximations: f’(1) = 24. page 2 of 17 Rules for finding the derivative function (f’(x) ) in simple cases: (1) The derivative of a constant function is 0: d(C)/dx = 0 where C is a constant. (2) The derivative of a linear function is its slope: d(m x + b)/dx = m where m and b are constants. (3) The derivative of a simple power function is as follows: d(xn)/dx = n xn-1 where n is a constant power. (4) The derivative of the sum of two functions is the sum of the derivatives: d(f(x)+g(x))/dx = d(f(x))/dx + d(g(x))/dx = f’(x) + g’(x). (5) The derivative of a constant multiple of a function is the constant times the derivative of the function. d(C f(x))/dx = C d(f(x))/dx = C f’(x). When a function has a derivative, it is said to be differentiable. Example 1, continued: Fill-in the blanks f’(x) = _______________________________________________________ f’(1) = _____________________ f’(2) = _____________________ f’(3) = _____________________ page 3 of 17 Example 2: Consider the function f(x) = 2500/x + 2 + 0.00125 x2 when 10 ≤ x ≤ 400. Fill-in the blanks: f’(x) = _______________________________________________________ f’(100) = _____________________ f’(200) = _____________________ f’(300) = _____________________ page 4 of 17 Local and global optimum points: • f(x) has a local maximum at x=C (or at (x,y)=(C,f(C))) when f(C) is the largest value of the function for all x near C. • • • f(x) has a local minimum at x=C (or at (x,y)=(C,f(C))) when f(C) is the smallest value of the function for all x near C. f(x) has a global maximum at x=C (or at (x,y)=(C,f(C))) when f(C) is the largest value of the function for all x under consideration. f(x) has a global minimum at x=C (or at (x,y)=(C,f(C))) when f(C) is the smallest value of the function for all x under consideration. If f(x) is continuous on a ≤ x ≤ b, then f assumes a global maximum and a global minimum on that interval. Example 1 (the interval is 0 ≤ x ≤ 3): Fill-in the blanks Local maximum at ___________________________ Local minimum at ___________________________ Global maximum at __________________________ Global minimum at __________________________ Example 2 (the interval is 10 ≤ x ≤ 400): Fill-in the blanks Local maximum at ___________________________ Local minimum at ___________________________ Global maximum at __________________________ Global minimum at __________________________ page 5 of 17 The second derivative test for finding local maxima and local minima: Suppose that f’(C) = 0. Then C is said to be a critical value of the function and the point (C,f(C)) is said to be a critical point of the function. Recall that the second derivative function (f’’(x)) is the derivative of the derivative function. The second derivative is related to the concavity of the function: 1. If f’’(x) > 0, then the curve is concave up (or cupped up) at (x, f(x)). 2. If f’’(x) < 0, then the curve is concave down (cupped down) at (x, f(x)). The second derivative test can be used to determine local maxima and local minima when f’(C) = 0 and f’’(C) ≠ 0. • If f’(C) = 0 and f’’(C) > 0, then there is a local minimum at x = C. • If f’(C) = 0 and f’’(C) < 0, then there is a local maximum at x = C. Example 2, continued: Use the second derivative test to check that (100,f(100)) is a local minimum point. page 6 of 17 Example 3: Consider the following function f(x) = –3 x4 + 4 x3 + 12 x2 + 40 for all real numbers x. (a) Find all critical values and critical points of f(x). (b) For each critical point, use the second derivative to determine if that point is a local maximum or a local minimum for the function. page 7 of 17 Example 4: A manufacturer has been selling 1000 TV sets a week at $450 each. A market survey indicates that for each $10 rebate offered to the buyer, the number of sets sold will increase by 100 per week. Let x equal the number of TV sets sold in a given week. (a) Write weekly revenue as a function of x. (b) Use calculus to determine how large a rebate the company should offer in order to maximize its revenue. (c) If the company's weekly cost is C(x) = 68000 + 150 x, how should it set the size of the rebate in order to maximize its profit? page 8 of 17 Application type: economic order quantity (EOQ) model Assume that demand for a certain product is constant over the year and that each new order is delivered in full when the inventory level reaches zero. The problem is to determine the optimal number of units of a product to purchase whenever an order is placed. Standard notation: D C H R Total demand during the year Unit purchase cost Cost of holding one unit in inventory (often given as a percent of C) Cost of placing an order (reorder cost) Let x equal the number of items ordered at one time (the order quantity). Then the total cost can be written as follows: Total Cost = Purchasing Cost + Inventory Cost + Ordering Cost f(x) = D C + H (x/2) + R (D/x). The basic model is: Minimize f(x) subject to 1 ≤ x ≤ D. Notes: (1) Since the demand is assumed to be constant, the average number of units on hand is x/2. (2) If the total demand is D and you order x at a time, then you place D/x orders. (3) You may have further limitations to worry about. page 9 of 17 Example 5: Alan Wang is responsible for purchasing the paper used in all the copy machines and laser printers at the corporate headquarters of MetroBank. Alan projects that in the coming year he will need to purchase a total of 24,000 boxes of paper, which will be used at a fairly steady rate throughout the year. Each box of paper costs $35. Alan estimates that it costs $50 each time an order is placed (this includes the cost of placing an order and the related costs of shipping and receiving). MetroBank assigns a cost of 18% to funds allocated to supplies and inventories because such funds are the lifeline of the bank and could be lent out to credit card customers who are willing to pay this rate on money borrowed from the bank. Alan has been placing paper orders once a quarter, but he wants to determine if another ordering pattern would be better. He wants to determine the most economical order quantity to use in purchasing paper. • Use calculus to solve Alan's problem. page 10 of 17 Example 5 solution and formulas sheets: A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Metro B C D E F Bank Annual demand Holding cost as % of unit cost Cost per box Reorder cost 24000 18% 35 50 Minimum Reorder bounds Maximum 1 24000 Minimize B20 By Changing B15 (initial value 100) Subject to B24 >= D24 B25 <= D25 MODEL Decision Variable Order Quantity #Boxes 617.2133995 Purchase cost: Inventory cost: Reorder cost: 840000 1944.222208 1944.222211 843888.4444 Minimize total cost: Options: Use Automatic Scaling Assume non-negative Subject to LHS Minimum ordered Maximum ordered RHS 617.2133995 617.2133995 >= <= A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Metro 1 24000 B C D Bank Annual demand Holding cost as % of unit cost Cost per box Reorder cost 24000 0.18 35 50 Reorder bounds Minimum 1 Maximum 24000 MODEL Decision Variable Order Quantity #Boxes 100 Purchase cost: =B3*B5 Inventory cost: =(B4*B5)*(B15/2) Reorder cost: =B6*(B3/B15) Minimize total cost: =SUM(B17:B19) Subject to LHS Minimum ordered Maximum ordered =B15 =B15 RHS >= <= page 11 of 17 =B9 =C9 G Example 6: Keith Shoe Store carries a basic black dress shoe for men that sells at an approximate constant rate of 500 pairs of shoes every three months. Keith's current buying policy is to order 500 pairs each time an order is placed. It costs Keith $150 to place an order. The annual holding cost rate is 25%. With the order quantity of 500, Keith obtains shoes at the lowest possible unit cost of $32 per pair. Other quantity discounts offered by the manufacturer are as follows: Order Quantity: 1-149 150-299 300 or more Price per pair: $36 $34 $32 (a) What is the minimum cost order quantity for the shoes? (b) What are the annual savings of the minimum cost plan over the policy currently being used by Keith? page 12 of 17 Example 6 solution sheet: A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 Keith's Shoe B Annual demand Holding cost as % of unit cost Reorder cost (1) C D E F G Store 2000 25% 150 Quantities 1-149 MODEL 1: Cost per pair Reorder minimum Reorder maximum 36 1 149 Decision Purchase cost: Inventory cost: Reorder cost: Minimize total cost: Subject to RHS 149 149 >= <= 1 149 Quantities 150-299 MODEL Cost per pair Reorder minimum Reorder maximum 2: 34 150 299 Decision Variable Order Quantity # P a i r s : 265.6845 Purchase cost: Inventory cost: Reorder cost: Minimize total cost: Subject to 68000 1129.159 1129.159 70258.32 LHS Minimum ordered Maximum ordered (3) 72000 670.5 2013.423 74683.92 LHS Minimum ordered Maximum ordered (2) Variable Order Quantity #Pairs: 149 RHS 265.6845 265.6845 >= <= 150 299 Quantities 300+ MODEL Cost per pair Reorder minimum Reorder maximum 3: 32 300 2000 Decision Variable Order Quantity #Pairs: 300 Purchase cost: Inventory cost: Reorder cost: Minimize total cost: Subject to Minimum ordered Maximum ordered page 13 of 17 64000 1200 1000 66200 LHS 300 300 RHS >= <= 300 2000 Properties of the total cost function in the EOQ model: • • • The function f(x) is concave up throughout its domain and has a unique critical point. Thus, that critical point corresponds to the global minimum. At the global minimum, the inventory and order costs are equal. The curve is very flat in the vicinity of the global minimum. (When you rely on Solver to get the solution, it may stop far away from the minimum. ) Footnote on the Keith Shoe Problem: There are three distinct total cost functions. The function for the first range (1-149) has its global minimum at x=258.2, the function for the second range (150-299) has its global minimum at x=265.7, and the function for the third range (300 or more) has its global minimum at the point where x=274. Only in the second case was the global minimum in the range of interest in the problem. Footnotes on functions with one critical point: 1. If f''(x) > 0 throughout the domain of interest and f has a unique critical point when x=a, then (a,f(a)) is the global minimum point. 2. If f''(x) < 0 throughout the domain of interest and f has a unique critical point when x=a, then (a,f(a)) is the global maximum point. page 14 of 17 These attachments are for examples in the next set of notes (notes08): Solution and sensitivity reports for Example 4 of notes08 with an inequality constraint: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Lawn King, A Inc. B Max advertising (thous): C D E MODEL Thousands dollars: Maximize Variables Direct Mail 1 sales: 1 Solver options: Assume Non-negative Use Automatic Scaling 32 Subject to LHS Advertising budget G Maximize B11 By Changing B9:C9 (Initial values 0.50, 0.50) Subject to: B14 <= D14 2 Decision Radio F RHS 2 <= 2 Adjustable Cells Cell $B$9 $C$9 Final Value Name Thousands dollars: Radio Thousands dollars: Direct Mail Reduced Gradient 1 1 0 0 Constraints Cell Final Value Name $B$14 Advertising budget LHS page 15 of 17 Lagrange Multiplier 2 5.9999978 H Solution and sensitivity sheets for Example 6 of notes08: A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 B C D E F G H TMC Probability constant NPV (in thousands) Project 1 12 800 Engineers Available Project 2 Project 3 9 700 Maximize B17 By Changing B12:D12 (Several initial values,including 0,0,0) Subject to: B20 <= D20 4 1200 36 MODEL #Engineers: Expected P(Success): Maximize Expected NPV Options: Assume Non-negative Use Automatic Scaling Decision Variables Project 1 Project 2 Project 3 12.23325 10.63140 13.13536 0.50481 0.54155 0.76656 1702.813 Subject to: Total Engineers LHS RHS 36 <= 36 Adjustable Cells Cell Final Value Name $B$12 #Engineers: Project 1 12.23325 $C$12 #Engineers: Project 2 10.63140 $D$12 #Engineers: Project 3 13.13536 Reduced Gradient 0.00000 0.00000 0.00000 Constraints Cell Final Value Name $B$20 Total Engineers LHS page 16 of 17 36 Lagrange Multiplier 16.34737 Formulas sheets for Examples 4 and 6 of notes08: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A King, Inc. Lawn B D Max advertising (thous): 2 MODEL Decision Variables Radio Direct Mail Thousands dollars: 0.5 Maximize sales: 0.5 =-2*B9^2-10*C9^2-8*B9*C9+18*B9+34*C9 Subject to LHS Advertising budget RHS =B9+C9 A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 C <= B C =B3 D TMC Project 1 Probability constant NPV (in thousands) 12 800 Engineers Available 36 Project 2 9 700 Project 3 4 1200 MODEL Decision Project 1 #Engineers: 0 Expected P(Success): =B12/(B12+B4) Maximize Expected =SUMPRODUCT(B5:D5,B14:D14) NPV Subject to: Total Engineers LHS =SUM(B12:D12) page 17 of 17 Variables Project 2 Project 3 0 0 =C12/(C12+C4) =D12/(D12+D4) RHS <= =B7
© Copyright 2026 Paperzz