@@ -87,8 +87,8 @@ Let's add the maxima and minima to the plots:
87
87
88
88
``` @example minmax
89
89
plot(sol, vars=(0,4), plotdensity=10000)
90
- scatter!([opt.minimizer ],[opt.minimum],label="Local Min")
91
- scatter!([opt2.minimizer ],[-opt2.minimum],label="Local Max")
90
+ scatter!([opt.u ],[opt.minimum],label="Local Min")
91
+ scatter!([opt2.u ],[-opt2.minimum],label="Local Max")
92
92
```
93
93
94
94
### Global Optimization
@@ -102,14 +102,14 @@ swap out to one of the
102
102
Let's try ` GN_ORIG_DIRECT_L ` :
103
103
104
104
``` @example minmax
105
- opt = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
106
- opt2 = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
105
+ gopt = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
106
+ gopt2 = solve(optprob, NLopt.GN_ORIG_DIRECT_L())
107
107
108
- @show opt .u, opt2 .u
108
+ @show gopt .u, gopt2 .u
109
109
```
110
110
111
111
``` @example minmax
112
112
plot(sol, vars=(0,4), plotdensity=10000)
113
- scatter!([minx ],[minf ],label="Global Min")
114
- scatter!([maxx ],[maxf ],label="Global Max")
113
+ scatter!([gopt.u ],[gopt.minimum ],label="Global Min")
114
+ scatter!([gopt2.u ],[-gopt2.minimum ],label="Global Max")
115
115
```
0 commit comments