{"id":16598471,"url":"https://github.com/robinl/dfo_demo","last_synced_at":"2026-04-21T02:03:10.448Z","repository":{"id":151655009,"uuid":"80039871","full_name":"RobinL/dfo_demo","owner":"RobinL","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-01T10:57:28.000Z","size":294,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T05:44:41.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobinL.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-01-25T17:45:44.000Z","updated_at":"2017-01-25T17:48:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8928a3d-482f-4d56-96a5-18a6b86fa4f4","html_url":"https://github.com/RobinL/dfo_demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fdfo_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fdfo_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fdfo_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fdfo_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinL","download_url":"https://codeload.github.com/RobinL/dfo_demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242332571,"owners_count":20110345,"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":[],"created_at":"2024-10-12T00:08:45.586Z","updated_at":"2026-04-21T02:03:08.859Z","avatar_url":"https://github.com/RobinL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facility location analysis and optimisation\n\n## Purpose\n\nA javascript webapp which helps to determine the optimal location of facilities.\n\nSupposing you have _d_ discrete sources of demand and _s_ potential locations for supply, this webapp will enable you to analyse the travel time and distance that results from different supply options.\n\nThe model can account for imbalances between supply and demand, and will attempt to optimally allocate supply to demand when suppliers get full, and demanders have to be allocated to their 2nd closest, 3rd closest supplier etc.\n\nIt can optimise on drive time, drive distance, or Euclidean distance.\n\nThe easiest way to understand this app is to [take a look at the live example](https://robinl.github.io/discrete_facility_optimisation/web/).\n\n\n## Implementation\n\nThe webapp has various components:\n\nA model, which performs the optimisation, assigning demand units to supply units.\n\nVarious object oriented javascript classes that model the entities ([demand unit](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/js/custom/demand.js), [supply unit](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/js/custom/supply.js), [demand collection](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/js/custom/demand_collection.js), [supply collection](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/js/custom/supply_collection.js), [model](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/js/custom/supply_demand_model.js) etc).\n\nThe data visualisation that represents modelling results, and is implemented in d3.js.\n\n## Setting up for your data\n\nYou can easily use this webapp with your data, using the following steps:\n\nFormat your data [like this](https://github.com/RobinL/discrete_facility_optimisation/blob/master/web/data/datasets/data.csv).  You need to get travel time data from all demand units to all supply units (i.e. the cartesian product).  You can find some code to help you with this [here](https://github.com/RobinL/discrete_facility_optimisation/tree/master/jupyter) - see the .ipynb files for some code that creates some random data for you.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinl%2Fdfo_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinl%2Fdfo_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinl%2Fdfo_demo/lists"}