Metadata-Version: 2.4
Name: iwopy
Version: 1.0.0
Summary: Fraunhofer IWES optimization tools in Python
Author: Jonas Schulte, Bernhard Stoevesandt
Maintainer: Jonas Schulte
License: MIT License
        
        Copyright (c) 2022 FraunhoferIWES
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/FraunhoferIWES/iwopy
Project-URL: Documentation, https://fraunhoferiwes.github.io/iwopy
Project-URL: Repository, https://github.com/FraunhoferIWES/iwopy.git
Project-URL: Bug Tracker, https://github.com/FraunhoferIWES/iwopy/issues
Project-URL: Changelog, https://github.com/FraunhoferIWES/iwopy/blob/main/CHANGELOG.md
Keywords: Optimization,Interface
Classifier: Topic :: Scientific/Engineering
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
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: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.12
Provides-Extra: scipy
Requires-Dist: scipy>=1.12; extra == "scipy"
Provides-Extra: cma
Requires-Dist: cma>=4.4.0; extra == "cma"
Provides-Extra: nevergrad
Requires-Dist: nevergrad>=1.0.12; extra == "nevergrad"
Requires-Dist: numpy<2.4; extra == "nevergrad"
Provides-Extra: optuna
Requires-Dist: optuna>=5.0.0; extra == "optuna"
Provides-Extra: deap
Requires-Dist: deap>=1.4.4; extra == "deap"
Provides-Extra: pymoo
Requires-Dist: pymoo>=0.6; extra == "pymoo"
Provides-Extra: pygmo
Requires-Dist: pygmo>=2.19; extra == "pygmo"
Provides-Extra: opt
Requires-Dist: iwopy[scipy]; extra == "opt"
Requires-Dist: iwopy[cma]; extra == "opt"
Requires-Dist: iwopy[nevergrad]; extra == "opt"
Requires-Dist: iwopy[optuna]; extra == "opt"
Requires-Dist: iwopy[deap]; extra == "opt"
Requires-Dist: iwopy[pymoo]; extra == "opt"
Requires-Dist: iwopy[pygmo]; extra == "opt"
Provides-Extra: test
Requires-Dist: pytest>=9.0.3; extra == "test"
Requires-Dist: nbmake>1.0; extra == "test"
Requires-Dist: iwopy[cma,deap,nevergrad,optuna,pygmo,pymoo,scipy]; extra == "test"
Requires-Dist: pre-commit>=3.0; extra == "test"
Requires-Dist: mypy!=2.3.1,>=1.11.0; extra == "test"
Provides-Extra: doc
Requires-Dist: setuptools>=84.0.0; extra == "doc"
Requires-Dist: iwopy[pymoo]; extra == "doc"
Requires-Dist: sphinx>=5.0; extra == "doc"
Requires-Dist: sphinx-autoapi>=3.0; extra == "doc"
Requires-Dist: sphinx-immaterial>=0.10; extra == "doc"
Requires-Dist: myst-nb>=1.0; extra == "doc"
Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "doc"
Requires-Dist: ipython>=8.10; extra == "doc"
Requires-Dist: ipykernel>=6.0.2; extra == "doc"
Requires-Dist: ipywidgets>=8.0; extra == "doc"
Requires-Dist: lxml_html_clean>=0.4.5; extra == "doc"
Provides-Extra: dev
Requires-Dist: pre-commit>=3.0; extra == "dev"
Requires-Dist: mypy!=2.3.1,>=1.11.0; extra == "dev"
Requires-Dist: objsize>=0.5; extra == "dev"
Requires-Dist: jupyter>=1.0; extra == "dev"
Dynamic: license-file

# iwopy

Fraunhofer IWES optimization tools in Python

<picture>
	<source media="(prefers-color-scheme: dark)" srcset="Logo_IWOPY_white.svg">
	<img alt="IWOPY logo" src="Logo_IWOPY.svg" width="100%">
</picture>

## Overview

Define your optimization problem once and use native or external solvers through
a shared Python interface. Available external integrations include:

