All Projects → thieu1995 → opfunu

thieu1995 / opfunu

Licence: MIT license
A collection of Benchmark functions for numerical optimization problems (https://opfunu.readthedocs.io)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to opfunu

Deep-Learning-Optimization-Algorithms
Visualization of various deep learning optimization algorithms using PyTorch automatic differentiation and optimizers.
Stars: ✭ 47 (+51.61%)
Mutual labels:  convex-optimization, non-convex-optimization
bio ik
MoveIt kinematics_base plugin based on particle optimization & GA
Stars: ✭ 104 (+235.48%)
Mutual labels:  convex-optimization, non-convex-optimization
awesome-nn-optimization
Awesome list for Neural Network Optimization methods.
Stars: ✭ 39 (+25.81%)
Mutual labels:  convex-optimization, non-convex-optimization
Harris-Hawks-Optimization-Algorithm-and-Applications
Source codes for HHO paper: Harris hawks optimization: Algorithm and applications: https://www.sciencedirect.com/science/article/pii/S0167739X18313530. In this paper, a novel population-based, nature-inspired optimization paradigm is proposed, which is called Harris Hawks Optimizer (HHO).
Stars: ✭ 31 (+0%)
Mutual labels:  evolutionary-algorithms, swarm-intelligence
neuroevolution-robots
Neuroevolution demo through TensorFlow.js, Neataptic, and Box2D
Stars: ✭ 31 (+0%)
Mutual labels:  evolutionary-algorithms
axxb calibration
A Comprehensive AX = XB Calibration Solvers in Matlab
Stars: ✭ 19 (-38.71%)
Mutual labels:  global-optimization
EAGO.jl
A development environment for robust and global optimization
Stars: ✭ 106 (+241.94%)
Mutual labels:  global-optimization
info-retrieval
Information Retrieval in High Dimensional Data (class deliverables)
Stars: ✭ 33 (+6.45%)
Mutual labels:  convex-optimization
Joint-User-Association-and-In-band-Backhaul-Scheduling-and-in-5G-mmWave-Networks
Matlab Simulation for T. K. Vu, M. Bennis, S. Samarakoon, M. Debbah and M. Latva-aho, "Joint In-Band Backhauling and Interference Mitigation in 5G Heterogeneous Networks," European Wireless 2016; 22th European Wireless Conference, Oulu, Finland, 2016, pp. 1-6. URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7499273&isnumber=7499250
Stars: ✭ 36 (+16.13%)
Mutual labels:  convex-optimization
ProxSDP.jl
Semidefinite programming optimization solver
Stars: ✭ 69 (+122.58%)
Mutual labels:  convex-optimization
PyConSys
Python Control System : Create control loops and let the AI set the PID parameters
Stars: ✭ 21 (-32.26%)
Mutual labels:  evolutionary-algorithms
flexBox
FlexBox is a fexible MATLAB toolbox for finite dimensional convex variational problems in image processing and beyond.
Stars: ✭ 14 (-54.84%)
Mutual labels:  convex-optimization
evoplex
Evoplex is a fast, robust and extensible platform for developing agent-based models and multi-agent systems on networks. It's available for Windows, Linux and macOS.
Stars: ✭ 98 (+216.13%)
Mutual labels:  evolutionary-algorithms
pycsou
Pycsou is a Python 3 package for solving linear inverse problems with state-of-the-art proximal algorithms. The software implements in a highly modular way the main building blocks -cost functionals, penalty terms and linear operators- of generic penalised convex optimisation problems.
Stars: ✭ 37 (+19.35%)
Mutual labels:  convex-optimization
LBFGS-Lite
LBFGS-Lite: A header-only L-BFGS unconstrained optimizer.
Stars: ✭ 98 (+216.13%)
Mutual labels:  unconstrained-optimization
vita
Vita - Genetic Programming Framework
Stars: ✭ 24 (-22.58%)
Mutual labels:  evolutionary-algorithms
jMetalSP
A framework for Big Data Optimization with multi-objective metaheuristics
Stars: ✭ 44 (+41.94%)
Mutual labels:  evolutionary-algorithms
Optimization
A set of lightweight header-only template functions implementing commonly-used optimization methods on Riemannian manifolds and convex spaces.
Stars: ✭ 66 (+112.9%)
Mutual labels:  convex-optimization
computational-intelligence
Spare material for Computational Intelligence 01URROV @ Politecnico di Torino
Stars: ✭ 20 (-35.48%)
Mutual labels:  evolutionary-algorithms
seminars-fivt
Seminars on optimization methods for DIHT MIPT
Stars: ✭ 23 (-25.81%)
Mutual labels:  convex-optimization

Optimization Function using Numpy (OpFuNu)

GitHub release Wheel PyPI version DOI version License

Installation

Install the current PyPI release:

pip install opfunu

Or install the development version from GitHub:

pip install git+https://github.com/thieu1995/opfunu

Example

  • All you need to do is: (Make sure your solution is a numpy 1-D array)
## For dimension_based

from opfunu.dimension_based.benchmark2d import Functions        # import 2-d benchmark functions
import numpy as np

solution2d = np.array([-0.1, 1.5])                              # Solution for 2-d benchmark
func2d = Functions()                                            # create an object

print(func2d._bartels_conn__(solution2d))                       # using function in above object
print(func2d._bird__(solution2d))

## For type_based (same as dimension_based)

from opfunu.type_based.multi_modal import Functions             # import 2-d benchmark functions
import numpy as np


## For CEC

from opfunu.cec.cec2014 import Functions                        # import cec2014 functions
import numpy as np

cec_sol = np.array([-0.1, 1.5])                              # Solution for 2-d benchmark
cec_func = Functions()                                            # create an object

print(cec_func.C1(cec_sol))                                  # using function in above object from C1, ..., C30
print(cec_func.C30(cec_sol))


## CEC-2005 or CEC-2008

import numpy as np
from opfunu.cec.cec2005.F1 import Model as f1
from opfunu.cec.cec2008.F7 import Model as f7

solution = np.array([0.5, 1, 1.5, 2, 3, 0.9, 1.2, 2, 1, 5])

t1 = f1()
result = t1._main__(temp)
print(result)

t2 = f7()
result = t2._main__(temp)
print(result)



## CEC-2010 

import numpy as np
from opfunu.cec.cec2010.function import F1, F2, ..., F12,..

solution = np.random.uniform(0, 1, 1000)
result = F12(temp)
print(result)


## CEC-2013 (2 ways to use depend on your purpose)

import numpy as np
from opfunu.cec.cec2013.unconstraint import Model as M13
from opfunu.cec.cec2014.unconstraint2 import Model as MD2

problem_size = 10
solution = np.random.uniform(0, 1, problem_size)


obj = MD2(problem_size)             # Object style solve different problems with different functions
print(obj.F1(solution))
print(obj.F2(solution))

obj = M13(solution)                 # Object style solve same problem with every functions
print(obj.F1())
print(obj.F2())


## CEC-2014 (3 ways to use depend on your purpose)

import numpy as np
from opfunu.cec.cec2014.function import F1, F2, ...
from opfunu.cec.cec2014.unconstraint2 import Model as MD2
from opfunu.cec.cec2014.unconstraint import Model as MD

problem_size = 10
solution = np.random.uniform(0, 1, problem_size)


print(F1(solution))             # Function style

func = MD(problem_size)         # Object style solve different problems with different functions
print(func.F1(solution))
print(func.F2(solution))

obj = MD2(solution)             # Object style solve same problem with every functions
print(obj.F1())
print(obj.F2())


## CEC-2015 
import numpy as np
from opfunu.cec.cec2015.function import F1, F2,...

temp = np.random.uniform(0, 1, 10)

result = F1(temp)
print(result)


## CEC basic 
import numpy as np
from opfunu.cec_basic.cec2014 import *

problem_size = 20
sol = np.random.uniform(0, 1, 20)

print(F30(sol))

### CEC 2020 - engineering problem 

from opfunu.cec.cec2020.constant import benchmark_function as BF
from opfunu.cec.cec2020 import engineering
from numpy.random import uniform

for i in range(1, 26):
    out = BF(i)         # Get object contain information about problems
    D, g, h, xmin, xmax = out["D"], out["g"], out["h"], out["xmin"], out["xmax"]

    solution = uniform(xmin, xmax)                              ## Create solution based on information above
    problem = "p" + str(i)                                      ## Choice the problem
    fx, gx, hx = getattr(engineering, problem)(solution)        ## Fitness function, constraint
    print("\n==============" + problem + "=================")
    print("fx:", fx)
    print("gx:", gx)
    print("hx:", hx)

-- The problem 1-23 and 25 is DONE, the problem 24th is not DONE yet.

...

References

Publications

  • If you see my code and data useful and use it, please cites my works here
@software{thieu_nguyen_2020_3711682,
  author       = {Thieu Nguyen},
  title        = {A framework of Optimization Functions using Numpy (OpFuNu) for optimization problems},
  year         = 2020,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.3620960},
  url          = {https://doi.org/10.5281/zenodo.3620960.}
}

@article{nguyen2019efficient,
  title={Efficient Time-Series Forecasting Using Neural Network and Opposition-Based Coral Reefs Optimization},
  author={Nguyen, Thieu and Nguyen, Tu and Nguyen, Binh Minh and Nguyen, Giang},
  journal={International Journal of Computational Intelligence Systems},
  volume={12},
  number={2},
  pages={1144--1161},
  year={2019},
  publisher={Atlantis Press}
}

Documentation

1. dimension_based references
    1. http://benchmarkfcns.xyz/fcns
    2. https://en.wikipedia.org/wiki/Test_functions_for_optimization
    3. https://www.cs.unm.edu/~neal.holts/dga/benchmarkFunction/
    4. http://www.sfu.ca/~ssurjano/optimization.html

2. type_based
    A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)

3. cec
    Problem Definitions and Evaluation Criteria for the CEC 2014 
Special Session and Competition on Single Objective Real-Parameter Numerical Optimization 

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].