{"id":18497502,"url":"https://github.com/jungstershark/p-median-problem","last_synced_at":"2026-04-24T12:02:39.547Z","repository":{"id":255314387,"uuid":"702008909","full_name":"Jungstershark/P-Median-Problem","owner":"Jungstershark","description":"The P-Median Problem project uses metaheuristic optimization to solve the p-median location problem, with Jupyter notebooks implementing random sampling and local search algorithms to minimize service distances.","archived":false,"fork":false,"pushed_at":"2024-08-29T07:08:04.000Z","size":3201,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T05:23:00.035Z","etag":null,"topics":["alogorithms","jupyter-notebook","local-search","metaheuristic","metaheuristic-algorithms","metaheuristic-optimisation","metaheuristics","optimization","optimization-algorithms","optimization-methods","p-median","p-median-problem","python","python3","random-sampling"],"latest_commit_sha":null,"homepage":"https://github.com/Jungstershark/P-Median-Problem","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jungstershark.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-08T08:22:02.000Z","updated_at":"2025-01-10T09:08:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"5849a08f-bad9-414b-88b1-fef1538e515d","html_url":"https://github.com/Jungstershark/P-Median-Problem","commit_stats":null,"previous_names":["jungstershark/p-median-problem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jungstershark/P-Median-Problem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungstershark%2FP-Median-Problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungstershark%2FP-Median-Problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungstershark%2FP-Median-Problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungstershark%2FP-Median-Problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jungstershark","download_url":"https://codeload.github.com/Jungstershark/P-Median-Problem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jungstershark%2FP-Median-Problem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263335962,"owners_count":23450953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alogorithms","jupyter-notebook","local-search","metaheuristic","metaheuristic-algorithms","metaheuristic-optimisation","metaheuristics","optimization","optimization-algorithms","optimization-methods","p-median","p-median-problem","python","python3","random-sampling"],"created_at":"2024-11-06T13:34:45.502Z","updated_at":"2026-04-24T12:02:34.525Z","avatar_url":"https://github.com/Jungstershark.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [SHARP] Metaheuristic Optimization - P Median Problem\n[![GitHub license](https://img.shields.io/github/license/Jungstershark/P-Median-Problem)](https://github.com/Jungstershark/P-Median-Problem/blob/main/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/Jungstershark/P-Median-Problem?style=social)](https://github.com/Jungstershark/P-Median-Problem/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/Jungstershark/P-Median-Problem?style=social)](https://github.com/Jungstershark/P-Median-Problem/network/members)\n\nThis 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.\n\n## Contents\n\n- `Ipyb Files`: Contains Jupyter notebooks.\n  - `Random Sampling - Instance 1.ipynb`: Implementing the random sampling algorithm for instance 1.\n  - `Random Sampling - Instance 2.ipynb`: Implementing the random sampling algorithm for instance 2.\n  - `Local Search - Instance 1.ipynb`: Implementing the local search algorithm for instance 1.\n  - `Local Search - Instance 2.ipynb`: Implementing the local search algorithm for instance 2.\n\n- `Text Files`: Supplementary text files corresponding to the Jupyter notebooks.\n  - `Random Sampling - Instance 1.txt`: Text file for implementing of random sampling algorithm\n  - `Random Sampling - Instance 2.txt`: Text file for implementing of random sampling algorithm\n  - `Local Search - Instance 1.ipynb`: Text file for implementing of local search algorithm\n  - `Local Search - Instance 2.ipynb`: Text file for implementing of local search algorithm\n\n- `requirements.txt`: List of Python packages required to run the notebooks.\n\n- `SHARP_MHO_1.pdf`: A comprehensive report detailing solution encoding representation, search procedure explanation, and results obtained for each exercise.\n\n## Problem Overview\n\nGiven 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.\n\n### Instances\n- Instance 1: 100 locations, requiring 15 facilities to be open.\n- Instance 2: 1000 locations, requiring 30 facilities to be open.\n\n## Setup \u0026 Execution\n\nSetup \u0026 Execution\n1. Ensure you have Jupyter Notebook and required Python packages installed.\n2. Clone the repository:\n```bash\ngit clone https://github.com/\u003cyour_username\u003e/P-Median-Problem.git\n```\n3. Navigate to the cloned directory.\n4. Install required packages:\n```bash\npip install -r requirements.txt\n```\n5. Run Jupyter Notebook:\n```bash\njupyter notebook\n```\n6. Open each notebook and execute the cells sequentially.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjungstershark%2Fp-median-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjungstershark%2Fp-median-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjungstershark%2Fp-median-problem/lists"}