Skip to main content

A derivative-free solver for general nonlinear optimization

Project description

https://img.shields.io/github/actions/workflow/status/cobyqa/cobyqa/build.yml?logo=github&style=for-the-badge https://img.shields.io/readthedocs/cobyqa/latest?logo=readthedocs&style=for-the-badge https://img.shields.io/codecov/c/github/cobyqa/cobyqa?logo=codecov&style=for-the-badge https://img.shields.io/pypi/v/cobyqa?logo=pypi&style=for-the-badge https://img.shields.io/pypi/dm/cobyqa?logo=pypi&style=for-the-badge https://img.shields.io/pypi/pyversions/cobyqa?logo=python&style=for-the-badge https://img.shields.io/pypi/l/cobyqa?style=for-the-badge

COBYQA, named after Constrained Optimization BY Quadratic Approximations, is a derivative-free solver for general nonlinear optimization. It can handle unconstrained, bound-constrained, linearly constrained, and nonlinearly constrained problems. It uses only function values of the objective function and nonlinear constraint functions, if any. No derivative information is needed.

The current release of COBYQA is distributed under the BSD-3-Clause license.

Documentation: https://www.cobyqa.com/

Installation

COBYQA can be installed on Python 3.8 or above.

Dependencies

The following Python packages are required by COBYQA:

  • NumPy 1.17.0 or higher, and

  • SciPy 1.1.0 or higher.

User installation

The easiest way to install COBYQA is using pip

python -m pip install cobyqa

To check your installation, you can execute

python -c "import cobyqa; cobyqa.show_versions()"

Testing

To execute the test suite of COBYQA, you first need to install the package as

python -m pip install cobyqa[tests]

You can then run the test suite by executing

python -m pytest --pyargs cobyqa

Examples

The folder examples contains a few examples of how to use COBYQA. To run powell2015.py, you first need to install the package as

python -m pip install cobyqa[examples]

This will install matplotlib alongside COBYQA.

Support

To report a bug or request a new feature, please open a new issue using the issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cobyqa-1.0.dev1.tar.gz (38.0 kB view hashes)

Uploaded source

Built Distribution

cobyqa-1.0.dev1-py3-none-any.whl (37.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page