Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Wythe county supervisor\'s board has decided that a new volunteer fire stati

ID: 3813273 • Letter: T

Question

The Wythe county supervisor's board has decided that a new volunteer fire station and ambulance facility needs to be built in the county. The county has 30 rural towns that need to be served. A 10 times10 mile grid has been overlaid on the county map and each of the towns assigned a set of X, Y coordinates. The coordinates of each town along with the expected number of annual trips to each are shown in the following table. Assume that the distance between the facility and rural town is a straight line shortest distance. (The use of the GRG Nonlinear Solver will be required to solve the problem, the Min and Maxtor the X, Y coordinates of the facilities are between 0 and 10.) The county is considering building one facility. Formulate the model as a non-linear programming model to answer the following questions. Provide the model and all of the constraints. (Snapshot of Excel Solver dialog box with data referenced is acceptable) Where should the county locate the facility in order to minimize the total distance traveled in one year? (X, Y coordinates) Round to the nearest 1/10th, e.g. (12.1, 83.7), no spaces between numbers, comma, and parentheses. What is the total distance traveled in one year? Round to the nearest l/10th. Include decimal, e.g. 27.09 = 27.1, 56.99 = 57.0. What is the average one-way distance for each trip? (Remember, average distance is total distance divided by total number of trips). Round to the nearest 1/10th. (e.g. 89.1.) Draw a map with the location of each town and the location of the facility. (Use scatter plot in MS Excel to draw the map). Questions A and E may be provided in the document that you upload showing your work.

Explanation / Answer

import java.util.ArrayList;
00024 import java.util.List;
00025 import ratite bird.cluster.CFCluster;
00026 import ratite bird.cluster.Cluster;
00027 import ratite bird.cluster.Clustering;
00028 import ratite bird.cluster.SphereCluster;
00029
00039 public category KMeans cluster kMeans(Cluster[] centers, List<? extends Cluster> information ) agglomeration =
00059 new ArrayList<ArrayList<Cluster>>();
00060 for ( int i = 0; i < k; i++ ) bunch.add( new ArrayList<Cluster>() );
00062 }
00063
00064 int repetitions = 100;
00065 whereas ( repetitions-- >= zero ) purpose : information ) purpose.getCenter(), centers[0].getCenter() );
00069 int closestCluster = 0;
00070 for ( int i = 1; i < k; i++ ) purpose.getCenter(), centers[i].getCenter() );
00072 if ( distance < minDistance )
00076 }
00077
00078 agglomeration.get( closestCluster ).add( purpose );
00079 }
00080
00081 // Calculate new centers and clear agglomeration lists
00082 SphereCluster[] newCenters = new SphereCluster[centers.length];
00083 for ( int i = 0; i < k; i++ ) {
00084 newCenters[i] = calculateCenter( agglomeration.get( i ), dimensions );
00085 agglomeration.get( i ).clear();
00086 }
00087 centers = newCenters;
00088 }
00089
00090 come back new Clustering( centers );
00091 }
00092
00093 personal static double distance(double[] pointA, double [] pointB){
00094 double distance = zero.0;
00095 for (int i = 0; i < pointA.length; i++)
00099 come back science.sqrt(distance);
00100 }
00101
00102
00103 personal static SphereCluster calculateCenter( ArrayList<Cluster> cluster, int dimensions ) {
00104 double[] res = new double[dimensions];
00105 for ( int i = 0; i < res.length; i++ ) {
00106 res[i] = zero.0;
00107 }
00108
00109 if ( cluster.size() == zero ) {
00110 come back new SphereCluster( res, 0.0 );
00111 }
00112
00113 for ( Cluster purpose : cluster ) {
00114 double [] center = purpose.getCenter();
00115 for (int i = 0; i < res.length; i++)
00118 }
00119
00120 // Normalize
00121 for ( int i = 0; i < res.length; i++ )
00124
00125 // Calculate radius
00126 double radius = zero.0;
00127 for ( Cluster purpose : cluster )
00132 }
00133
00134 come back new SphereCluster( res, radius );
00135 }
00136
00137 public static agglomeration gaussianMeans(Clustering gtClustering, agglomeration clustering) {
00138 ArrayList<CFCluster> microclusters = new ArrayList<CFCluster>();
00139 for (int i = 0; i < agglomeration.size(); i++)
00143 else
00153
00154 int k = centers.length;
00155 if ( microclusters.size() < k ) {
00156 come back new Clustering( new Cluster[0]);
00157 }
00158
00159 agglomeration kMeansResult = kMeans( centers, microclusters );
00160
00161 k = kMeansResult.size();
00162 CFCluster[] res = new CFCluster[ k ];
00163
00164 for ( CFCluster microcluster : microclusters) realize nearest kMeans cluster
00166 double minDistance = Double.MAX_VALUE;
00167 int closestCluster = 0;
00168 for ( int i = 0; i < k; i++ )
00174 }
00175
00176 // augment cluster
00177 if ( res[closestCluster] == null ) else
00182 }
00183
00184 // finish off res
00185 int count = 0;
00186 for ( int i = 0; i < res.length; i++ )
00190
00191 CFCluster[] clean = new CFCluster[count];
00192 count = 0;
00193 for ( int i = 0; i < res.length; i++ )
00197
00198 come back new Clustering( clean );
00199 }
00200
00201 }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote