{
"info": {
"author": "Mark E. Redd",
"author_email": "redddogjr@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License"
],
"description": "# Leap Frog Optimizer Package - Lite Edition\n\n- Author : Mark Redd\n- Email : redddogjr@gmail.com\n- GitHub : https://github.com/flythereddflagg\n- Website : http://www.r3eda.com/\n\n### About:\n\nThis package is based the \nLeapfrogging Optimization \nAlgorithm\npublished by \nDr. R. Russell Rhinehart.\n\nThe following publications explain the technique and may be found on the website:\n\n - Rhinehart, R. R., M. Su, and U. Manimegalai-Sridhar,\n \u201cLeapfrogging and Synoptic Leapfrogging: a new optimization approach\u201d,\n Computers & Chemical Engineering, Vol. 40, 11 May 2012, pp. 67-81.\n\n - Manimegalai-Sridhar, U., A. Govindarajan, and R. R. Rhinehart,\n \u201cImproved Initialization of Players in Leapfrogging Optimization\u201d,\n Computers & Chemical Engineering, Vol. 60, 2014, 426-429.\n\n - Rhinehart, R. R.,\n \u201cConvergence Criterion in Optimilsation of Stochastic Processes\u201d,\n Computers & Chemical Engineering, Vol. 68, 4 Sept 2014, pp 1-6.\n\nThis is the stripped down version of the package with minimal tools. It is written in pure Python to allow compatibility\nfor the alpha versions until the full version can be released.\n\n## Installation \n\nYou can install the lite versions via pip or using the setup.py script in the source code. Instructions are shown below.\n\n**System requirements for installation:**\n\n - Python >= 3.6\n - `numpy`\n - `scipy`\n - `nose`\n\n#### Via pip\n\nLpfgopt may be installed with pip using the following command:\n```bash\n$ pip install lpfgopt-lite # You may need root privileges or the --user tag\n```\n\nIf you wish to install locally with pip you may do the following:\n\n- Download the 'lite' branch and unzip the archive or clone it with git.\n\n- Open the main directory where \"setup.py\" is located and run the following command:\n\n ```bash\n $ pip install .\n ```\n\n#### Via setup.py\n\n- Download the 'lite' branch and unzip the archive or clone it with git.\n\n- Open the main directory where \"setup.py\" is located and run the following command:\n\n ```bash\n $ python setup.py install # You may need root priviliges or use the --user tag\n ```\n\nThe software should be installed correctly. You may validate the installation by executing the following commands:\n\n```python\n$ python\n>>> import lpfgopt\n>>> lpfgopt.__version__\n'X.X.X'\n>>> lpfgopt.minimize(lambda x: x[0]**2 + 10, [[-10, 10]])['x']\n[]\n>>>\n```\nIf the above commands produce the output congratulations! You have successfully installed the package!\n\n## Usage\nUse the `lpfgopt.minimize` function to solve optimization problems of the form:\n\n```\nminimize f(x)\nsubject to:\n\tg(x) <= 0\n\tbound[0][0] <= x[0] <= bound[0][1]\n\tbound[1][0] <= x[0] <= bound[1][1]\n\t...\n\tbound[n][0] <= x[0] <= bound[n][1]\n\nwhere n is the number of decsision variables and bound\nis a n X 2 list of lists or 2d numpy array with shape (n,2)\n```\n\n### `lpfgopt.minimize` documentation\n\n**lpfgopt.minimize(** *fun, bounds, args=(), points=20, fconstraint=None, discrete=[], maxit=10000, tol=1e-5, seedval=None, pointset=None, callback=None* **)**\n\n*General-use wrapper function to interface with the LeapFrog optimizer class.*\n*Contains the data and methods necessary to run a LeapFrog optimization.*\n*Accepts constraints, discrete variables and allows for a variety of options.*\n\n- **Parameters:** \n - **fun : callable** Objective function \n - **bounds : array-like, shape (n, 2)** Decision variable upper and lower bounds\n - **args : iterable** Other arguments to be passed \n into the function\n - **points : int** Point set size\n - **fconstraint : callable** Constraint function of the form g(x) <= 0\n - **discrete : array-like** List of indices that correspond to \n discrete variables. These variables\n will be constrained to integer values\n by truncating any randomly generated\n number (i.e. rounding down to the \n nearest integer absolute value)\n - **maxit : int** Maximum iterations\n - **tol : float** Convergence tolerance\n - **seedval : int** Random seed\n - **pointset : array-like, shape (m, n)** Starting point set\n - **callback : callable** Function to be called after each iteration\n\n- **Returns:**\n\n - **solution : dict** A dictionary containing the results of the optimization.\n The members of the solution are listed below.\n - **x : list** \n The solution vector or the vector of \n decision variables that produced the lowest \n objective function value\n\n - **success : bool**\n Whether or not the optimizer exited successfully.\n\n - **status : int**\n Termination status of the optimizer. Its value \n depends on the underlying solver. Refer to \n message for details.\n\n - **message : string**\n Description of the cause of the termination.\n\n - **fun: float**\n The objective function value at 'x'\n\n - **nfev : int**\n The number of function evaluations of the objective\n function\n\n - **nit : int**\n The number of iterations performed\n\n - **maxcv : float**\n The maximum constraint violation evaluated during\n optimization\n\n - **best : list** \n The member of the population that had the lowest\n objective value in the point set having the form\n [f(x), x[0], x[1], ..., x[n-1]]\n\n - **worst : list**\n The member of the population that had the highest\n objective value in the point set having the form\n [f(x), x[0], x[1], ..., x[n-1]]\n\n - **final_error : float**\n The optimization convergence value upon termination\n\n - **pointset : list, shape(m, n)** The entire point set state upon termination having \n the form:\n\n ```\n [\n [f(x[0]), x[0][0], x[0][1], ..., x[0][n-1]],\n [f(x[1]), x[1][0], x[1][1], ..., x[1][n-1]],\n ...,\n [f(x[m-1]), x[m-1][0], x[m-1][1], ..., x[m-1][n-1]]\n ]\n ```\n\n where n is the number of decision variables and m \n is the number of points in the search population.\n\n\n#### Example Usage\nThe following is a simple optimization where the minimum value of the following equation is found: \n - $f(x) = x^2+y^2$\n - Subject to: $g(x) = -x^2 - y + 10 \\le 0$ **or** g(x) = -x^2 - y + 10 <= 0\n```python\n# test_lpfgopt.py\nfrom lpfgopt import minimize\nimport matplotlib.pyplot as plt\n\n# set up the objective funciton, \n# constraint fuction and bounds\nf = lambda x: sum([i**2 for i in x])\ng = lambda x: -x[0]**2 + 10 - x[1] \nbounds = [[-5,5] for i in range(2)]\n\n# run the optimization\nsol = minimize(f, bounds, fconstraint=g)['x']\nprint(f\"Solution is: {sol}\")\n\n# plot the results on a contour plot\ngg = lambda x: -x**2 + 10 # for plotting purposes\n\nplt.figure(figsize=(8,8))\nx, y = np.linspace(-5,5,1000), np.linspace(-5,5,1000)\nX, Y = np.meshgrid(x,y)\nZ = f([X,Y])\n\nplt.contourf(X,Y,Z)\nplt.plot(x, gg(x), \"r\", label=\"constraint\")\nplt.plot(*sol, 'x', \n markersize=14, \n markeredgewidth=4, \n color=\"lime\", \n label=\"optimum\")\nplt.ylim(-5,5)\nplt.xlim(-5,5)\nplt.legend()\nplt.show()\n```\nThis code will produce the following output:\n```bash\nSolution is: [-3.0958051486911997, 0.4159905027317925]\n```\nAs well as a plot that should look similar to the following image:\n\n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "https://github.com/flythereddflagg/lpfgopt",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://www.r3eda.com/",
"keywords": "optimization direct-search gradient-free",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "lpfgopt-lite",
"package_url": "https://pypi.org/project/lpfgopt-lite/",
"platform": "",
"project_url": "https://pypi.org/project/lpfgopt-lite/",
"project_urls": {
"Download": "https://github.com/flythereddflagg/lpfgopt",
"Homepage": "http://www.r3eda.com/"
},
"release_url": "https://pypi.org/project/lpfgopt-lite/0.9.2/",
"requires_dist": [
"nose",
"numpy",
"scipy"
],
"requires_python": ">=3.6",
"summary": "Leap Frog Optimizer - Lite Edition",
"version": "0.9.2"
},
"last_serial": 5194755,
"releases": {
"0.7.2": [
{
"comment_text": "",
"digests": {
"md5": "089964d596bde7012c00734aad4f9263",
"sha256": "d91821bea798ea2f07f39550e7bb9c74d8322dce1f7be93bdaae6ea74b58dc36"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.7.2.tar.gz",
"has_sig": false,
"md5_digest": "089964d596bde7012c00734aad4f9263",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7589,
"upload_time": "2018-04-07T23:42:51",
"url": "https://files.pythonhosted.org/packages/32/0d/ec8824e25567de8de8314c544787992817f21618fcaa677b350c20b2486e/lpfgopt-lite-0.7.2.tar.gz"
}
],
"0.7.3": [
{
"comment_text": "",
"digests": {
"md5": "724c6f4df3ac29999fb18de649e6e9e0",
"sha256": "fcad344812a93ad3335dcb5727d61c7951e1fc3742932638b8a07cbb83aa7552"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.7.3-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "724c6f4df3ac29999fb18de649e6e9e0",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 17799,
"upload_time": "2018-05-14T23:32:23",
"url": "https://files.pythonhosted.org/packages/8a/d8/78c8b6b0d37add6328b626a3455033dd2e044506992c6d58fb98b8ac27e2/lpfgopt_lite-0.7.3-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "f0e49f906eb88359ef9e6739063b20ba",
"sha256": "776987c40da16e2fe758f15fa0cd9c06a86ef0bf59c1c9f657c05d4eb67b7f6b"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "f0e49f906eb88359ef9e6739063b20ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11336,
"upload_time": "2018-05-14T23:32:24",
"url": "https://files.pythonhosted.org/packages/ba/cc/2daaa298ba6e41b9bc3a3be15d9bcf042e36ba1f8e9ebaa1e08a9bf3f169/lpfgopt-lite-0.7.3.tar.gz"
}
],
"0.7.4": [
{
"comment_text": "",
"digests": {
"md5": "cf0c7d52e4e57d7bb6d7cc958c7b81df",
"sha256": "28d97655b1ad90cf699489f275e051ecc2185ecd75d1ef5c85aef18414424427"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.7.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf0c7d52e4e57d7bb6d7cc958c7b81df",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 17478,
"upload_time": "2018-05-17T01:48:42",
"url": "https://files.pythonhosted.org/packages/4f/5b/86df3209942aba6e77567898bbb47d7d7944b4481d2c876e54efd8665812/lpfgopt_lite-0.7.4-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "e022fd92727071a3f849a2ddcde516fe",
"sha256": "14e02317654a5ec5759601687b22d5b6da523a2d09d8825b7a79b390da58467a"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.7.4.tar.gz",
"has_sig": false,
"md5_digest": "e022fd92727071a3f849a2ddcde516fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11264,
"upload_time": "2018-05-17T01:48:44",
"url": "https://files.pythonhosted.org/packages/86/60/7d105c1054764c4001545cb3cd5b38a1a2d36eb3a0a8259ed704b3669298/lpfgopt-lite-0.7.4.tar.gz"
}
],
"0.9.0": [
{
"comment_text": "",
"digests": {
"md5": "a9ac367d166915c21390f2c5705237fb",
"sha256": "ec3ba193fd987371566dd740cdd426651049ea114721e5c804e7dbea91f68b24"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "a9ac367d166915c21390f2c5705237fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 12008,
"upload_time": "2019-04-26T20:15:54",
"url": "https://files.pythonhosted.org/packages/ea/05/963033c3ade5cbbde5e04db03250c341ea40acdd9b8ea71b3a7208050566/lpfgopt-lite-0.9.0.tar.gz"
}
],
"0.9.1": [
{
"comment_text": "",
"digests": {
"md5": "8ef0c0dd1ff6cffcf8f5882a5d6ae3bd",
"sha256": "0aa13750e0e52393f25d5e5e8bcc12642ee7325d7ed15b7260fc586243c612c9"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.9.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8ef0c0dd1ff6cffcf8f5882a5d6ae3bd",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 11923,
"upload_time": "2019-04-26T20:23:38",
"url": "https://files.pythonhosted.org/packages/cc/c2/f9260698ce1bbee1039f2847d9c6c8cb0bd5df14bd1148bb7e283aadb9f3/lpfgopt_lite-0.9.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "1c5d44ba8a86e0b6e77e886e77cde784",
"sha256": "a2875738b04fd2b3c793d14218e899d4bd6273b71efb055204f9c5316c6cc8ad"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.9.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c5d44ba8a86e0b6e77e886e77cde784",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11920,
"upload_time": "2019-04-26T20:23:40",
"url": "https://files.pythonhosted.org/packages/56/8e/79e0d35ed8c5d8173d8a267f4612c82ae1e69507085bb7c7ea3a5b24e503/lpfgopt_lite-0.9.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "10f68da4578d315fc7e9e18cfc2b4894",
"sha256": "e14743a9f8df5de65865905b4883cdca408e7922130f6e7d1f1a8f3b91ab1ecc"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.9.1.tar.gz",
"has_sig": false,
"md5_digest": "10f68da4578d315fc7e9e18cfc2b4894",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11943,
"upload_time": "2019-04-26T20:23:42",
"url": "https://files.pythonhosted.org/packages/fe/b1/797e2fa95d3559639f91b8ea2ff274b7935e8e2be8fff78f172c0635ef7f/lpfgopt-lite-0.9.1.tar.gz"
}
],
"0.9.2": [
{
"comment_text": "",
"digests": {
"md5": "ac7a7992cba5cba8779abe8fc84e3889",
"sha256": "fa317eadd7e1bbe71d235bf8cd6884574a9952ca9c36367f5cd919dde32a62d5"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.9.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac7a7992cba5cba8779abe8fc84e3889",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 11925,
"upload_time": "2019-04-26T20:26:26",
"url": "https://files.pythonhosted.org/packages/01/08/a18067cf7802e5660712453ff2d7d8844c82a8b0d024a42b1c7c590452c1/lpfgopt_lite-0.9.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "502e8d7605351bcd3c61d9d6e25b6134",
"sha256": "750ffc9d7dd704ffc873dd9a44c811d6481557580ee4fe7932acd74098f58cbd"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.9.2.tar.gz",
"has_sig": false,
"md5_digest": "502e8d7605351bcd3c61d9d6e25b6134",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 60470,
"upload_time": "2019-04-26T20:26:30",
"url": "https://files.pythonhosted.org/packages/32/71/f5c486da42541caa8ebd14d51643a8f1e7ca69e99ccd29b497c1223911bb/lpfgopt-lite-0.9.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ac7a7992cba5cba8779abe8fc84e3889",
"sha256": "fa317eadd7e1bbe71d235bf8cd6884574a9952ca9c36367f5cd919dde32a62d5"
},
"downloads": -1,
"filename": "lpfgopt_lite-0.9.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac7a7992cba5cba8779abe8fc84e3889",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 11925,
"upload_time": "2019-04-26T20:26:26",
"url": "https://files.pythonhosted.org/packages/01/08/a18067cf7802e5660712453ff2d7d8844c82a8b0d024a42b1c7c590452c1/lpfgopt_lite-0.9.2-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "502e8d7605351bcd3c61d9d6e25b6134",
"sha256": "750ffc9d7dd704ffc873dd9a44c811d6481557580ee4fe7932acd74098f58cbd"
},
"downloads": -1,
"filename": "lpfgopt-lite-0.9.2.tar.gz",
"has_sig": false,
"md5_digest": "502e8d7605351bcd3c61d9d6e25b6134",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 60470,
"upload_time": "2019-04-26T20:26:30",
"url": "https://files.pythonhosted.org/packages/32/71/f5c486da42541caa8ebd14d51643a8f1e7ca69e99ccd29b497c1223911bb/lpfgopt-lite-0.9.2.tar.gz"
}
]
}