1 / 9

Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege

Engineering 25. Chp4 Tutorial: Prob 4.25 Solution. Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu. Optimize Distribution Center Location for Customers:. The Situation. . . . . . . The Final Hand Notes. Set x-value (m-index)

ling
Download Presentation

Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege

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. Engineering 25 Chp4Tutorial: Prob 4.25Solution Bruce Mayer, PE Licensed Electrical & Mechanical EngineerBMayer@ChabotCollege.edu

  2. Optimize Distribution Center Location for Customers: The Situation      

  3. The Final Hand Notes

  4. Set x-value (m-index) Test 31 y-values (n-index) Increment x-value (m = m+1) Test 31 new y-values Repeat GamePlan Illustrated

  5. The Function File % Bruce Mayer, PE * 21Feb06 % ENGR25 * Problem 4-25 % file = Prob4_25_Dense_Road.m % Find Optimum Location for Shipping Distribution Center % % INPUT SECTION - Data For Six Shipping Destinations xloc = [1,7,8,17,22,27]; % X-CoOrd in Miles yloc = [28,18,16,2,10,8]; % Y-CoOrd in Miles V = [3,7,4,5,2,6]; % Shipping Volume in Tons/Week % % Initialize Low-Cost Location & CoOrds Collection Vectors %% Units for Collection Vectors: [$-Cost, X-miles, Y-Miles] C_Lo = [1e6, 31, 31]; C_L1 = [1e6, 31, 31]; C_L2 = [1e6, 31, 31]; % % CALCULATION SECTION % vary X&Y for Dist Cntr; calc cost at each location for m = 1:30 % vary X-CoOrd for n = 1:30 % vary Y-CoOrd for k = 1:6 % Calc Dist & Cost for 6 Destinations d(k) = sqrt((m-xloc(k)).^2 + (n-yloc(k)).^2); cost(k) = 0.5*d(k)*V(k); end % Sum the 6 costs for location (m,n) Cmn = sum(cost); % Compare to Previous value for Low-Cost if Cmn < C_Lo(1) % replace previous if true C_L2 = C_L1; C_L1 = C_Lo; C_Lo = [Cmn, m, n]; end end end % % REPORT RESULTS display('The LOWEST-Cost Option in [$-cost, X-miles, y-miles]') disp(C_Lo) display('The 2nd Lowest-Cost Option in [$-cost, X-miles, y-miles]') disp(C_L1) display('The 3rd Lowest-Cost Option in [$-cost, X-miles, y-miles]') disp(C_L2) • Prob4_25_Dense_Road.m

  6. The Command Session >> run Prob4_25_Dense_Road The LOWEST-Cost Option in [$-cost, X-miles, y-miles] 147.2551 9.0000 16.0000 The 2nd Lowest-Cost Option in [$-cost, X-miles, y-miles] 147.3513 8.0000 16.0000 The 3rd Lowest-Cost Option in [$-cost, X-miles, y-miles] 150.3551 8.0000 15.0000

More Related