A Python Library for Engineering Optimization Problems
Project description
enoppy-core
This library is a fork of the ENOPPY library, which was originally the largest Python library for real-world engineering optimization problems. It was refactored to work with the latest versions of Python and NumPy. It contains all the real-world engineering problems from CEC competitions and research papers.
- Free software: GNU General Public License (GPL) V3 license
- Total problems: > 50 problems
Installation
Install the current PyPI release:
$ pip install enoppy-core
Install from Github:
$ pip install git+https://github.com/ltsim/enoppy-core
After installation, you can import ENOPPY as any other Python module:
$ python
>>> import enoppy
>>> enoppy.__version__
Usage
This is a minimal usage example of the enoppy library.
- How to get the problem and use it
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:
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))
Acknowledgments
If you are using enoppy in your project, we would appreciate citations:
@software{nguyen_van_thieu_2023_7953207,
author = {Nguyen Van Thieu},
title = {ENOPPY: A Python Library for Engineering Optimization Problems},
year = 2023,
publisher = {Zenodo},
doi = {10.5281/zenodo.7953206},
url = {https://github.com/thieu1995/enoppy}
}
@article{van2023mealpy,
title={MEALPY: An open-source library for latest meta-heuristic algorithms in Python},
author={Van Thieu, Nguyen and Mirjalili, Seyedali},
journal={Journal of Systems Architecture},
year={2023},
publisher={Elsevier},
doi={10.1016/j.sysarc.2023.102871}
}
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enoppy_core-0.1.2.1.tar.gz.
File metadata
- Download URL: enoppy_core-0.1.2.1.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
277a5ba0094207a166cbdd6e028241a5c0e8db0a16965cb061ddaab6932ae988
|
|
| MD5 |
ea8e9752693b0dc8c40a6fde2ee210b0
|
|
| BLAKE2b-256 |
f91055c6cca5758b07317ee47094404378efe3fe805e70e53f76fdc9d1eb2dff
|
Provenance
The following attestation bundles were made for enoppy_core-0.1.2.1.tar.gz:
Publisher:
publish.yml on ltsim/enoppy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enoppy_core-0.1.2.1.tar.gz -
Subject digest:
277a5ba0094207a166cbdd6e028241a5c0e8db0a16965cb061ddaab6932ae988 - Sigstore transparency entry: 1496854574
- Sigstore integration time:
-
Permalink:
ltsim/enoppy-core@33bc60163216552ec15d543576b9a8df2b4d5251 -
Branch / Tag:
refs/tags/v0.1.2.1 - Owner: https://github.com/ltsim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33bc60163216552ec15d543576b9a8df2b4d5251 -
Trigger Event:
release
-
Statement type:
File details
Details for the file enoppy_core-0.1.2.1-py3-none-any.whl.
File metadata
- Download URL: enoppy_core-0.1.2.1-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a17e717663381c89cdf471d5f7cf6e162e19c85e1c2b1ced9c8d022477c4d32
|
|
| MD5 |
9040106df693669b9ba3d660c44229a2
|
|
| BLAKE2b-256 |
a2440098b1313c4928280ce7a1c410dd383e831b8b93f91a96eab7cc3140166d
|
Provenance
The following attestation bundles were made for enoppy_core-0.1.2.1-py3-none-any.whl:
Publisher:
publish.yml on ltsim/enoppy-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enoppy_core-0.1.2.1-py3-none-any.whl -
Subject digest:
8a17e717663381c89cdf471d5f7cf6e162e19c85e1c2b1ced9c8d022477c4d32 - Sigstore transparency entry: 1496854673
- Sigstore integration time:
-
Permalink:
ltsim/enoppy-core@33bc60163216552ec15d543576b9a8df2b4d5251 -
Branch / Tag:
refs/tags/v0.1.2.1 - Owner: https://github.com/ltsim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33bc60163216552ec15d543576b9a8df2b4d5251 -
Trigger Event:
release
-
Statement type: