top of page

PERIODIC FUNCTION

Updated: Jul 19, 2021






Mathematical Definition



Input Domain

The Periodic Function is defined on input range xi [-10,10] for i=1…n


Global Minima

The Periodic Function has on global minimum f(x*)=0.9 at x*=(0…0).


Description and Features


The Periodic Function is a function that repeats its values at regular intervals. This function is defined on n-dimensional space and used to describe oscillations, waves and other phenomena that exhibit periodicity.


The Periodic Function is a

  • Non-separable

  • Continuous

  • Non-convex

  • Differentiable

  • Multi-modal


Python Implementation


% Please forward any comments or bug reports in chat
Copyright 2021. INDUSMIC PRIVATE LIMITED.THERE IS NO WARRANTY, EXPRESS OR IMPLIED. WE DO NOT ASSUME ANY LIABILITY FOR THE USE OF THIS PROGRAM. If software is modified to produce derivative works, such modified software should be clearly marked. Additionally, user can redistribute it and/or modify it under the terms of the GNU General Public License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License for more details.
% for any support connect with us on help.indusmic@gmail.com
% Author: RIYA SHIVHARE

import matplotlib.pyplot as plt
import numpy as np
from numpy import sin
from numpy import exp
from mpl_toolkits import mplot3d 
def f(x1,x2): 
    return  1+ sin(x1)**2 + sin(x2)**2-0.1*exp(-x1*x1-x2*x2)

x1=np.linspace(-2,2)
x2=np.linspace(-2,2) 
x1,x2=np.meshgrid(x1,x2)

results=f(x1,x2)
fig =plt.figure(figsize=(9,9))
 
axis=fig.gca(projection='3d')
axis.contour3D(x1,x2,results,450)
axis.set_xlabel('X')
axis.set_ylabel('Y')
axis.set_zlabel('Z')
axis.set_title('Periodic Function')
axis.view_init(21,45)
 
#plt.contour(x1,x2,results,15)
plt.show()




References:


[1] Jamil, Momin, and Xin-She Yang. "A literature survey of benchmark functions for global optimization problems." International Journal of Mathematical Modelling and Numerical Optimization 4.2 (2013): 150-194.



#optimization #benchmarkfunction

539 views0 comments
bottom of page