Home /
Expert Answers /
Computer Science /
consider-the-uncapacitated-facility-location-problem-and-write-a-python-code-to-model-and-solve-it-pa382
(Solved):
Consider the uncapacitated facility location problem and write a Python code to model and solve it ...
Consider the uncapacitated facility location problem and write a Python code to model and solve it. To that end, set the number of customers to 120 and the number of facilities to 10 (these can be easily changed at the beginning of the code). Then, randomly generate the location of all customers and facilities on a 200×200 grid and plot them. The fixed cost must be generated randomly in (100,500). Use the rectilinear method to calculate the distance between nodes (we can think of these facilities to be located in a city). Once the model is solved, plot how each customer is assigned to each facility and report the number of demand points served by each facility. Use Markdown cells to put some explanation before every code cell that you use in Jupyter notebook. Submit your Jupyter notebook file along with your ?.lp files.