- [pymoo](https://pymoo.org/index.html)
- [pygmo](https://esa.github.io/pygmo2/index.html)
- [scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html)
- [pycma](https://github.com/CMA-ES/pycma)
- [Nevergrad](https://facebookresearch.github.io/nevergrad/)
- [Optuna](https://optuna.org/)
- [DEAP](https://deap.readthedocs.io/)

iwopy's `GG` and `SLSQP` optimizers are included. `LocalFD` supplies finite-difference
derivatives; `DiscretizeRegGrid` is the regular-grid problem wrapper. Population
evaluation batches candidates or derivative points when the chosen backend supports it.

The [optimizer catalog](https://fraunhoferiwes.github.io/iwopy/optimizer_catalog.html)
lists every selectable optimizer with a short description and a runnable,
explicit Python setup.

Documentation: [https://fraunhoferiwes.github.io/iwopy](https://fraunhoferiwes.github.io/iwopy)

Source code: [https://github.com/FraunhoferIWES/iwopy](https://github.com/FraunhoferIWES/iwopy)

PyPi reference: [https://pypi.org/project/iwopy/](https://pypi.org/project/iwopy/)

Anaconda reference: [https://anaconda.org/conda-forge/iwopy](https://anaconda.org/conda-forge/iwopy)

## Citation

Please cite the JOSS paper [IWOPY: Fraunhofer IWES optimization tools in
Python](https://doi.org/10.21105/joss.06014)

 [![DOI](https://joss.theoj.org/papers/10.21105/joss.06014/status.svg)](https://doi.org/10.21105/joss.06014)

BibTeX is available on the [citation page](https://fraunhoferiwes.github.io/iwopy/citation.html).

## Requirements

Supported Python versions: 3.10 through 3.14. NumPy, SciPy, and matplotlib are
base dependencies.

## Installation

Install in an active virtual environment:

```console
pip install iwopy
```

Optional extras are `cma`, `nevergrad`, `optuna`, `deap`, `pymoo`, and `pygmo`;
use `pip install 'iwopy[opt]'` for all backends. SciPy differential evolution
needs no extra. Nevergrad currently requires NumPy below 2.4.

Conda users can install the conda-forge package:

```console
conda install -c conda-forge iwopy
```

See the [installation guide](https://fraunhoferiwes.github.io/iwopy/installation.html)
for environment setup and development-branch installation.

## Optimizer Creation

Select a backend family and algorithm through the standalone factory:

```python
from iwopy.benchmarks import QuadraticProblem
from iwopy import create_optimizer

solver = create_optimizer(
	family="iwopy",
	optimizer="SLSQP",
	problem=QuadraticProblem(),
	max_iterations=100,
)
solver.initialize(verbosity=0)
results = solver.solve(verbosity=0)
```

Optimizer classes use explicit parameters and flat native keyword options.
Existing class names remain available. See the
[creation API](https://fraunhoferiwes.github.io/iwopy/api_core.html#optimizer-creation)
for all families, including SciPy methods and PyGMO-backed NLopt solvers.
The [shared parameter table](https://fraunhoferiwes.github.io/iwopy/api_core.html#optimizer-parameters)
explains population/batch units and supported native termination limits.

## Development

```console
git clone https://github.com/FraunhoferIWES/iwopy.git
cd iwopy
uv sync --extra dev --extra test --extra opt --upgrade
uv run pre-commit install
uv run pre-commit run --all-files
uv run pytest tests
```

Follow [AGENTS.md](AGENTS.md) and [docs/development.md](docs/development.md) for
test ownership and completion gates. Contributions are welcome through
[pull requests](https://github.com/FraunhoferIWES/iwopy/pulls).

## Support

For trouble shooting and support, please
- raise an issue [here](https://github.com/FraunhoferIWES/iwopy/issues),
- or start a discussion [here](https://github.com/FraunhoferIWES/iwopy/discussions),
- or contact the contributers.

Thanks for your help with improving *iwopy*!
