1
from mpl_toolkits.mplot3d import Axes3D
2
from matplotlib import cm
3
from matplotlib.colors import LogNorm
4
import matplotlib.pyplot as plt
11
from deap import benchmarks
14
#A = 10 * np.random.rand(NUMMAX, 2)
15
#C = np.random.rand(NUMMAX)
17
A = [[0.5, 0.5], [0.25, 0.25], [0.25, 0.75], [0.75, 0.25], [0.75, 0.75]]
18
C = [0.002, 0.005, 0.005, 0.005, 0.005]
21
return benchmarks.shekel(sol, A, C)[0]
24
# ax = Axes3D(fig, azim = -29, elev = 50)
26
X = np.arange(0, 1, 0.01)
27
Y = np.arange(0, 1, 0.01)
28
X, Y = np.meshgrid(X, Y)
31
for i in xrange(X.shape[0]):
32
for j in xrange(X.shape[1]):
33
Z[i,j] = shekel_arg0((X[i,j],Y[i,j]))
35
ax.plot_surface(X, Y, Z, rstride=1, cstride=1, norm=LogNorm(), cmap=cm.jet, linewidth=0.2)
b'\\ No newline at end of file'