From 4bc0ed407b8f0b4bb3e9b5af1d187b7eda3a8147 Mon Sep 17 00:00:00 2001 From: Spinachboul Date: Mon, 11 Dec 2023 22:24:59 +0530 Subject: [PATCH 1/2] Update Branin Function --- docs/src/ImprovedBraninFunction.md | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/src/ImprovedBraninFunction.md diff --git a/docs/src/ImprovedBraninFunction.md b/docs/src/ImprovedBraninFunction.md new file mode 100644 index 00000000..98d3ca4c --- /dev/null +++ b/docs/src/ImprovedBraninFunction.md @@ -0,0 +1,41 @@ +# Branin Function + +The Branin Function is commonly used as a test function for metamodelling in computer experiments, especially in the context of optimization. + + +# Modifications for Improved Branin Function: +To enhance the Branin function, changes were made to introduce irregularities, variability, and a dynamic aspect to its landscape. Here's an example: + +```function improved_branin(x, time_step) + x1 = x[1] + x2 = x[2] + b = 5.1 / (4*pi^2) + c = 5/pi + r = 6 + a = 1 + s = 10 + t = 1 / (8*pi) + + # Adding noise to the function's output + noise = randn() * time_step # Simulating time-varying noise + term1 = a * (x2 - b*x1^2 + c*x1 - r)^2 + term2 = s*(1-t)*cos(x1 + noise) # Introducing dynamic component + y = term1 + term2 + s +end +``` + +This improved function now incorporates irregularities, variability, and a dynamic aspect. These changes aim to make the optimization landscape more challenging and realistic. + +# Using the Improved Branin Function: +After defining the improved Branin function, you can proceed to test different surrogates and visualize their performance using the updated function. Here's an example of using the improved function with the Radial Basis surrogate: + +``` +# Assuming you've defined 'improved_branin' and imported necessary packages + +radial_surrogate = RadialBasis(xys, [improved_branin(xy, 0.1) for xy in xys], lower_bound, upper_bound) +p1 = surface(x, y, (x, y) -> radial_surrogate([x, y])) +scatter!(xs, ys, marker_z=zs) +p2 = contour(x, y, (x, y) -> radial_surrogate([x, y])) +scatter!(xs, ys, marker_z=zs) +plot(p1, p2, title="Radial Surrogate") +``` From 0fc03e744513b77a54414e3de0e444f2261b7b58 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 13 Dec 2023 08:33:54 -0500 Subject: [PATCH 2/2] Update pages.jl --- docs/pages.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages.jl b/docs/pages.jl index ce76c3fd..3b1876c4 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -32,6 +32,7 @@ pages = ["index.md" "Water Flow function" => "water_flow.md", "Welded beam function" => "welded_beam.md", "Branin function" => "BraninFunction.md", + "Improved Branin function" => "ImprovedBraninFunction.md", "Ackley function" => "ackley.md", "Gramacy & Lee Function" => "gramacylee.md", "Salustowicz Benchmark" => "Salustowicz.md",