{"id":21325847,"url":"https://github.com/maxkapur/minimum_vertex_cover","last_synced_at":"2025-07-08T12:39:49.258Z","repository":{"id":179732575,"uuid":"664036192","full_name":"maxkapur/minimum_vertex_cover","owner":"maxkapur","description":"Demo of GitHub CI workflow for PySCIPOpt","archived":false,"fork":false,"pushed_at":"2023-08-20T16:32:14.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T23:43:54.631Z","etag":null,"topics":["github-actions-ci","numerical-optimization"],"latest_commit_sha":null,"homepage":"","language":"Python","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/maxkapur.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-07-08T18:41:02.000Z","updated_at":"2023-07-22T14:36:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"6639e519-f131-4bef-9809-877c791a2d53","html_url":"https://github.com/maxkapur/minimum_vertex_cover","commit_stats":null,"previous_names":["maxkapur/minimum_vertex_cover"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxkapur/minimum_vertex_cover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkapur%2Fminimum_vertex_cover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkapur%2Fminimum_vertex_cover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkapur%2Fminimum_vertex_cover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkapur%2Fminimum_vertex_cover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxkapur","download_url":"https://codeload.github.com/maxkapur/minimum_vertex_cover/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkapur%2Fminimum_vertex_cover/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264270847,"owners_count":23582553,"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":["github-actions-ci","numerical-optimization"],"created_at":"2024-11-21T21:07:44.165Z","updated_at":"2025-07-08T12:39:49.175Z","avatar_url":"https://github.com/maxkapur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimum-weight vertex cover\n\nA minimum-weight vertex cover solver using the [SCIP Optimization Suite](https://www.scipopt.org/) for integer linear programming.\n\nInteger programming is *not* the most efficient way to solve the minimum-weight vertex cover problem. Instead, the purpose of this repository is to demonstrate a “Hello, World!”-type program using SCIP’s toolset, and to explore using GitHub actions to compare problem compilation times for different problem sizes.\n\n## Requirements and installation\n\nRequires Python v3.10 or better because I used a `match` statement (sorry). Also requires a conda environment ([Miniconda](https://docs.conda.io/en/latest/miniconda.html) is sufficient) in order to `conda install` pyscipopt along with its binary dependencies.\n\nAssuming you have conda and git installed, you might install and set up a virtual environment for this script as follows (example uses Debian and the bash shell):\n\n```bash\n# Clone this repo\n$ git clone \"https://github.com/maxkapur/minimum_vertex_cover.git\"\n# Change into the cloned directory\n$ cd ./minimum_vertex_cover\n# Create a virtual environment for this script\n# Add conda-forge channel (required to install pyscipopt)\n# Install dependencies\n$ conda create -p ./venv -c conda-forge --file ./requirements.txt\n# Activate it\n$ conda activate \"$(pwd)/venv\"\n# Make sure it activated correctly\n$ conda info         \n    active environment : THIS_DIRECTORY/venv\n```\n\n## Usage\n\nThe file `main.py` accepts command-line arguments to define the density and size of the graph. For example, in the following run, the graph contains `10` nodes, and each arc is constructed with probability `0.3`. The node weights are drawn from a standard exponential distribution.\n\n```bash\n$ conda run python ./main.py 0.3 10\nGenerating decision variables ... done.\nGenerating vertex cover constraints ... done.\nGenerating objective function ... done.\nSolving problem using backend SCIP.\nOptimal solution found.\nDouble-checking that every arc is covered ... done.\nSolution has weight 3.355 and consists of the following 7 nodes:\n[0, 1, 2, 4, 5, 6, 7]\nProblem size:               10 nodes, 28 arcs\nProblem compilation time:   0.004 seconds\nProblem solution time:      0.007 seconds\n```\n\n## References\n\nFor more information about the minimum-weight vertex cover problem, see [Chandra Chekuri’s course notes](https://courses.engr.illinois.edu/cs583/sp2018/Notes/covering.pdf) (especially §4) or [Wikipedia](https://en.wikipedia.org/wiki/Vertex_cover).\n\n## Author\n\nBy [Max Kapur](https://maxkapur.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxkapur%2Fminimum_vertex_cover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxkapur%2Fminimum_vertex_cover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxkapur%2Fminimum_vertex_cover/lists"}