Skip to content

Commit 026371c

Browse files
committed
Add grid lines and up opacity
1 parent 79bcd37 commit 026371c

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

examples/tutorials/aposmm/aposmm_tutorial_notebook.ipynb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Parallel Optimization with APOSMM\n",
88
"\n",
9-
"This tutorial demonstrates libEnsemble’s capability to identify multiple minima of simulation output using the built-in APOSMM (Asynchronously Parallel Optimization Solver for finding Multiple Minima) generator function (`gen_f`). In this tutorial, we’ll create a simple simulation function (`sim_f`) that defines a function with multiple minima, then write a libEnsemble calling script that imports APOSMM and parameterizes it to check for minima over a domain of outputs from our `sim_f`.\n",
9+
"This tutorial demonstrates libEnsemble’s capability to identify multiple minima from simulation outputs using the built-in APOSMM (Asynchronously Parallel Optimization Solver for finding Multiple Minima) generator function (`gen_f`). In this tutorial, we’ll create a simple simulation function (`sim_f`) that defines a function with multiple minima, then write a libEnsemble calling script that imports APOSMM and parameterizes it to check for minima over a domain of outputs from our `sim_f`.\n",
1010
"\n",
1111
"Besides libEnsemble and NumPy, SciPy and mpmath are also required dependencies.\n",
1212
"\n",
@@ -43,7 +43,6 @@
4343
"outputs": [],
4444
"source": [
4545
"# Define our simulation function\n",
46-
"\n",
4746
"import numpy as np\n",
4847
"\n",
4948
"\n",
@@ -122,9 +121,9 @@
122121
"cell_type": "markdown",
123122
"metadata": {},
124123
"source": [
125-
"This allocation function starts a single Persistent APOSMM routine and provides ``sim_f`` output for points requested by APOSMM. Points can be sampled points or points from local optimization runs.\n",
124+
"This allocation function starts a single Persistent APOSMM generator to generate points (simulation input parameters), and returns the resulting values from each simulation (run in parallel). Points can be sampled points or points from the parallel local optimization runs.\n",
126125
"\n",
127-
"APOSMM supports a wide variety of external optimizers. The following statements set optimizer settings to ``'scipy'`` to indicate to APOSMM which optimization method to use, and help prevent unnecessary imports or package installations:"
126+
"APOSMM supports a wide variety of external optimizers. The following statement sets the optimizer settings to ``'scipy'`` to indicate to APOSMM which optimization method to use, so it is imported at global scope:"
128127
]
129128
},
130129
{
@@ -142,6 +141,7 @@
142141
"cell_type": "markdown",
143142
"metadata": {},
144143
"source": [
144+
"This script uses the dictionary interface to configure the run (the newer object interface is equally valid).\n",
145145
"Set up ``nworkers``, ``libE_specs``, ``sim_specs``, ``gen_specs``, and ``alloc_specs``:"
146146
]
147147
},
@@ -279,8 +279,9 @@
279279
"## Viewing Animation\n",
280280
"\n",
281281
"The following cell produces a 3D animation showing the random sampling points, \n",
282-
"and points produced by the optimization runs, under the local Minima. It may take\n",
283-
"a few seconds to produce the animation."
282+
"the points produced by the optimization runs, and the local Minima.\n",
283+
"\n",
284+
"This may take up to about 30 seconds to produce the 3D animation, depending on system."
284285
]
285286
},
286287
{
@@ -302,7 +303,7 @@
302303
" Z = np.array([six_hump_camel_func(np.array([x, y])) for x, y in zip(X.ravel(), Y.ravel())]).reshape(X.shape)\n",
303304
" fig = plt.figure(figsize=(10, 8))\n",
304305
" ax = fig.add_subplot(111, projection=\"3d\")\n",
305-
" ax.plot_surface(X, Y, Z, cmap=\"winter\", edgecolor=\"none\", alpha=0.3)\n",
306+
" ax.plot_surface(X, Y, Z, cmap=\"winter\", edgecolor='k', linewidth=0.1, antialiased=True, alpha=0.5) \n",
306307
" sc_normal = ax.scatter3D([], [], [], s=6, color=\"black\", marker=\"o\", label=\"Point\")\n",
307308
" sc_localp = ax.scatter3D([], [], [], s=40, color=\"red\", marker=\"^\", label=\"Optimization point\")\n",
308309
" custom_M_marker = Line2D([0], [0], linestyle='None', marker='$\\\\mathrm{M}$',\n",

0 commit comments

Comments
 (0)