Metadata-Version: 2.4
Name: cobyqa
Version: 1.1.3
Summary: Constrained Optimization BY Quadratic Approximations
Author-email: "Tom M. Ragonneau and Zaikun Zhang" <cobyqa@python.org>
Maintainer-email: "Tom M. Ragonneau" <tom.ragonneau@gmail.com>, Zaikun Zhang <zaikun.zhang@polyu.edu.hk>
License: BSD 3-Clause License
        
        Copyright (c) 2021-2025, Tom M. Ragonneau and Zaikun Zhang
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: homepage, https://www.cobyqa.com
Project-URL: documentation, https://www.cobyqa.com
Project-URL: source, https://github.com/cobyqa/cobyqa
Project-URL: download, https://pypi.org/project/cobyqa/#files
Project-URL: tracker, https://github.com/cobyqa/cobyqa/issues
Keywords: blackbox-optimization,constrained-optimization,derivative-free-optimization,hyperparameter-optimization,nonlinear-optimization,numerical-optimization,optimization,optimization-algorithms,optimization-methods,optimization-tools,simulation-based-optimization,unconstrained-optimization
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
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
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy>=1.17.0
Requires-Dist: scipy>=1.10.0
Provides-Extra: doc
Requires-Dist: matplotlib==3.10.7; extra == "doc"
Requires-Dist: numpydoc==1.9.0; extra == "doc"
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "doc"
Requires-Dist: Sphinx==8.2.3; extra == "doc"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "doc"
Requires-Dist: Sphinx-Substitution-Extensions==2025.11.17; extra == "doc"
Requires-Dist: sphinxcontrib-bibtex==2.6.5; extra == "doc"
Provides-Extra: examples
Requires-Dist: matplotlib; extra == "examples"
Provides-Extra: tests
Requires-Dist: pytest>=6.1.0; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Dynamic: license-file

COBYQA: Constrained Optimization BY Quadratic Approximations
============================================================

.. image:: https://img.shields.io/github/actions/workflow/status/cobyqa/cobyqa/build.yml?logo=github&style=for-the-badge
    :target: https://github.com/cobyqa/cobyqa/actions/workflows/build.yml
.. image:: https://img.shields.io/readthedocs/cobyqa/latest?logo=readthedocs&style=for-the-badge
    :target: https://www.cobyqa.com/
.. image:: https://img.shields.io/codecov/c/github/cobyqa/cobyqa?logo=codecov&style=for-the-badge
    :target: https://codecov.io/gh/cobyqa/cobyqa/
.. image:: https://img.shields.io/pypi/v/cobyqa?logo=pypi&style=for-the-badge
    :target: https://pypi.org/project/cobyqa/
.. image:: https://img.shields.io/pypi/dm/cobyqa?logo=pypi&style=for-the-badge
    :target: https://pypi.org/project/cobyqa/
.. image:: https://img.shields.io/conda/v/conda-forge/cobyqa?logo=anaconda&style=for-the-badge&label=conda-forge
    :target: https://anaconda.org/conda-forge/cobyqa
.. image:: https://img.shields.io/conda/d/conda-forge/cobyqa?logo=anaconda&style=for-the-badge&label=downloads
    :target: https://anaconda.org/conda-forge/cobyqa

COBYQA, an acronym for *Constrained Optimization BY Quadratic Approximations*, is designed to supersede `COBYLA <https://docs.scipy.org/doc/scipy/reference/optimize.minimize-cobyla.html>`_ 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 <https://www.python.org>`_.

Dependencies
~~~~~~~~~~~~

The following Python packages are required by COBYQA:

* `NumPy <https://www.numpy.org>`_ 1.17.0 or higher, and
* `SciPy <https://www.scipy.org>`_ 1.10.0 or higher.

If you install COBYQA using ``pip`` or ``conda`` (see below), these dependencies will be installed automatically.


User installation
~~~~~~~~~~~~~~~~~

The easiest way to install COBYQA is using ``pip`` or ``conda``.
To install it using ``pip``, run in a terminal or command window

.. code:: bash

    pip install cobyqa

If you are using ``conda``, you can install COBYQA from the `conda-forge <https://anaconda.org/conda-forge/cobyqa>`_ channel by running

.. code:: bash

    conda install conda-forge::cobyqa

To check your installation, you can execute

.. code:: bash

    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`` and ``conda``).
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

.. code:: bash

    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.
These files contain 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 <https://github.com/cobyqa/cobyqa/issues>`_.
