{"id":40699816,"url":"https://github.com/n-loo/hsr-optimization","last_synced_at":"2026-01-21T12:02:56.641Z","repository":{"id":182374355,"uuid":"580634318","full_name":"n-loo/HSR-Optimization","owner":"n-loo","description":"A linear program implemented with Gurobi to solve for the optimal city pairs for high speed rail in the United States.","archived":false,"fork":false,"pushed_at":"2023-01-08T22:48:05.000Z","size":1526,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-07-19T18:49:58.081Z","etag":null,"topics":["high-speed-rail","linear-programming","trains"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n-loo.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}},"created_at":"2022-12-21T03:38:05.000Z","updated_at":"2023-07-19T18:50:00.442Z","dependencies_parsed_at":null,"dependency_job_id":"ac40a7d3-19a3-4d0b-ac47-f549f32066fc","html_url":"https://github.com/n-loo/HSR-Optimization","commit_stats":null,"previous_names":["n-loo/hsr-optimization"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/n-loo/HSR-Optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-loo%2FHSR-Optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-loo%2FHSR-Optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-loo%2FHSR-Optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-loo%2FHSR-Optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n-loo","download_url":"https://codeload.github.com/n-loo/HSR-Optimization/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-loo%2FHSR-Optimization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["high-speed-rail","linear-programming","trains"],"created_at":"2026-01-21T12:02:50.085Z","updated_at":"2026-01-21T12:02:56.636Z","avatar_url":"https://github.com/n-loo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HSR-Optimization\n\nA final project made by Ellie Jensen and Niels Vanderloo for Bob Bosch's MATH 331 (Linear Optimization) in Fall 2022.\n\nA linear program implemented with Gurobi to solve for the optimal city pairs for high speed rail in the United States. See included PDF of the paper `optimizing_trains.pdf` describing the model we implement.\n\n## Prerequisites\n\n- Python\n- Jupyter notebooks\n- the Gurobi Python package \n\t- installed with `python -m pip install gurobipy`\n\n## Instructions\n\nTo run the analysis, first run the cells of the `combinedStat.ipynb` notebook in order. Then run the `optimize.py` file.\n\n## `combinedStat.ipynb`\n\n### Parameters: \n- `minDist` is the number of miles in our travel demand calculation where travel demand no longer improves as $d \u003c $`minDist`\n\t - This shows up in our model as $T_{i, j}=\\left(\\frac{P_i^{0.8} \\times P_j^{0.8}}{\\max \\left(d_{i, j},  {\\tt minDist}\\right)^2}\\right)$\n\n## `optimize.py`\n\n### Parameters: \n- `trackAmt` is the \"budget\" you have for building track\n- `penaltyAmt` is the amount you assign as a penalty in track miles to decrease your track \"budget\" for each new route you add \n- `perCity` is the maximum number of train routes that any given city can have\n\n## `.csv` files\n- `combStat.csv` contains the latitude, longitude and Census population data of every combined statistical area in the united states\n\t- this is used in `combinedStat.ipynb` to generate the other csv's used in the `optimize.py` program\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-loo%2Fhsr-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-loo%2Fhsr-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-loo%2Fhsr-optimization/lists"}