File:Simionescu's function.svg

Summary

Description
English: Simionescu's test objective function:
Date
Source Own work
Author Nicoguaro
SVG development
InfoField
Source code
InfoField

Python code

from numpy import cos, arctan
import numpy as np
import matplotlib.pyplot as plt

plt.rcParams["font.size"] = 10
plt.rcParams["mathtext.fontset"] = "cm"

x1, x2 = np.mgrid[-1.25:1.25:101j, -1.25:1.25:101j]
fun = x1*x2
cons = x1**2 + x2**2 - (1 + 0.2*cos(8*arctan(x1/x2)))**2
fun[cons > 0.01] = np.nan
levels = np.linspace(-1, 1, 30)
plt.contour(x1, x2, fun, levels, cmap="seismic")
plt.contour(x1, x2, cons, [0], colors="black")
plt.axis("image")
plt.xlabel(r"$x$", fontsize=14)
plt.ylabel(r"$y$", fontsize=14)
plt.savefig("simionescu's function.svg", bbox_inches="tight")
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Category:CC-BY-4.0#Simionescu's%20function.svg
Category:Self-published work Category:Test functions (mathematical optimization) Category:Constrained optimization Category:Contour plots
Category:CC-BY-4.0 Category:Constrained optimization Category:Contour plots Category:Self-published work Category:Test functions (mathematical optimization) Category:Valid SVG created with Matplotlib code