Skip to main content

YAPSS: Yet Another Pseudo-Spectral Solver

YAPSS is a Python library for formulating and solving optimal-control problems with pseudospectral methods.

YAPSS provides:

  • Legendre-Gauss, Legendre-Gauss-Radau, and Legendre-Gauss-Lobatto collocation methods, using a computational approach based on the GPOPS-II algorithm of Patterson and Rao (2014)
  • Multiple differentiation approaches: automatic differentiation via CasADi, user-supplied derivatives, and central-difference numerical differentiation for problems not amenable to automatic differentiation
  • Multi-phase problems and segmented meshes
  • An interface designed to identify common formulation errors early
  • Worked examples as both Python scripts and Jupyter notebooks

Start here

  1. Install YAPSS.
  2. Work through the tutorial to define and solve a first problem.
  3. Browse the examples for complete applications.

Installation

YAPSS requires Python 3.10 or later. Install it into a virtual environment with pip:

$ python -m venv yapss-env
$ source yapss-env/bin/activate
(yapss-env) $ python -m pip install --upgrade pip
(yapss-env) $ python -m pip install yapss

Alternatively, install it with Conda:

$ conda create -n yapss-env python=3.10
$ conda activate yapss-env
(yapss-env) $ conda install -c conda-forge yapss

Verify the Installation

Run the HS071 example, a small constrained optimization problem:

(yapss-env) $ python -m yapss.examples.hs071

YAPSS is installed correctly if the run finishes, and the output ends with

Objective value
f(x*) = 1.701402e+01

YAPSS solution is correct.

The value of the final digits of the objective may vary between platforms and solver versions.

Where to go next

Citing YAPSS

If you use YAPSS in published work, please cite it, giving the version you used. Each release is archived on Zenodo; the DOI below always resolves to the latest version, and the record for each version has its own DOI.

Hall, S. R. (2026). YAPSS: Yet Another Pseudo-Spectral Solver (Version 0.2.3) [Computer software]. https://doi.org/10.5281/zenodo.22402223

The repository's CITATION.cff carries the same metadata in machine-readable form; GitHub's "Cite this repository" button renders it as BibTeX or APA. The Legendre-Gauss-Radau transcription follows Patterson and Rao (2014), cited at the top of this page, which you may wish to cite as well; the Legendre-Gauss and Legendre-Gauss-Lobatto transcriptions extend their approach.

License

YAPSS is licensed under the MIT License. See the License page for more information.

Documentation

The documentation is available on Read the Docs.

Metadata

Release files for yapss 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yapss 0.2.3
File Size Uploaded Provenance Actions
yapss-0.2.3.tar.gz 402.7 kB With provenance Details for yapss-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yapss 0.2.3
File Interpreter ABI Platform Actions
yapss-0.2.3-py3-none-any.whl Python 3 none any Details for yapss-0.2.3-py3-none-any.whl

Total release size: 560.9 kB

Release files / yapss-0.2.3.tar.gz

Download URL yapss-0.2.3.tar.gz
Size 402.7 kB
Tags Source
SHA-256 checksum
How to use checksums
592cb13de80612407acb5eac7818a00a50517ae5b01b2f147c83a5da68b40a22
BLAKE2b-256 checksum
How to use checksums
0a38ae7ccc4248896555c978615cff9df0cb41bb098d36e53fc6bf60f48d488a
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 Sep 13, 2026.

Transparency log

Release files / yapss-0.2.3-py3-none-any.whl

Download URL yapss-0.2.3-py3-none-any.whl
Size 158.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cdf318dc6dd0b868c0f939d190058de743a5a100d01b67e3e27a10b66ed6c74
BLAKE2b-256 checksum
How to use checksums
33e704069d4098c38a1a646c00c12dc14771f483f8ddfff0ea2ba0b58d27a27e
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 Sep 13, 2026.

Transparency log

Security for yapss 0.2.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yapss-0.2.3.tar.gz

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 Sep 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page