Description
Please create a script in Matlab that performs the calculations needed to answer each of the
following questions, one cell for each part of each question. Please submit via Moodle your
script, a diary or published output file, and any functions you created that are used by your script.
1. Duplicate the results of Sections 12–15 of Basic Concepts in Matlab.
2. Referring to all of cities in North Carolina and South Carolina with populations of at least
10,000:
(a) Assuming weight is proportional to population, what location minimizes the sum of
the weight times the great-circle distance to each city?
(b) What city is closest to the optimal location?
(c) What city is furthest from the location?
(d) What are the four closest cities to the location?
(e) Plot the name and location of the four closest cities.
(f) How far is the location from the largest (greatest population) city?
(g) What city with a population of at least 50,000 is closest to the location?
(h) What percentage of the population in the cities is South of the location?
(i) What is the total population of all of the cities that are within 100 miles of the
location?
(j) Plot the name and location of the five closest cities to the optimal location that have a
population of at least 50,000.
2
(k) Assuming that three DCs are located in Raleigh, NC, Charlotte, NC, and North
Charleston, SC, respectively, and that each city is served by its closest DC, what is
the total population served by each DC?
3. Assume that 20, 30, and 24 full truckloads (TL) per year of finished goods will be shipped
to customers located in Detroit, MI, Gainesville, FL, and Memphis, TN.
(a) Where (in decimal degrees) should a new
factory be located in order to minimize
total outbound truck travel?
(b) Near what city with a population of at least
50,000 is this location?
(c) Near what city with a population of at least
10,000 is this location?
(d) A circuity factor is the average ratio of the
actual road distance between two points
and the great circle distance between the
two points. Use the simple average of the
distances between all pairs of customers
(three values, in total) to estimate the
circuity factor. You can use Google Map to
determine the actual road distances (where
you can pick the fastest route if several
routes are available).
(e) If the transportation rate is $3.00 per mile for each one-way TL shipment, what is the
total transportation cost per year assuming that the trucks do not return to the factory
and that the actual road distances are estimated using a circuity factor?
(f) Assuming that the factory will be built in Cary, NC instead of at the optimal location,
what is the increase in total transportation cost per year?
-90 -85 -80
30
32
34
36
38
40
42
Detroit
Gainesv ille
Memphis
Cary