Metadata-Version: 2.5
Name: yapss
Version: 0.2.0
Summary: A Python package for solving optimal control problems using pseudospectral methods.
Project-URL: Documentation, https://yapss.readthedocs.io/
Project-URL: Repository, https://github.com/stevenrhall/yapss.git
Project-URL: Issues, https://github.com/stevenrhall/yapss/issues
Project-URL: Changelog, https://github.com/stevenrhall/yapss/blob/main/CHANGELOG.md
Project-URL: Contributing, https://github.com/stevenrhall/yapss/blob/main/CONTRIBUTING.md
Author-email: "Steven R. Hall" <steve@steven-hall.net>
Maintainer-email: "Steven R. Hall" <steve@steven-hall.net>
License-Expression: MIT
License-File: LICENSE
License-File: LICENSES/mseipopt.txt
Keywords: optimal control,optimization,pseudospectral methods
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: casadi<=3.7.2,>=3.6.0
Requires-Dist: matplotlib
Requires-Dist: mpmath
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: black[jupyter]==26.5.1; extra == 'dev'
Requires-Dist: build; extra == 'dev'
Requires-Dist: furo; extra == 'dev'
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: ipykernel; extra == 'dev'
Requires-Dist: ipython; extra == 'dev'
Requires-Dist: isort==8.0.1; extra == 'dev'
Requires-Dist: jupyterlab; extra == 'dev'
Requires-Dist: jupyterlab-code-formatter; extra == 'dev'
Requires-Dist: jupyterlab-spellchecker; extra == 'dev'
Requires-Dist: lxml; extra == 'dev'
Requires-Dist: mypy==1.20.2; extra == 'dev'
Requires-Dist: myst-parser; extra == 'dev'
Requires-Dist: nbconvert; extra == 'dev'
Requires-Dist: nbsphinx; extra == 'dev'
Requires-Dist: nbwipers; extra == 'dev'
Requires-Dist: numpydoc; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-xdist; extra == 'dev'
Requires-Dist: pyyaml; extra == 'dev'
Requires-Dist: ruff==0.16.1; extra == 'dev'
Requires-Dist: sphinx; extra == 'dev'
Requires-Dist: sphinx-copybutton; extra == 'dev'
Requires-Dist: sphinx-llm; extra == 'dev'
Requires-Dist: sphinx-rtd-theme; extra == 'dev'
Requires-Dist: sphinxcontrib-bibtex; extra == 'dev'
Requires-Dist: toml; extra == 'dev'
Requires-Dist: tox==4.58.0; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: doc
Requires-Dist: ipykernel; extra == 'doc'
Requires-Dist: jupyterlab; extra == 'doc'
Requires-Dist: myst-parser; extra == 'doc'
Requires-Dist: nbconvert; extra == 'doc'
Requires-Dist: nbsphinx; extra == 'doc'
Requires-Dist: numpydoc; extra == 'doc'
Requires-Dist: sphinx; extra == 'doc'
Requires-Dist: sphinx-copybutton; extra == 'doc'
Requires-Dist: sphinx-llm; extra == 'doc'
Requires-Dist: sphinx-rtd-theme; extra == 'doc'
Requires-Dist: sphinxcontrib-bibtex; extra == 'doc'
Provides-Extra: notebook
Requires-Dist: ipython; extra == 'notebook'
Requires-Dist: jupyterlab; extra == 'notebook'
Requires-Dist: jupyterlab-spellchecker; extra == 'notebook'
Description-Content-Type: text/markdown

# 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)](https://dl.acm.org/doi/pdf/10.1145/2558904)
- 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](#installation).
2. Work through the [tutorial](https://github.com/stevenrhall/yapss/blob/main/examples/notebooks/tutorial.ipynb) to define and solve a first problem.
3. Browse the [examples](https://github.com/stevenrhall/yapss/tree/main/examples/notebooks) for complete applications.

## Installation

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

```console
$ 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:

```console
$ 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:

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

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

```text
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

- **New to YAPSS?** Start with the [tutorial](https://github.com/stevenrhall/yapss/blob/main/examples/notebooks/tutorial.ipynb).
- **Looking for a pattern to adapt?** Browse the [notebook examples](https://github.com/stevenrhall/yapss/tree/main/examples/notebooks) or
  [script examples](https://github.com/stevenrhall/yapss/tree/main/src/yapss/examples).
- **Need API details?** See the reference documentation in the navigation sidebar.
- **Want to contribute?** Contributions are welcome! Read
  [Contributing to YAPSS](https://github.com/stevenrhall/yapss/blob/main/CONTRIBUTING.md).

## License

YAPSS is licensed under the MIT License. See the 
[License](https://github.com/stevenrhall/yapss/blob/main/LICENSE) page
for more information.

## Documentation

The [documentation](https://yapss.readthedocs.io/) is available on Read the Docs.

