{"id":48496394,"url":"https://github.com/cog-imperial/suspect","last_synced_at":"2026-04-07T12:30:39.195Z","repository":{"id":31176652,"uuid":"127118649","full_name":"cog-imperial/suspect","owner":"cog-imperial","description":"Special Structure Detection for Pyomo","archived":false,"fork":false,"pushed_at":"2022-07-14T10:31:11.000Z","size":1274,"stargazers_count":26,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-05T23:35:56.534Z","etag":null,"topics":["convexity","mathematical-programming","mixed-integer-optimization","nonlinear-optimization","pyomo"],"latest_commit_sha":null,"homepage":"https://cog-imperial.github.io/suspect/","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/cog-imperial.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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-03-28T09:42:37.000Z","updated_at":"2025-06-06T20:19:01.000Z","dependencies_parsed_at":"2022-08-08T23:00:19.111Z","dependency_job_id":null,"html_url":"https://github.com/cog-imperial/suspect","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/cog-imperial/suspect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cog-imperial%2Fsuspect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cog-imperial%2Fsuspect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cog-imperial%2Fsuspect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cog-imperial%2Fsuspect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cog-imperial","download_url":"https://codeload.github.com/cog-imperial/suspect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cog-imperial%2Fsuspect/sbom","scorecard":{"id":298655,"data":{"date":"2025-08-11","repo":{"name":"github.com/cog-imperial/suspect","commit":"4a0e04d1be2f400416d508e632d81077a2b212ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"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":"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":"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":"Code-Review","score":1,"reason":"Found 4/29 approved changesets -- score normalized to 1","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/main.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":"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":"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":"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/docs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/cog-imperial/suspect/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/cog-imperial/suspect/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/cog-imperial/suspect/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cog-imperial/suspect/main.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating continuumio/miniconda3:latest to continuumio/miniconda3:latest@sha256:4a2425c3ca891633e5a27280120f3fb6d5960a0f509b7594632cdd5bb8cbaea8","Warn: pipCommand not pinned by hash: Dockerfile:5","Warn: pipCommand not pinned by hash: Dockerfile:10","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:17","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/docs.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:29","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   8 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":"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":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-427 / GHSA-f865-m6cq-j9vx","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 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-17T20:09:51.512Z","repository_id":31176652,"created_at":"2025-08-17T20:09:51.512Z","updated_at":"2025-08-17T20:09:51.512Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31513375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["convexity","mathematical-programming","mixed-integer-optimization","nonlinear-optimization","pyomo"],"created_at":"2026-04-07T12:30:38.441Z","updated_at":"2026-04-07T12:30:39.188Z","avatar_url":"https://github.com/cog-imperial.png","language":"Python","readme":"Special Structure Detection for Pyomo\n=====================================\n\n|DOI|_ |GHA|_ |codecov|_\n\n.. |DOI| image:: https://zenodo.org/badge/127118649.svg\n.. _DOI: https://zenodo.org/badge/latestdoi/127118649\n.. |GHA| image:: https://github.com/cog-imperial/suspect/actions/workflows/main.yml/badge.svg\n.. _GHA: https://github.com/cog-imperial/suspect/actions/workflows/main.yml\n.. |codecov| image:: https://codecov.io/gh/cog-imperial/suspect/branch/master/graph/badge.svg\n.. _codecov: https://codecov.io/gh/cog-imperial/suspect\n\n\nThis library implements methods to:\n\n* Detect convex and concave expressions\n* Detect increasing and decreasing expressions\n* Detect linear, quadratic and polynomial expressions\n* Tighten expression bounds\n\nPlease reference this software as\n\n.. code-block:: latex\n\n    @Article{Suspect2019,\n    author={Ceccon, Francesco and Siirola, John D. and Misener, Ruth},\n    title={{SUSPECT}: {MINLP} special structure detector for Pyomo},\n    journal={Optimization Letters},\n    year={2019},\n    month={Feb},\n    issn=\"1862-4480\",\n    doi=\"10.1007/s11590-019-01396-y\",\n    url=\"https://doi.org/10.1007/s11590-019-01396-y\"\n    }\n\n\n\nDocumentation\n-------------\n\nDocumentation is available at https://cog-imperial.github.io/suspect/\n\n\nInstallation\n------------\n\nSUSPECT requires Python 3.5 or later. We recommend installing SUSPECT in\na virtual environment\n\nTo create the virtual environment run::\n\n    $ python3 -m venv myenv\n    $ source myenv/bin/activate\n\nThen you are ready to clone and install SUSPECT::\n\n    $ git clone https://github.com/cog-imperial/suspect.git\n    $ cd suspect\n    $ pip install -r requirements.txt\n    $ pip install .\n\n\nCommand Line Usage\n------------------\n\nThe package contains an utility to display structure information about\na single problem.\n\nYou can run the utility as::\n\n    model_summary.py -p /path/to/problem.osil\n\nor, if you want to check variables bounds include the solution::\n\n    model_summary.py -p /path/to/problem.osil -s /path/to/problem.sol\n\nThe repository also includes a `Dockerfile` to simplify running the utility in\nbatch mode in a cloud environment. Refer to the `batch` folder for more information.\n\n\nLibrary Usage\n-------------\n\n.. code-block:: python\n\n    from suspect import detect_special_structure, create_connected_model\n    import pyomo.environ as aml\n\n\n    model = aml.ConcreteModel()\n    model.x = aml.Var()\n    model.y = aml.Var()\n\n    model.obj = aml.Objective(expr=(model.y - model.x)**3)\n    model.c1 = aml.Constraint(expr=model.y - model.x \u003e= 0)\n\n    connected, _ = create_connected_model(model)\n    info = detect_special_structure(connected)\n\n    # try info.variables, info.objectives, and info.constraints\n    print(info.objectives['obj'])\n\n\nLicense\n-------\n\nCopyright 2020 Francesco Ceccon\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at::\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nAcknowledgements\n----------------\n\nThis work was funded by an Engineering \u0026 Physical Sciences Research Council Research Fellowship to RM [Grant Number EP/P016871/1].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcog-imperial%2Fsuspect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcog-imperial%2Fsuspect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcog-imperial%2Fsuspect/lists"}