Question: Example 10.2: A new machine needs to be added into a maintenance department among five existing machines, which are currently located in coordinates: P1 (1,
Example 10.2: A new machine needs to be added into a maintenance department among five existing machines, which are currently located in coordinates: P1 (1, 1), P2 (6, 2), P3 (2, 8), P4 (3, 6) and P5 (8, 4). The cost per unit distance traveled between the new machine and each existing machine is the same. The number of trips per day between the new machine and the existing machines 1, 2, 3, 4 and 5 are 10, 20, 25, 20 and 25, respectively.
1) Please identify the best location for the new machine. Your submission needs to include:
% 430 HW 10 Problem 1
% Define x values for calculating the cost along the x axis
x=1:0.1:8;
% Calculate the sub-total cost along the x axis
sumx=10*abs(x-1)+20*abs(x-6)+25*abs(x-2)+20*abs(x-3)+25*abs(x-8);
% Calculate the minimum x sub-total cost and the corresponding x value
[xmin, indexx]=min(sumx);
% Figure out the x value at which the total cost along the x axis is
% minimum
xvalue=x(indexx)
xmin
% Define y values for calculating the cost along the y axis
y=1:0.1:8;
% Calculate the sub-total cost along the y axis
sumy=10*abs(y-1)+20*abs(y-2)+25*abs(y-8)+20*abs(y-6)+25*abs(y-4);
% Calculate the minimum y sub-total cost and the corresponding y value
[ymin, indexy]=min(sumy);
% Figure out the y value at which the total cost along the y axis is
% minimum
yvalue=y(indexy)
ymin
MinTotalCost=xmin+ymin
%End%
1
b) The calculated minimum cost and the location coordinates
The minimum total cost is 440 at (3, 4)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
