This release is a pre-release and may not be stable for production use.
The Supporting Hyperplane Optimization Toolkit
SHOT is a software for solving mathematical optimization problems of the mixed-integer nonlinear programming (MINLP) class. In addition to MINLP problems, SHOT can also be used for subclasses such as NLP and MI(QC)QP.
Python installation
Install the open-source solver build (Cbc, Ipopt, and HiGHS) from PyPI:
pip install SHOTpy
import SHOTpy
solver = SHOTpy.Solver()
problem = SHOTpy.Problem(solver)
x = problem.addVariable("x", SHOTpy.VariableType.Real, 0.0, 10.0)
y = problem.addVariable("y", SHOTpy.VariableType.Integer, 0.0, 10.0)
problem.setObjective(SHOTpy.exp(x) + (y - 2.5)**2)
problem.addConstraint(x + y >= 3, "c")
problem.finalize()
solver.setProblem(problem)
solver.solveProblem()
print(solver.getModelReturnStatus(), solver.getPrimalSolution().point)
See the SHOTpy tutorial for nonlinear expressions, settings, file input, and callbacks.
Building with proprietary solvers
Public wheels cannot redistribute the CPLEX, Gurobi, or GAMS SDKs. If one of these products is installed and licensed locally, force an sdist build and pass its existing SHOT CMake options through pip. For example:
pip install SHOTpy --no-binary SHOTpy \
--config-settings=cmake.define.HAS_GUROBI=on \
--config-settings=cmake.define.GUROBI_DIR=/opt/gurobi1103/linux64
Use the same pattern with HAS_CPLEX/CPLEX_DIR or HAS_GAMS/GAMS_DIR.
The compiler toolchain and open-source dependencies described in the
compilation instructions are still required
for a source build.
Originally SHOT was intended for convex MINLP problems only, but as of version 1.0 it also has functionality to solve nonconvex MINLP problems as a heuristic method without providing any guarantees of global optimality. SHOT can solve certain nonconvex problem types to global optimality as well, and the bounds for the objective function value are guaranteed for nonconvex problems as well.
SHOT can be used
- as a console application,
- from GAMS — the easiest way to use SHOT is through GAMSPy,
- on the NEOS Server,
- from any modeling system that can use ASL, such as
- Pyomo/Python,
- JuMP/Julia, and
- AMPL,
- through its own Python API (SHOTpy) — install with
pip install SHOTpyor build with-DHAS_PYTHON=on(see docs/CompilationInstructions.md), or - using its API implemented in C++, both of which support callbacks for customizing SHOT's behavior (e.g. injecting primal solutions, warm-starting, or adding custom cuts).
SHOT requires a MILP solver: Cplex, Gurobi, Cbc or HiGHS. In addition an NLP solver is required; currently only Ipopt is supported. If SHOT is interfaced with GAMS, any licensed NLP solver can be used.
The documentation is provided at the project website at https://www.shotsolver.dev.
SHOT is a COIN-OR project, and won the COIN-OR Cup 2018. Project manager is Andreas Lundell. A full list of contributors is available on the project website.
Dual bound through polyhedral (outer) approximation
SHOT is based on iteratively creating a tighter polyhedral approximation of the nonlinear feasible set by generating supporting hyperplanes or cutting planes. These linearized problems are then solved with a mixed-integer linear programming (MILP) solver such as CPLEX, Gurobi, Cbc or HiGHS. If CPLEX or Gurobi is used, the subproblems can also include quadratic and bilinear nonlinearities directly; then MIQP or MIQCQP subproblems are solved. The dual strategy can be run either as a multi-tree search (repeatedly re-solving the MIP relaxation) or, with CPLEX or Gurobi, as a single-tree (branch-and-cut) search that adds cuts via callbacks during one search tree; Cbc and HiGHS currently only support the multi-tree strategy.
The problem types that can be solved to global optimality depend on which MIP solver is used:
| Problem type | CPLEX | Gurobi | Cbc | HiGHS |
|---|---|---|---|---|
| Convex MIQP | ✓* | ✓* | ✓ | ✓ |
| Convex MIQCQP | ✓* | ✓* | ✓ | ✓ |
| Convex MINLP | ✓ | ✓ | ✓ | ✓ |
| Nonconvex MIQP | ✓* | ✓* | ? | ? |
| Nonconvex MIQCQP | ? | ✓* | ? | ? |
| Nonconvex MINLP | ? | ? | ? | ? |
✓ = solved to global optimality, ? = no guarantee that a solution is found, * = the problem can be handled directly by the subsolver (native quadratic/bilinear support).
Primal bound using heuristics
The solution to the outer approximation problem provides a lower (dual) bound (when solving a minimization problem) to the original problem if the problem is convex. If the problem is nonconvex, convergence to the global optimal solution cannot be guaranteed (but might be achieved for certain classes of problems, cf. this paper.
To get an upper (primal) bound (when solving a minimization problem) on the optimal solution SHOT utilizes the following heuristics:
- Solving nonlinear programming (NLP) problems where the integer variables have been fixed to valid values. This is done by calling an external NLP solver (e.g. Ipopt).
- By checking solutions from the MIP solver's solution pool for points that fulfill also the nonlinearities in the original MINLP problem.
- By performing root searches.
Termination
When the relative or absolute difference (objective gap) between the primal and dual bounds is less than a user-specified value, SHOT terminates with the current primal solution. If the original problem is convex, this is a global solution to the problem. If it is nonconvex, there is normally no guarantee that such a solution can be found, however SHOT will always in addition to the primal solution give a valid lower bound on the solution.
Compilation instructions
Instructions for compiling SHOT are available in docs/CompilationInstructions.md, and also at the project website.
Solver manual
Instructions for how to use SHOT, e.g. call it from different environments, are provided in docs/CommandLineUsage.md and on the project website. For troubleshooting solver behavior, see docs/DebuggingSHOT.md.
Publications
SHOT is best described in the paper:
Lundell, A. Kronqvist, J. and Westerlund, T. The supporting hyperplane optimization toolkit for convex MINLP. Journal of Global Optimization (2022). https://link.springer.com/article/10.1007/s10898-022-01128-0
The features for solving nonconvex MINLP problems are described in the papers:
Lundell, A. and Kronqvist, J., Polyhedral approximation strategies for nonconvex mixed-integer nonlinear programming in SHOT. Journal of Global Optimization (2021). https://doi.org/10.1007/s10898-021-01006-1
Lundell, A. and Kronqvist, J. On Solving Nonconvex MINLP Problems with SHOT (2019). In: Le Thi H., Le H., Pham Dinh T. (editors) Optimization of Complex Systems: Theory, Models, Algorithms and Applications. WCGO 2019. Advances in Intelligent Systems and Computing, vol 991. Springer, Cham.
Reformulation of nonseparable convex quadratic expressions (preprint):
Blomqvist, J., Tamm, E., Kronqvist, J. and Lundell, A. Decomposition-Based Reformulation of Nonseparable Quadratic Expressions in Convex MINLP. Optimization Online (2026). https://optimization-online.org/?p=34367
Metadata
Release files for SHOTpy 2.0.0rc0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shotpy-2.0.0rc0.tar.gz | 10.1 MB | Details |
Built distributions (wheels)
Total release size: 146.8 MB
Release files / shotpy-2.0.0rc0.tar.gz
| Download URL | shotpy-2.0.0rc0.tar.gz |
|---|---|
| Size | 10.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f70ad3a9ea8d7e9670813caa434de21a3e8084bbcfa3b9d0b42b75c46d8979ca
|
|
BLAKE2b-256 checksum How to use checksums |
134fc4235f5b49488a94646f492f7e3595a5c12bcb4f1f1ace138f5a7de01cc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | shotpy-2.0.0rc0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.15 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d7435f0c69aed5d9f1f438d8c9e69a60611be66bbfb88f4a5b47ad8ceb40b628
|
|
BLAKE2b-256 checksum How to use checksums |
d5d141f5b0648412bb46df40c27ea3002b5d8adf6f7822e1ec5aa57ec1ce929b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp315-cp315-macosx_14_0_arm64.whl
| Download URL | shotpy-2.0.0rc0-cp315-cp315-macosx_14_0_arm64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | CPython 3.15 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
649557aa69ac7084616c57b3bf6b09c025dcba753cf6fd2e015067990b2c3fe6
|
|
BLAKE2b-256 checksum How to use checksums |
e23d07ffe500237b5b0111991b464e5214998c5fa7ef54f5939defe992e1f8ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | shotpy-2.0.0rc0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
70b879e30041e66fdfc8876e662d7348fa0cbb83e8f78e670eeced262aa41a5c
|
|
BLAKE2b-256 checksum How to use checksums |
ee0ad39acd211f24644bd36496c26682e08f401f76c9c55f9bae787c1b2879ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp314-cp314-macosx_14_0_arm64.whl
| Download URL | shotpy-2.0.0rc0-cp314-cp314-macosx_14_0_arm64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | CPython 3.14 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e0f108f03b392678c5ae5ac15b7458f55d72f93b68f3fd686f6da31590417ae6
|
|
BLAKE2b-256 checksum How to use checksums |
08fbd41ba5bad00c04cc241805238b498cf528ab212f358b67b3969173f74bda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | shotpy-2.0.0rc0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5af3df630134cdd1f253c7688fd9b8d21d78c3b2822f78a5d407126f63e01f89
|
|
BLAKE2b-256 checksum How to use checksums |
6e43366fe6d63f8e0ac96f9e51d2d428bbc2d4e13d82499d088e57a75b7b6ca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp313-cp313-macosx_14_0_arm64.whl
| Download URL | shotpy-2.0.0rc0-cp313-cp313-macosx_14_0_arm64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | CPython 3.13 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
79c5fe721f98fbf463f87fb854273276c63aea44dc903c31a4631eb097df0802
|
|
BLAKE2b-256 checksum How to use checksums |
78a94d916e3248a69662114d0315d742bd609e0388b6c12c7464c25a4d0d22bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | shotpy-2.0.0rc0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d7c17e6a5df21d2dcc0586631f8996f74a89a4dfbc4923ca40eb404aa46403b5
|
|
BLAKE2b-256 checksum How to use checksums |
2e286f56f1f3bfd63dae451df92ceed52f61bf0d43504504fecd4e7b81bdf109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | shotpy-2.0.0rc0-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7cc2948e86eb914361d7fcdc71e131d9110b1020d39c4a86644309dbed4fee32
|
|
BLAKE2b-256 checksum How to use checksums |
06058110a7cd2b9fd31393b4f2233c79d4d2c20615f178ead5c77b04e65f9f63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | shotpy-2.0.0rc0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ddadee9c3db0db093454147925e667b9a453b76721a67f23cd1664a6bfcb48bd
|
|
BLAKE2b-256 checksum How to use checksums |
98ef35593b938b036d5a18d28504a5a00992dd63d6f77848e6db1757142cf8d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / shotpy-2.0.0rc0-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | shotpy-2.0.0rc0-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b68cb302ae89c930b9c2bb2ee81d16834638094b890a3630320b5f25be37f2ab
|
|
BLAKE2b-256 checksum How to use checksums |
a5f73feb641a2fd756957f46a35ef4981cb7ebc3e191cda6c28e10e130199c0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log