This repository contains the Jupyter notebooks, text files, and supporting documentation for the project activity on the p-median location problem. The objective of this project is to determine the optimal selection of facilities from a set of potential locations, minimizing the total distance for serving all demand points while ensuring that each demand point is assigned to its nearest selected facility.
-
Ipyb Files
: Contains Jupyter notebooks.Random Sampling - Instance 1.ipynb
: Implementing the random sampling algorithm for instance 1.Random Sampling - Instance 2.ipynb
: Implementing the random sampling algorithm for instance 2.Local Search - Instance 1.ipynb
: Implementing the local search algorithm for instance 1.Local Search - Instance 2.ipynb
: Implementing the local search algorithm for instance 2.
-
Text Files
: Supplementary text files corresponding to the Jupyter notebooks.Random Sampling - Instance 1.txt
: Text file for implementing of random sampling algorithmRandom Sampling - Instance 2.txt
: Text file for implementing of random sampling algorithmLocal Search - Instance 1.ipynb
: Text file for implementing of local search algorithmLocal Search - Instance 2.ipynb
: Text file for implementing of local search algorithm
-
requirements.txt
: List of Python packages required to run the notebooks. -
SHARP_MHO_1.pdf
: A comprehensive report detailing solution encoding representation, search procedure explanation, and results obtained for each exercise.
Given a set of n
locations representing demand points and a set of m
potential facility locations, the p-median problem aims to determine the optimal selection of p
facilities from the set of potential locations.
- Instance 1: 100 locations, requiring 15 facilities to be open.
- Instance 2: 1000 locations, requiring 30 facilities to be open.
Setup & Execution
- Ensure you have Jupyter Notebook and required Python packages installed.
- Clone the repository:
git clone https://github.com/<your_username>/P-Median-Problem.git
- Navigate to the cloned directory.
- Install required packages:
pip install -r requirements.txt
- Run Jupyter Notebook:
jupyter notebook
- Open each notebook and execute the cells sequentially.