enoppy


Nameenoppy JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/thieu1995/enoppy
SummaryENOPPY: A Python Library for Engineering Optimization Problems
upload_time2023-05-20 17:10:24
maintainer
docs_urlNone
authorThieu
requires_python>=3.7
licenseGPLv3
keywords engineering optimization problems mathematical optimization tension/compression spring design problem welded beam design problem industrial chemical process problems process design and synthesis problems mechanical design problems power system problems power electronics: synchronous optimal pulse-width modulation livestock feed ration optimization rolling element bearing design problem multi-objectives optimization problems constrained optimization stochastic optimization global optimization convergence analysis search space exploration local search computational intelligence robust optimization benchmark functions performance analysis self-adaptation intelligent optimization simulations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<p align="center"><img src=".github/img/logo.png" alt="ENOPPY" title="ENOPPY"/></p>

---


[![GitHub release](https://img.shields.io/badge/release-0.1.1-yellow.svg)](https://github.com/thieu1995/enoppy/releases)
[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/enoppy) 
[![PyPI version](https://badge.fury.io/py/enoppy.svg)](https://badge.fury.io/py/enoppy)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/enoppy.svg)
![PyPI - Status](https://img.shields.io/pypi/status/enoppy.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/enoppy.svg)
[![Downloads](https://pepy.tech/badge/enoppy)](https://pepy.tech/project/enoppy)
[![Tests & Publishes to PyPI](https://github.com/thieu1995/enoppy/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/enoppy/actions/workflows/publish-package.yaml)
![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/enoppy.svg)
[![Documentation Status](https://readthedocs.org/projects/enoppy/badge/?version=latest)](https://enoppy.readthedocs.io/en/latest/?badge=latest)
[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/thieu1995/enoppy.svg)](http://isitmaintained.com/project/thieu1995/enoppy "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/thieu1995/enoppy.svg)](http://isitmaintained.com/project/thieu1995/enoppy "Percentage of issues still open")
![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/enoppy.svg)
[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7953206.svg)](https://doi.org/10.5281/zenodo.7953206)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)


ENOPPY (ENgineering Optimization Problems in PYthon) is the largest python library for real-world engineering 
optimization problems. Contains all real-world engineering problems from CEC competitions and research papers.

* **Free software:** GNU General Public License (GPL) V3 license
* **Total problems**: > 50 problems
* **Documentation:** https://enoppy.readthedocs.io/en/latest/
* **Python versions:** 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x
* **Dependencies:** numpy, scipy, matplotlib




# Installation

### Install with pip

Install the [current PyPI release](https://pypi.python.org/pypi/enoppy):
```sh 
$ pip install enoppy==0.1.0
```

### Install directly from source code
```sh 
$ git clone https://github.com/thieu1995/enoppy.git
$ cd enoppy
$ python setup.py install
```


### Lib's structure

```code 
docs
examples
enoppy
    paper_based
        pdo_2022.py
        rwco_2020.py
    problem_based
        chemical.py
        mechanism.py
    utils
        validator.py
        visualize.py
    __init__.py
    engineer.py
README.md
setup.py
```


# Usage

After installation, you can import ENOPPY as any other Python module:

```sh
$ python
>>> import enoppy
>>> enoppy.__version__
```

Let's go through some examples.


### Examples

How to get the problem and use it

```python
from enoppy.paper_based.moeosma_2023 import SpeedReducerProblem
# SRP = SpeedReducerProblem
# SP = SpringProblem
# HTBP = HydrostaticThrustBearingProblem
# VPP = VibratingPlatformProblem
# CSP = CarSideImpactProblem
# WRMP = WaterResourceManagementProblem
# BCP = BulkCarriersProblem
# MPBPP = MultiProductBatchPlantProblem

srp_prob = SpeedReducerProblem()
print("Lower bound for this problem: ", srp_prob.lb)
print("Upper bound for this problem: ", srp_prob.ub)
x0 = srp_prob.create_solution()
print("Get the objective values of x0: ", srp_prob.get_objs(x0))
print("Get the constraint values of x0: ", srp_prob.get_cons(x0))
print("Evaluate with default penalty function: ", srp_prob.evaluate(x0))

```

Design my own penalty function:

```python
import numpy as np
from enoppy.paper_based.moeosma_2023 import HTBP
# HTBP = HydrostaticThrustBearingProblem

def penalty_func(list_objectives, list_constraints):
    list_constraints[list_constraints < 0] = 0
    return np.sum(list_objectives) + 1e5 * np.sum(list_constraints**2) 

htbp_prob = HTBP(f_penalty=penalty_func)
print("Lower bound for this problem: ", htbp_prob.lb)
print("Upper bound for this problem: ", htbp_prob.ub)
x0 = htbp_prob.create_solution()
print("Get the objective values of x0: ", htbp_prob.get_objs(x0))
print("Get the constraint values of x0: ", htbp_prob.get_cons(x0))
print("Evaluate with default penalty function: ", htbp_prob.evaluate(x0))
```

For more usage examples please look at [examples](/examples) folder.



# Get helps (questions, problems)

* Official source code repo: https://github.com/thieu1995/enoppy
* Official document: https://enoppy.readthedocs.io/
* Download releases: https://pypi.org/project/enoppy/
* Issue tracker: https://github.com/thieu1995/enoppy/issues
* Notable changes log: https://github.com/thieu1995/enoppy/blob/master/ChangeLog.md
* Examples with different meapy version: https://github.com/thieu1995/enoppy/blob/master/examples.md

* This project also related to our another projects which are "meta-heuristics", "neural-network", and "optimization" 
  check it here
    * https://github.com/thieu1995/mealpy
    * https://github.com/thieu1995/metaheuristics
    * https://github.com/thieu1995/opfunu
    * https://github.com/thieu1995/permetrics
    * https://github.com/aiir-team


**Want to have an instant assistant? Join our telegram community at [link](https://t.me/+fRVCJGuGJg1mNDg1)**
We share lots of information, questions, and answers there. You will get more support and knowledge there.


## Cite Us

If you are using enoppy in your project, we would appreciate citations:

```code 
@software{nguyen_van_thieu_2023_7953207,
  author       = {Nguyen Van Thieu},
  title        = {ENOPPY: A Python Library for Engineering Optimization Problems},
  month        = may,
  year         = 2023,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.7953206},
  url          = {https://github.com/thieu1995/enoppy}
}
```


## References 


#### paper_based


* **ihaoavoa_2022**: Xiao, Y., Guo, Y., Cui, H., Wang, Y., Li, J., & Zhang, Y. (2022). IHAOAVOA: An improved hybrid aquila optimizer and African vultures optimization algorithm for global optimization problems. Mathematical Biosciences and Engineering, 19(11), 10963-11017.

* **moeosma_2023**: Luo, Q., Yin, S., Zhou, G., Meng, W., Zhao, Y., & Zhou, Y. (2023). Multi-objective equilibrium optimizer slime mould algorithm and its application in solving engineering problems. Structural and Multidisciplinary Optimization, 66(5), 114.

* **pdo_2022**: Ezugwu, A. E., Agushaka, J. O., Abualigah, L., Mirjalili, S., & Gandomi, A. H. (2022). Prairie dog optimization algorithm. Neural Computing and Applications, 34(22), 20017-20065.

* **rwco_2020**: Kumar, A., Wu, G., Ali, M. Z., Mallipeddi, R., Suganthan, P. N., & Das, S. (2020). A test-suite of non-convex constrained optimization problems from the real-world and some baseline results. Swarm and Evolutionary Computation, 56, 100693.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thieu1995/enoppy",
    "name": "enoppy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "engineering optimization problems,mathematical optimization,Tension/compression spring design problem,Welded beam design problem,Industrial chemical process problems,Process design and synthesis problems,Mechanical design problems,Power system problems,Power electronics: synchronous optimal pulse-width modulation,Livestock feed ration optimization,Rolling element bearing design problem,multi-objectives optimization problems,Constrained optimization,Stochastic optimization,Global optimization,Convergence analysis,Search space exploration,Local search,Computational intelligence,Robust optimization,Benchmark functions,Performance analysis,Self-adaptation,Intelligent optimization,Simulations",
    "author": "Thieu",
    "author_email": "nguyenthieu2102@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/1c/b7ab7867b3c019260d6da05c99d94e7bb065745ad5017786b304fff2a16f/enoppy-0.1.1.tar.gz",
    "platform": null,
    "description": "\n<p align=\"center\"><img src=\".github/img/logo.png\" alt=\"ENOPPY\" title=\"ENOPPY\"/></p>\n\n---\n\n\n[![GitHub release](https://img.shields.io/badge/release-0.1.1-yellow.svg)](https://github.com/thieu1995/enoppy/releases)\n[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/enoppy) \n[![PyPI version](https://badge.fury.io/py/enoppy.svg)](https://badge.fury.io/py/enoppy)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/enoppy.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/enoppy.svg)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/enoppy.svg)\n[![Downloads](https://pepy.tech/badge/enoppy)](https://pepy.tech/project/enoppy)\n[![Tests & Publishes to PyPI](https://github.com/thieu1995/enoppy/actions/workflows/publish-package.yaml/badge.svg)](https://github.com/thieu1995/enoppy/actions/workflows/publish-package.yaml)\n![GitHub Release Date](https://img.shields.io/github/release-date/thieu1995/enoppy.svg)\n[![Documentation Status](https://readthedocs.org/projects/enoppy/badge/?version=latest)](https://enoppy.readthedocs.io/en/latest/?badge=latest)\n[![Chat](https://img.shields.io/badge/Chat-on%20Telegram-blue)](https://t.me/+fRVCJGuGJg1mNDg1)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/thieu1995/enoppy.svg)](http://isitmaintained.com/project/thieu1995/enoppy \"Average time to resolve an issue\")\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/thieu1995/enoppy.svg)](http://isitmaintained.com/project/thieu1995/enoppy \"Percentage of issues still open\")\n![GitHub contributors](https://img.shields.io/github/contributors/thieu1995/enoppy.svg)\n[![GitTutorial](https://img.shields.io/badge/PR-Welcome-%23FF8300.svg?)](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7953206.svg)](https://doi.org/10.5281/zenodo.7953206)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\nENOPPY (ENgineering Optimization Problems in PYthon) is the largest python library for real-world engineering \noptimization problems. Contains all real-world engineering problems from CEC competitions and research papers.\n\n* **Free software:** GNU General Public License (GPL) V3 license\n* **Total problems**: > 50 problems\n* **Documentation:** https://enoppy.readthedocs.io/en/latest/\n* **Python versions:** 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x\n* **Dependencies:** numpy, scipy, matplotlib\n\n\n\n\n# Installation\n\n### Install with pip\n\nInstall the [current PyPI release](https://pypi.python.org/pypi/enoppy):\n```sh \n$ pip install enoppy==0.1.0\n```\n\n### Install directly from source code\n```sh \n$ git clone https://github.com/thieu1995/enoppy.git\n$ cd enoppy\n$ python setup.py install\n```\n\n\n### Lib's structure\n\n```code \ndocs\nexamples\nenoppy\n    paper_based\n        pdo_2022.py\n        rwco_2020.py\n    problem_based\n        chemical.py\n        mechanism.py\n    utils\n        validator.py\n        visualize.py\n    __init__.py\n    engineer.py\nREADME.md\nsetup.py\n```\n\n\n# Usage\n\nAfter installation, you can import ENOPPY as any other Python module:\n\n```sh\n$ python\n>>> import enoppy\n>>> enoppy.__version__\n```\n\nLet's go through some examples.\n\n\n### Examples\n\nHow to get the problem and use it\n\n```python\nfrom enoppy.paper_based.moeosma_2023 import SpeedReducerProblem\n# SRP = SpeedReducerProblem\n# SP = SpringProblem\n# HTBP = HydrostaticThrustBearingProblem\n# VPP = VibratingPlatformProblem\n# CSP = CarSideImpactProblem\n# WRMP = WaterResourceManagementProblem\n# BCP = BulkCarriersProblem\n# MPBPP = MultiProductBatchPlantProblem\n\nsrp_prob = SpeedReducerProblem()\nprint(\"Lower bound for this problem: \", srp_prob.lb)\nprint(\"Upper bound for this problem: \", srp_prob.ub)\nx0 = srp_prob.create_solution()\nprint(\"Get the objective values of x0: \", srp_prob.get_objs(x0))\nprint(\"Get the constraint values of x0: \", srp_prob.get_cons(x0))\nprint(\"Evaluate with default penalty function: \", srp_prob.evaluate(x0))\n\n```\n\nDesign my own penalty function:\n\n```python\nimport numpy as np\nfrom enoppy.paper_based.moeosma_2023 import HTBP\n# HTBP = HydrostaticThrustBearingProblem\n\ndef penalty_func(list_objectives, list_constraints):\n    list_constraints[list_constraints < 0] = 0\n    return np.sum(list_objectives) + 1e5 * np.sum(list_constraints**2) \n\nhtbp_prob = HTBP(f_penalty=penalty_func)\nprint(\"Lower bound for this problem: \", htbp_prob.lb)\nprint(\"Upper bound for this problem: \", htbp_prob.ub)\nx0 = htbp_prob.create_solution()\nprint(\"Get the objective values of x0: \", htbp_prob.get_objs(x0))\nprint(\"Get the constraint values of x0: \", htbp_prob.get_cons(x0))\nprint(\"Evaluate with default penalty function: \", htbp_prob.evaluate(x0))\n```\n\nFor more usage examples please look at [examples](/examples) folder.\n\n\n\n# Get helps (questions, problems)\n\n* Official source code repo: https://github.com/thieu1995/enoppy\n* Official document: https://enoppy.readthedocs.io/\n* Download releases: https://pypi.org/project/enoppy/\n* Issue tracker: https://github.com/thieu1995/enoppy/issues\n* Notable changes log: https://github.com/thieu1995/enoppy/blob/master/ChangeLog.md\n* Examples with different meapy version: https://github.com/thieu1995/enoppy/blob/master/examples.md\n\n* This project also related to our another projects which are \"meta-heuristics\", \"neural-network\", and \"optimization\" \n  check it here\n    * https://github.com/thieu1995/mealpy\n    * https://github.com/thieu1995/metaheuristics\n    * https://github.com/thieu1995/opfunu\n    * https://github.com/thieu1995/permetrics\n    * https://github.com/aiir-team\n\n\n**Want to have an instant assistant? Join our telegram community at [link](https://t.me/+fRVCJGuGJg1mNDg1)**\nWe share lots of information, questions, and answers there. You will get more support and knowledge there.\n\n\n## Cite Us\n\nIf you are using enoppy in your project, we would appreciate citations:\n\n```code \n@software{nguyen_van_thieu_2023_7953207,\n  author       = {Nguyen Van Thieu},\n  title        = {ENOPPY: A Python Library for Engineering Optimization Problems},\n  month        = may,\n  year         = 2023,\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.7953206},\n  url          = {https://github.com/thieu1995/enoppy}\n}\n```\n\n\n## References \n\n\n#### paper_based\n\n\n* **ihaoavoa_2022**: Xiao, Y., Guo, Y., Cui, H., Wang, Y., Li, J., & Zhang, Y. (2022). IHAOAVOA: An improved hybrid aquila optimizer and African vultures optimization algorithm for global optimization problems. Mathematical Biosciences and Engineering, 19(11), 10963-11017.\n\n* **moeosma_2023**: Luo, Q., Yin, S., Zhou, G., Meng, W., Zhao, Y., & Zhou, Y. (2023). Multi-objective equilibrium optimizer slime mould algorithm and its application in solving engineering problems. Structural and Multidisciplinary Optimization, 66(5), 114.\n\n* **pdo_2022**: Ezugwu, A. E., Agushaka, J. O., Abualigah, L., Mirjalili, S., & Gandomi, A. H. (2022). Prairie dog optimization algorithm. Neural Computing and Applications, 34(22), 20017-20065.\n\n* **rwco_2020**: Kumar, A., Wu, G., Ali, M. Z., Mallipeddi, R., Suganthan, P. N., & Das, S. (2020). A test-suite of non-convex constrained optimization problems from the real-world and some baseline results. Swarm and Evolutionary Computation, 56, 100693.\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "ENOPPY: A Python Library for Engineering Optimization Problems",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/thieu1995/enoppy/issues",
        "Change Log": "https://github.com/thieu1995/enoppy/blob/master/ChangeLog.md",
        "Documentation": "https://enoppy.readthedocs.io/",
        "Forum": "https://t.me/+fRVCJGuGJg1mNDg1",
        "Homepage": "https://github.com/thieu1995/enoppy",
        "Source Code": "https://github.com/thieu1995/enoppy"
    },
    "split_keywords": [
        "engineering optimization problems",
        "mathematical optimization",
        "tension/compression spring design problem",
        "welded beam design problem",
        "industrial chemical process problems",
        "process design and synthesis problems",
        "mechanical design problems",
        "power system problems",
        "power electronics: synchronous optimal pulse-width modulation",
        "livestock feed ration optimization",
        "rolling element bearing design problem",
        "multi-objectives optimization problems",
        "constrained optimization",
        "stochastic optimization",
        "global optimization",
        "convergence analysis",
        "search space exploration",
        "local search",
        "computational intelligence",
        "robust optimization",
        "benchmark functions",
        "performance analysis",
        "self-adaptation",
        "intelligent optimization",
        "simulations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7bc2d5156377280df1b0178e52b3ae615b565949ec63705ba289bf2977f546f",
                "md5": "6514c090fb94426bbdc74726e92972ba",
                "sha256": "b3d66709bde98552f50d0944b63dd39fa025df7c1857c051b3d277854d7e9050"
            },
            "downloads": -1,
            "filename": "enoppy-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6514c090fb94426bbdc74726e92972ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 41821,
            "upload_time": "2023-05-20T17:10:22",
            "upload_time_iso_8601": "2023-05-20T17:10:22.864380Z",
            "url": "https://files.pythonhosted.org/packages/c7/bc/2d5156377280df1b0178e52b3ae615b565949ec63705ba289bf2977f546f/enoppy-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d1cb7ab7867b3c019260d6da05c99d94e7bb065745ad5017786b304fff2a16f",
                "md5": "c697bbd2f794b6e843f109f74fbdfb3f",
                "sha256": "b72152755d5ae5032394bfdfbcff4b0926e4c21fce4ecd3454e25017a1cafbeb"
            },
            "downloads": -1,
            "filename": "enoppy-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c697bbd2f794b6e843f109f74fbdfb3f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 43257,
            "upload_time": "2023-05-20T17:10:24",
            "upload_time_iso_8601": "2023-05-20T17:10:24.541286Z",
            "url": "https://files.pythonhosted.org/packages/3d/1c/b7ab7867b3c019260d6da05c99d94e7bb065745ad5017786b304fff2a16f/enoppy-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-20 17:10:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thieu1995",
    "github_project": "enoppy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "enoppy"
}
        
Elapsed time: 0.09065s