{"id":33111921,"url":"https://github.com/hubbs5/or-gym","last_synced_at":"2026-04-17T06:01:35.161Z","repository":{"id":39405553,"uuid":"241932585","full_name":"hubbs5/or-gym","owner":"hubbs5","description":"Environments for OR and RL Research","archived":false,"fork":false,"pushed_at":"2023-10-12T09:23:58.000Z","size":25561,"stargazers_count":413,"open_issues_count":11,"forks_count":99,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-18T23:24:35.966Z","etag":null,"topics":["deep-reinforcement-learning","operations-research","optimization","reinforcement-learning","supply-chain","supply-chain-management","vehicle-routing-problem"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hubbs5.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":"2020-02-20T16:25:35.000Z","updated_at":"2025-08-08T02:00:24.000Z","dependencies_parsed_at":"2022-07-12T17:54:40.125Z","dependency_job_id":"daf35c7c-3b6e-47fe-be6a-2d879f247d3a","html_url":"https://github.com/hubbs5/or-gym","commit_stats":{"total_commits":381,"total_committers":9,"mean_commits":"42.333333333333336","dds":"0.32020997375328086","last_synced_commit":"0b18d16e569e2db70e83f09e867b53bdb4b87298"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hubbs5/or-gym","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubbs5%2For-gym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubbs5%2For-gym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubbs5%2For-gym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubbs5%2For-gym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hubbs5","download_url":"https://codeload.github.com/hubbs5/or-gym/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubbs5%2For-gym/sbom","scorecard":{"id":471874,"data":{"date":"2025-08-11","repo":{"name":"github.com/hubbs5/or-gym","commit":"0b18d16e569e2db70e83f09e867b53bdb4b87298"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Code-Review","score":8,"reason":"Found 5/6 approved changesets -- score normalized to 8","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":10,"reason":"no dangerous workflow patterns detected","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":"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/run_env_test.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run_env_test.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/hubbs5/or-gym/run_env_test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run_env_test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/hubbs5/or-gym/run_env_test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/run_env_test.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand 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":"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":"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: MIT License: 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":"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T14:06:50.543Z","repository_id":39405553,"created_at":"2025-08-19T14:06:50.543Z","updated_at":"2025-08-19T14:06:50.543Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deep-reinforcement-learning","operations-research","optimization","reinforcement-learning","supply-chain","supply-chain-management","vehicle-routing-problem"],"created_at":"2025-11-15T01:00:44.077Z","updated_at":"2026-04-17T06:01:35.127Z","avatar_url":"https://github.com/hubbs5.png","language":"Python","funding_links":[],"categories":["**Other Resources**"],"sub_categories":["Code Repositories"],"readme":"# or-gym\n## Environments for OR and RL Research\n\nThis library contains environments consisting of operations research problems which adhere to the OpenAI Gym API. The purpose is to bring reinforcement learning to the operations research community via accessible simulation environments featuring classic problems that are solved both with reinforcement learning as well as traditional OR techniques.\n\n## Installation\n\nThis library requires Python 3.5+ in order to function.\n\nInstallation is possible via `pip`:\n\n`$ pip install or-gym`\n\nOr, you can install directly from GitHub with:\n\n```\ngit clone https://github.com/hubbs5/or-gym.git\ncd or-gym\npip install -e .\n```\n## Quickstart Example and Benchmarking Example \n\nSee the IPython notebook entitled `inv-management-quickstart.ipynb` in the `examples` folder for a quickstart example for training an agent in an OR-GYM environemnt, and for using the environment for benchmarking policies found by other algorithms. For the RL algorithm, Ray 1.0.0 is required.\n\n## Citation\n```\n@misc{HubbsOR-Gym,\n    author={Christian D. Hubbs and Hector D. Perez and Owais Sarwar and Nikolaos V. Sahinidis and Ignacio E. Grossmann and John M. Wassick},\n    title={OR-Gym: A Reinforcement Learning Library for Operations Research Problems},\n    year={2020},\n    Eprint={arXiv:2008.06319}\n}\n```\n\n## Environments\n\n- `Knapsack-v0`: a small version of the classic unbounded knapsack problem with 200 items.\n- `Knapsack-v1`: binary (0-1) knapsack problem with 200 items.\n- `Knapsack-v2`: bounded knapsack problem with 200 items.\n- `Knapsack-v3`: stochastic, online knapsack problem.\n- `BinPacking-v0` through `BinPacking-v5`: online bin packing problem taken from [Balaji et al.](https://arxiv.org/abs/1911.10641).\n- `Newsvendor-v0`: multi-period newsvendor problem with lead times taken from [Balaji et al.](https://arxiv.org/abs/1911.10641).\n- `VMPacking-v0`: permanent, multi-dimensional virtual machine packing problem.\n- `VMPacking-v1`: temporary, multi-dimensional virtual machine packing problem.\n- `VehicleRouting-v0`: pick-up and delivery problem with delivery windows taken from [Balaji et al.](https://arxiv.org/abs/1911.10641).\n- `InvManagement-v0`: multi-echelon supply chain re-order problem with backlogs.\n- `InvManagement-v1`: multi-echelon supply chain re-order problem without backlog.\n- `NetworkManagement-v0`: multi-echelon supply chain network problem with backlogs from [Perez et al.](https://www.mdpi.com/2227-9717/9/1/102).\n- `NetworkManagement-v1`: multi-echelon supply chain network problem without backlogs from [Perez et al.](https://www.mdpi.com/2227-9717/9/1/102).\n- `PortfolioOpt-v0`: Multi-period asset allocation problem for managing investment decisions taken from [Dantzig and Infanger](https://apps.dtic.mil/dtic/tr/fulltext/u2/a242510.pdf).\n- `TSP-v0`: traveling salesman problem with bi-directional connections and uniform cost.\n- `TSP-v1`: traveling salesman problem with bi-directional connections.\n\n## Resources\n\nInformation on results and supporting models can be found [here](https://arxiv.org/abs/2008.06319).\n\n## Examples\n\n- [Action Masking with RLlib using the Knapsack Environment](https://www.datahubbs.com/action-masking-with-rllib/)\n- [How to Use Deep Reinforcement Learning to Improve your Supply Chain](https://www.datahubbs.com/how-to-use-deep-reinforcement-learning-to-improve-your-supply-chain/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubbs5%2For-gym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubbs5%2For-gym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubbs5%2For-gym/lists"}