About sasoptpy

sasoptpy is a Python package that provides easy and integrated ways of working with optimization solvers in SAS Optimization and SAS/OR. It enables developers to model optimization problems with ease by providing high-level building blocks.


sasoptpy is very flexible in terms of the optimization problem types and workflow alternatives.


sasoptpy currently supports the following problem types:

  • Linear problems

  • Integer linear problems / Mixed integer linear problems

  • Quadratic problems

  • Nonlinear problems

  • Black-box problems


sasoptpy supports working with both client-side data and server-side data. When data are available on the client, it populates the model with integrated data and brings the solution back to the client. When data are available on the server, it generates the code to populate the model on the server. You can retrieve the final solution afterward.


sasoptpy can be used with SAS Viya 3.3 or later and SAS 9.4, in all the supported operating systems.

Road Map

The goal of sasoptpy is to support all the functionality of the SAS Optimization and SAS/OR solvers and provide a high-level set of tools for easily working with models.


sasoptpy follows Semantic Versioning as of version 1.0.0.

  • Any backward incompatible changes increase the major version number (X.y.z).

  • Minor changes and improvements increase the the minor version number (x.Y.z).

  • Patches increase the patch version number (x.y.Z).

  • Pre-releases are marked by using alpha and beta, and release candidates are marked by using rc identifiers.


sasoptpy is an open-source package and uses the standard Apache 2.0 license.


Have any questions?

  • If you have a package-related issue, feel free to report it on GitHub.

  • If you have an optimization-related question, consider asking it on SAS Communities.

  • For further technical support, contact SAS Technical Support.


Contributions are always welcome. Clone the project to your working environment and submit pull requests as you see fit. For more information, see the guidelines at the GitHub repository.