.. image:: https://travis-ci.org/Stefan-Endres/shgo.svg?branch=master
:target: https://travis-ci.org/Stefan-Endres/shgo
.. image:: https://coveralls.io/repos/github/Stefan-Endres/shgo/badge.png?branch=master
:target: https://coveralls.io/github/Stefan-Endres/shgo?branch=master
Repository: https://github.com/Stefan-Endres/shgo
Description
-----------
Finds the global minimum of a function using simplicial homology global
optimisation (shgo_). Appropriate for solving general purpose NLP and blackbox
optimisation problems to global optimality (low dimensional problems).
The general form of an optimisation problem is given by:
.. _shgo: https://stefan-endres.github.io/shgo/
::
minimize f(x) subject to
g_i(x) >= 0, i = 1,...,m
h_j(x) = 0, j = 1,...,p
where x is a vector of one or more variables. ``f(x)`` is the objective
function ``R^n -> R``, ``g_i(x)`` are the inequality constraints.
``h_j(x)`` are the equality constrains.
Installation
------------
Stable:
.. code::
$ pip install shgo
Latest:
.. code::
$ git clone https://github.com/Stefan-Endres/shgo
$ cd shgo
$ python setup.py install
$ python setup.py test
Documentation
-------------
The project website https://stefan-endres.github.io/shgo/ contains more detailed examples, notes and performance profiles.
Quick example
-------------
Consider the problem of minimizing the Rosenbrock function. This function is implemented in ``rosen`` in ``scipy.optimize``
.. code:: python
>>> from scipy.optimize import rosen
>>> from shgo import shgo
>>> bounds = [(0,2), (0, 2), (0, 2), (0, 2), (0, 2)]
>>> result = shgo(rosen, bounds)
>>> result.x, result.fun
(array([ 1., 1., 1., 1., 1.]), 2.9203923741900809e-18)
Note that bounds determine the dimensionality of the objective function and is therefore a required input, however you can specify empty bounds using ``None`` or objects like numpy.inf which will be converted to large float numbers.
Raw data
{
"_id": null,
"home_page": "https://github.com/stefan-endres/shgo",
"name": "shgo",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "optimization",
"author": "Stefan Endres, Carl Sandrock",
"author_email": "stefan.c.endres@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/08/07/98b414fc0e790b58057ed5f3de0ee1c44392247876b6a514af267d035b3f/shgo-1.0.0.tar.gz",
"platform": null,
"description": ".. image:: https://travis-ci.org/Stefan-Endres/shgo.svg?branch=master\n :target: https://travis-ci.org/Stefan-Endres/shgo\n.. image:: https://coveralls.io/repos/github/Stefan-Endres/shgo/badge.png?branch=master\n :target: https://coveralls.io/github/Stefan-Endres/shgo?branch=master\n\nRepository: https://github.com/Stefan-Endres/shgo\n\nDescription\n-----------\n\nFinds the global minimum of a function using simplicial homology global\noptimisation (shgo_). Appropriate for solving general purpose NLP and blackbox\noptimisation problems to global optimality (low dimensional problems).\nThe general form of an optimisation problem is given by:\n\n.. _shgo: https://stefan-endres.github.io/shgo/\n\n::\n\n minimize f(x) subject to\n\n g_i(x) >= 0, i = 1,...,m\n h_j(x) = 0, j = 1,...,p\n\nwhere x is a vector of one or more variables. ``f(x)`` is the objective\nfunction ``R^n -> R``, ``g_i(x)`` are the inequality constraints.\n``h_j(x)`` are the equality constrains.\n\n\nInstallation\n------------\nStable:\n\n.. code::\n\n $ pip install shgo\n \nLatest:\n\n.. code::\n\n $ git clone https://github.com/Stefan-Endres/shgo\n $ cd shgo\n $ python setup.py install\n $ python setup.py test\n\nDocumentation\n-------------\nThe project website https://stefan-endres.github.io/shgo/ contains more detailed examples, notes and performance profiles.\n\nQuick example\n-------------\n\nConsider the problem of minimizing the Rosenbrock function. This function is implemented in ``rosen`` in ``scipy.optimize``\n\n.. code:: python\n\n >>> from scipy.optimize import rosen\n >>> from shgo import shgo\n >>> bounds = [(0,2), (0, 2), (0, 2), (0, 2), (0, 2)]\n >>> result = shgo(rosen, bounds)\n >>> result.x, result.fun\n (array([ 1., 1., 1., 1., 1.]), 2.9203923741900809e-18)\n\nNote that bounds determine the dimensionality of the objective function and is therefore a required input, however you can specify empty bounds using ``None`` or objects like numpy.inf which will be converted to large float numbers.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simplicial homology global optimisation",
"version": "1.0.0",
"split_keywords": [
"optimization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3450e9703dafc0ec5f5032f13d79fd37cbfe6e4d80fb279431b026b0ca7845d0",
"md5": "5d887f84db80d7c1a52e4914d996cac0",
"sha256": "4daad1f6c781aa20c6efb14bcb51f15a16797cb5e2c47cf9fa2b2c5cee0dbd03"
},
"downloads": -1,
"filename": "shgo-1.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d887f84db80d7c1a52e4914d996cac0",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 666964,
"upload_time": "2023-04-21T10:27:58",
"upload_time_iso_8601": "2023-04-21T10:27:58.446381Z",
"url": "https://files.pythonhosted.org/packages/34/50/e9703dafc0ec5f5032f13d79fd37cbfe6e4d80fb279431b026b0ca7845d0/shgo-1.0.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "080798b414fc0e790b58057ed5f3de0ee1c44392247876b6a514af267d035b3f",
"md5": "b9168fc6d4038f83d6767c61c21ad1fe",
"sha256": "c40ed46be204ebeb71287eadcb61c4ee91c4dd73ea0ff5fa300d022f213d76d0"
},
"downloads": -1,
"filename": "shgo-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b9168fc6d4038f83d6767c61c21ad1fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 348340,
"upload_time": "2023-04-21T10:28:05",
"upload_time_iso_8601": "2023-04-21T10:28:05.389222Z",
"url": "https://files.pythonhosted.org/packages/08/07/98b414fc0e790b58057ed5f3de0ee1c44392247876b6a514af267d035b3f/shgo-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-21 10:28:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "stefan-endres",
"github_project": "shgo",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"lcname": "shgo"
}