{"id":37212395,"url":"https://github.com/mit-drl/goop","last_synced_at":"2026-01-15T00:26:00.452Z","repository":{"id":31894081,"uuid":"130409544","full_name":"mit-drl/goop","owner":"mit-drl","description":"Generalized Mixed Integer Optimization in Go","archived":false,"fork":false,"pushed_at":"2021-11-29T19:32:48.000Z","size":51,"stargazers_count":20,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T17:51:39.231Z","etag":null,"topics":["golang","goop","gurobi","ilp","integer-programming","mip","optimization"],"latest_commit_sha":null,"homepage":"https://mit-drl.github.io/goop/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mit-drl.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}},"created_at":"2018-04-20T20:13:43.000Z","updated_at":"2024-03-18T03:26:34.000Z","dependencies_parsed_at":"2022-08-07T17:00:49.997Z","dependency_job_id":null,"html_url":"https://github.com/mit-drl/goop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mit-drl/goop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-drl%2Fgoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-drl%2Fgoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-drl%2Fgoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-drl%2Fgoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mit-drl","download_url":"https://codeload.github.com/mit-drl/goop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-drl%2Fgoop/sbom","scorecard":{"id":650094,"data":{"date":"2025-08-11","repo":{"name":"github.com/mit-drl/goop","commit":"1318b30acc6a7d913d611afa6b5e6e3905523c9b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: goCommand not pinned by hash: install.sh:20","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T13:17:54.657Z","repository_id":31894081,"created_at":"2025-08-21T13:17:54.657Z","updated_at":"2025-08-21T13:17:54.657Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":["golang","goop","gurobi","ilp","integer-programming","mip","optimization"],"created_at":"2026-01-15T00:25:59.888Z","updated_at":"2026-01-15T00:26:00.438Z","avatar_url":"https://github.com/mit-drl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goop [![Go Report Card](https://goreportcard.com/badge/github.com/mit-drl/goop)](https://goreportcard.com/report/github.com/mit-drl/goop) [![Build Status](https://travis-ci.org/mit-drl/goop.svg?branch=master)](https://travis-ci.org/mit-drl/goop) [![Go Doc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=round-square)](https://godoc.org/github.com/mit-drl/goop) [![Maintainability](https://api.codeclimate.com/v1/badges/7bb0cc28fd6d18d2de44/maintainability)](https://codeclimate.com/github/mit-drl/goop/maintainability) [![codecov](https://codecov.io/gh/mit-drl/goop/branch/master/graph/badge.svg)](https://codecov.io/gh/mit-drl/goop)\n\nGeneral Linear Optimization in Go. `goop` provides general interface for solving\nmixed integer linear optimization problems using a variety of back-end solvers\nincluding LPSolve and Gurobi.\n\n# Quickstart\n\nWe are going to start with a simple example showing how `goop` can be used to\nsolve integer linear programs. The example below seeks to maximize the following\nMIP:\n\n```\nmaximize    x +   y + 2 z\nsubject to  x + 2 y + 3 z \u003c= 4\n            x +   y       \u003e= 1\nx, y, z binary\n```\n\nThis is is the same example implemented [here](http://www.gurobi.com/documentation/7.5/examples/mip1_py.html). Below\nwe have implemented the model using `goop` and have optimized the model using\nthe supported Gurobi solver.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/mit-drl/goop\"\n    \"github.com/mit-drl/goop/solvers\"\n)\n\nfunc main() {\n    // Instantiate a new model\n    m := goop.NewModel()\n\n    // Add your variables to the model\n    x := m.AddBinaryVar()\n    y := m.AddBinaryVar()\n    z := m.AddBinaryVar()\n\n    // Add your constraints\n    m.AddConstr(goop.Sum(x, y.Mult(2), z.Mult(3)).LessEq(goop.K(4)))\n    m.AddConstr(goop.Sum(x, y).GreaterEq(goop.One))\n\n    // Set a linear objective using your variables\n    obj := goop.Sum(x, y, z.Mult(2))\n    m.SetObjective(obj, goop.SenseMaximize)\n\n    // Optimize the variables according to the model\n    sol, err := m.Optimize(solvers.NewGurobiSolver())\n\n    // Check if there is an error from the solver. No error should be returned\n    // for this model\n    if err != nil {\n    \tpanic(\"Should not have an error\")\n    }\n\n    // Print out the solution\n    fmt.Println(\"x =\", sol.Value(x))\n    fmt.Println(\"y =\", sol.Value(y))\n    fmt.Println(\"z =\", sol.Value(z))\n\n    // Output:\n    // x = 1\n    // y = 0\n    // z = 1\n}\n```\n\n# Installation\n\n1. First get the code\n```\nmkdir -p $GOPATH/github.com/mit-drl \u0026\u0026 cd $GOPATH/github.com/mit-drl\ngit clone https://github.com/mit-drl/goop \u0026\u0026 cd goop\n```\n\n2. Next build install the dependencies\n```\n./install.sh\n```\n\n3. Follow the [instructions](#Solver Notes) for your solver of choice. Note,\ncurrently only Gurobi is supported\n\n4. Finally build the library\n```\ngo build\n```\nNote that due to a quirk with Gurobi, if you are using Ubuntu \u003c 16.04, you must\nbuild with\n```\ngo build -tags pre_xenial\n```\n\n5. (Optional) Test our installation\n```\ngovendor test -v +local\n```\n\n# Solver Notes\n\nWe currently have bindings for Gurobi and LPSolve. Please follow the\ninstructions below for using these specific solvers.\n\n## Gurobi\n- You must have [Gurobi](http://www.gurobi.com/downloads/download-center)\ninstalled and have a valid license.\n- The `GUROBI_HOME` environment variable must be set to the home directory\nof your Gurobi installation\n\n## LPSolve\nLPSolve is installed using the normal install procedure and should work out of\nthe box.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-drl%2Fgoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmit-drl%2Fgoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-drl%2Fgoop/lists"}