Skip to main content

Constrained Optimization BY Quadratic Approximations

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/pyversions/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/format/cobyqa?logo=pypi&style=for-the-badge https://img.shields.io/pypi/status/cobyqa?logo=pypi&style=for-the-badge

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

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

Installation

COBYQA can be installed for Python 3.8 or above.

Dependencies

The following Python packages are required by COBYQA:

  • NumPy 1.17.0 or higher, and

  • SciPy 1.10.0 or higher.

If you install COBYQA using pip (see below), these dependencies will be installed automatically. More dependencies are required to run the test suite and some examples given in the folder examples. See the relevant sections below for more details.

User installation

The easiest way to install COBYQA is using pip. In a terminal or command window type

pip install cobyqa

To check your installation, you can execute

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

If your python launcher is not python, you can replace it with the appropriate command (similarly for pip). For example, you may need to use python3 instead of python and pip3 instead of pip.

Testing

To execute the test suite of COBYQA, you first need to install pytest. You can then run the test suite by executing

pytest --pyargs cobyqa

The test suite takes several minutes to run. It is unnecessary to run the test suite if you installed COBYQA using the recommended method described above.

Examples

The folder examples contains a few examples of how to use COBYQA. To run powell2015.py, you first need to install matplotlib. These files contains headers explaining what problems they solve.

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.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

cobyqa-1.0.0-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

Details for the file cobyqa-1.0.0.tar.gz.

File metadata

  • Download URL: cobyqa-1.0.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cobyqa-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9dba7c5586e344cfdfac2e05aa4b324c65bbe1245a5e5cc490af7e57fc5e99cd
MD5 42344e45086ebb7c050381943f5f650f
BLAKE2b-256 059fc74dc01192b5dc45cf36da9b9b80adaf1a51dae1a43c9ebaddda32897188

See more details on using hashes here.

File details

Details for the file cobyqa-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cobyqa-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 52.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cobyqa-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e61eaa6310f805b3d753643fc53c1e91ca7071c5625b9e7e4214054c23ca67ab
MD5 b57fc6efed87a7b9473ad2709c3ee0bb
BLAKE2b-256 7238889bcf9ffa8a513658f61790d9cebfca033d60b43630a76bac24020db85b

See more details on using hashes here.

Supported by

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