{"id":23331096,"url":"https://github.com/sassoftware/sasoptpy","last_synced_at":"2025-10-13T07:05:54.729Z","repository":{"id":48342896,"uuid":"107683775","full_name":"sassoftware/sasoptpy","owner":"sassoftware","description":"sasoptpy is a Python package providing a modeling interface for SAS Viya Optimization solvers.","archived":false,"fork":false,"pushed_at":"2023-10-16T14:38:58.000Z","size":20105,"stargazers_count":26,"open_issues_count":0,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-20T12:46:53.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"SAS","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/sassoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-20T13:50:54.000Z","updated_at":"2025-07-07T14:32:13.000Z","dependencies_parsed_at":"2024-06-21T16:08:08.994Z","dependency_job_id":null,"html_url":"https://github.com/sassoftware/sasoptpy","commit_stats":{"total_commits":547,"total_committers":8,"mean_commits":68.375,"dds":0.08226691042047529,"last_synced_commit":"5f2ea28bb66cf072527b8787ad6c7bd516db5d00"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/sassoftware/sasoptpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fsasoptpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fsasoptpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fsasoptpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fsasoptpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sassoftware","download_url":"https://codeload.github.com/sassoftware/sasoptpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sassoftware%2Fsasoptpy/sbom","scorecard":{"id":801286,"data":{"date":"2025-08-11","repo":{"name":"github.com/sassoftware/sasoptpy","commit":"5f2ea28bb66cf072527b8787ad6c7bd516db5d00"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.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"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile-base:1: pin your Docker image by updating python:3.10 to python:3.10@sha256:c69e40390fbbcbe98785d0bec0e93a9308850c6727edba2293bba4c79bdaffb5","Warn: containerImage not pinned by hash: Dockerfile-test:1: pin your Docker image by updating python:latest to python:latest@sha256:3b2f1b9c9948e9dc96e1a2f4668ba9870ff43ab834f91155697476142b3bc299","Warn: pipCommand not pinned by hash: Dockerfile-base:3","Warn: pipCommand not pinned by hash: Dockerfile-base:5","Warn: pipCommand not pinned by hash: Dockerfile-test:3","Warn: pipCommand not pinned by hash: Dockerfile-test:5","Warn: pipCommand not pinned by hash: Dockerfile-test:7","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   5 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":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/sassoftware/.github/SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/sassoftware/.github/SECURITY.md:1","Info: Found text in security policy: github.com/sassoftware/.github/SECURITY.md:1"],"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":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2020-73"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T10:33:40.692Z","repository_id":48342896,"created_at":"2025-08-23T10:33:40.692Z","updated_at":"2025-08-23T10:33:40.692Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014104,"owners_count":26085459,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2024-12-20T22:30:56.719Z","updated_at":"2025-10-13T07:05:54.710Z","avatar_url":"https://github.com/sassoftware.png","language":"SAS","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/logo.png\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Python](https://img.shields.io/badge/python-3.6%2B-blue) ](https://www.python.org/)\n[![GitHub issues](https://img.shields.io/github/issues/sassoftware/sasoptpy)](https://github.com/sassoftware/sasoptpy/issues) \u003cbr\u003e\n[![GitHub release](https://img.shields.io/github/v/release/sassoftware/sasoptpy?label=stable%20release)](https://github.com/sassoftware/sasoptpy/releases)\n[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/sassoftware/sasoptpy?include_prereleases\u0026label=latest%20release)](https://github.com/sassoftware/sasoptpy/releases)\n[![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/sassoftware/sasoptpy?include_prereleases\u0026label=latest%20tag)](https://github.com/sassoftware/sasoptpy/tags) \u003cbr\u003e\n[![License](https://img.shields.io/github/license/sassoftware/sasoptpy)](https://github.com/sassoftware/sasoptpy/blob/master/LICENSE)\n[![Community](https://img.shields.io/badge/community-SAS%20Forums-red)](https://communities.sas.com/t5/Mathematical-Optimization/bd-p/operations_research)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/sassoftware/sasoptpy/master)\n\u003c/div\u003e\n\n## Overview\n\nsasoptpy is the Python interface for SAS Optimization and SAS/OR solvers. It enables developers to quickly formulate and solve mathematical optimization problems by using native Python data structures. sasoptpy works with both client-side and server-side data, and it allows concurrency, making it a great tool for working with both small and large projects.\n\n## Features\n\n- Supports several optimization problem types:\n  - Linear optimization (LP)\n  - Mixed integer linear optimization (MILP)\n  - Nonlinear optimization (NLP)\n  - Quadratic optimization (QP)\n- Works with both client-side and server-side data\n- Allows abstract modeling with run-time actions\n- Supports workspaces, enabling you to run multiple problems concurrently\n- Provides wrapper for tuning MILP solver parameters\n\n## Flow\n\n#### Concrete Model\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"img/flow-animation-concrete.gif\"\u003e\n\u003c/div\u003e\n\nUsing native Python functionality, you can model an optimization problem on the client and solve it in SAS Viya or SAS 9.4.\nThe problem is fully generated on the client side, and the computationally expensive part is handled by the optimization solver.\n\n#### Abstract Model\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"img/flow-animation-abstract.gif\"\u003e\n\u003c/div\u003e\n\nIf you have the data available on the server, you can model an abstract problem and cut the model generation time significantly.\nYou can also benefit from solving several problems concurrently.\n\n## Installation\n\nYou can install sasoptpy via PyPI, via Conda, or by cloning from the repository.\n\n- PyPI\n\n  ``` sh\n  pip install sasoptpy\n  ```\n\n- Conda\n\n  ``` sh\n  conda install -c sas-institute sasoptpy\n  ```\n\n- Repository\n\n  ``` sh\n  git clone https://github.com/sassoftware/sasoptpy.git\n  cd sasoptpy/\n  python3 setup.py install\n  ```\n\n## Examples\n\n### 1. Team Selection Problem\n\n\n\u003ca href=\"#\"\u003e\n\u003cimg align=\"right\" src=\"img/example_main.png\"\u003e\n\u003c/a\u003e\n\nIn many team sports, such as soccer, basketball, and e-sports, a common task is to choose team members from the pool of available players. In the following example, consider a generic problem, where the decision maker is trying to sign three players from hundreds of candidates. The objective is to maximize the total rating of the team.\n\nThe problem summary is as follows:\n\n  - Data\n    - List of players along with their attributes, desired position(s), and contract price\n    - Budget limit\n  - Decision\n    - Choosing a player to sign for each position\n  - Constraints\n    - Total signing cost should not exceed the budget limit\n    - Players can play only their desired position\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/squad_problem_table.png\"\u003e\n\u003c/div\u003e\n\n\n**Objective** is to maximize the team rating. The team rating is the quadratic sum of position pair ratings.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/squad_problem.png\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"img/squad_problem_obj.png\"\u003e\n\u003c/div\u003e\n\n\n[Jupyter notebook](https://github.com/sassoftware/sasoptpy/blob/master/examples/notebooks/TeamSelection.ipynb) shows how this problem is solved using a simple linearization and the SAS Optimization MILP solver. [(nbviewer)](https://nbviewer.jupyter.org/github/sassoftware/sasoptpy/blob/master/examples/notebooks/TeamSelection.ipynb)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://nbviewer.jupyter.org/github/sassoftware/sasoptpy/blob/master/examples/notebooks/TeamSelection.ipynb\"\u003e\n  \u003cimg src=\"img/squad_example.gif\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\n### 2. Diet Problem\n\nThe diet problem, also known as the Stigler diet problem, is one of the earliest optimization problems in the literature. George J. Stigler originally posed the question of how to find the cheapest diet while satisfying the minimum nutritional requirements (Stigler 1945).\n\nThis well-known problem can be solved easily with linear optimization. Because the methodology had not been developed in 1937, Stigler solved this problem by using heuristics. And although his solution was not the optimal (best) solution, he missed the best solution by only 24 cents (per year).\n\nYou can see how this problem can be written in terms of mathematical equations and fed into SAS Optimization solvers by using the modeling capabilities of the sasoptpy package in [Jupyter Notebook](https://github.com/sassoftware/sasoptpy/blob/master/examples/notebooks/DietProblem.ipynb). [(nbviewer)](https://nbviewer.jupyter.org/github/sassoftware/sasoptpy/blob/master/examples/notebooks/DietProblem.ipynb)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://nbviewer.jupyter.org/github/sassoftware/sasoptpy/blob/master/examples/notebooks/DietProblem.ipynb\"\u003e\n  \u003cimg src=\"img/diet_example.gif\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://sassoftware.github.io/sasoptpy/examples/examples.html\"\u003e\u003cimg src=\"img/more_examples.png\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n## Contributions\n\nWe welcome all contributions, including bug reports, new features, documentation fixes, performance enchancements, and new ideas.\n\nIf you have something to share, we accept pull requests on Github. See the [Contributing Instructions](CONTRIBUTING.md) for more details. See the [Contributor Agreement](ContributorAgreement.txt) for more details about our code of conduct.\n\n## Tests\n\nUnit tests are mainly intended for internal testing purposes. If your environment variables are set, you can use `unittest` to test the health of a commit or to test the code coverage. See [tests README](tests/README.md) for more details.\n\n## Documentation\n\nThe official documentation is hosted at Github Pages: https://sassoftware.github.io/sasoptpy/.\n\nA PDF version is also available: https://sassoftware.github.io/sasoptpy/sasoptpy.pdf.\n\nThe documentation is automatically generated using [Sphinx](https://www.sphinx-doc.org/en/master/). All class, method, and function APIs are provided in the source code. The main structure can be found in the `doc` folder.\n\n## License\n\nThis package is published under Apache 2.0 license. See [LICENSE](LICENSE.md) for details.\n\n\n---\n\n\nCopyright © SAS Institute Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fsasoptpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsassoftware%2Fsasoptpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsassoftware%2Fsasoptpy/lists"}