{"id":19855811,"url":"https://github.com/ray-chew/steiner_solver","last_synced_at":"2026-06-09T04:02:50.651Z","repository":{"id":228580858,"uuid":"774338617","full_name":"ray-chew/steiner_solver","owner":"ray-chew","description":"A Steiner graph solver using: binary heap, adjacency list, Dijkstra’s algorithm, OpenMP parallelisation, Takahashi and Matsuyama's heuristics, with tools for solution verification and validation","archived":false,"fork":false,"pushed_at":"2024-03-19T15:00:52.000Z","size":198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T13:54:42.098Z","etag":null,"topics":["adjacency-lists","binary-heap","cpp","dijkstra-algorithm","openmp","optimization-algorithms","steiner-tree-problem"],"latest_commit_sha":null,"homepage":"","language":"C++","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/ray-chew.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":"2024-03-19T11:28:16.000Z","updated_at":"2024-03-19T12:24:04.000Z","dependencies_parsed_at":"2025-01-11T13:48:18.410Z","dependency_job_id":"af4adb41-1deb-4744-9a63-100ec34b0020","html_url":"https://github.com/ray-chew/steiner_solver","commit_stats":null,"previous_names":["ray-chew/steiner_solver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-chew%2Fsteiner_solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-chew%2Fsteiner_solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-chew%2Fsteiner_solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-chew%2Fsteiner_solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ray-chew","download_url":"https://codeload.github.com/ray-chew/steiner_solver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241245642,"owners_count":19933296,"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":["adjacency-lists","binary-heap","cpp","dijkstra-algorithm","openmp","optimization-algorithms","steiner-tree-problem"],"created_at":"2024-11-12T14:13:46.472Z","updated_at":"2026-06-09T04:02:50.597Z","avatar_url":"https://github.com/ray-chew.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steiner graph solver\n\nI completed this project as part of the *Advanced Practical Programming for Scientists* module at the Technische Universität Berlin.\n\nThis project uses an improved Steiner graph heuristics proposed by [Takahashi and Matsuyama (1980)](https://www.cs.haifa.ac.il/~golumbic/courses/seminar-2010approx/takahashi80.PDF). Parallelisation is also implemented. The Steiner graph problem for graphs of size ~2.0gb can be solved in under 30s.\n\nSpecifically, the code computes the best Steiner Tree for a given number of starting terminals (default is 100) and a given graph file.\n\n* **Compile**: `make THREADS=XX`, where `THREADS=XX` specifies the number of threads to be used in the parallel section of the code.\n* **Compile and run**: `make THREADS=XX FILE=YY test`, where `FILE=YY` is the graph file to execute right after the target is compiled.\n* **Run**: `./steiner_solver \u003cgraph filepath\u003e [# of terminals] [-s]`. `[# of terminals]` is the number of starting terminals to check through to obtain a best objective value. Include the `[-s]` flag to print the edges of the Steiner subgraph.\n\n***\n\n* `make check` runs the cppcheck static analysis check.\n* `make coverage` runs gcov coverage test with lcov results output in folder result/.\n* `make doc` compiles doxygen documentation in folder html/.\n* `make cleancoverage` cleans all files related to coverage test, except the results folder.\n* `make clean` cleans all files created by the Makefile, including the coverage-test related files.\n\n***\n\n**To compile without Makefile**: \n  1. Compile utils.cxx: `g++ -std=c++14 -O3 -march=native -pedantic -Wall -c src/utils.cxx -o utils.o -lboost_timer -lboost_program_options -lboost_system -fopenmp`\n  2. Compile heap.cxx: `g++ -std=c++14 -O3 -march=native -pedantic -Wall -c src/heap.cxx -o heap.o -lboost_timer -lboost_program_options -lboost_system -fopenmp`\n  3. Compile steiner.cxx: `g++ -std=c++14 -O3 -march=native -pedantic -Wall -c src/steiner.cxx -o steiner.o -lboost_timer -lboost_program_options -lboost_system -fopenmp`\n  4. Compile checker.cxx: `g++ -std=c++14 -O3 -march=native -pedantic -Wall -c src/checker.cxx -o checker.o -lboost_timer -lboost_program_options -lboost_system -fopenmp`\n  5. Link and output: `g++ -std=c++14 -O3 -march=native -pedantic -Wall src/utils.o src/heap.o src/steiner.o src/checker.o src/steiner_solver.cxx -o steiner_solver -lboost_timer -lboost_program_options -lboost_system [-fopenmp]`. Include  `-fopenmp` to enable parallelization.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-chew%2Fsteiner_solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fray-chew%2Fsteiner_solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-chew%2Fsteiner_solver/lists"}