Commit bf8859b
authored
Change NLopt to OptimizationNLopt
With `using NLopt`, you get
```julia
using Optimization
using NLopt
rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
x0 = zeros(2)
p = [1.0, 100.0]
f = OptimizationFunction(rosenbrock)
prob = Optimization.OptimizationProblem(f, x0, p, lb = [-1.0,-1.0], ub = [1.0,1.0])
sol = solve(prob, NLopt.LN_NELDERMEAD())
ERROR: MethodError: objects of type Algorithm are not callable
Stacktrace:
[1] top-level scope
@ Untitled-1:8
```
this is fixed when doing `using OptimizationNLopt` (and matches the rest fo the tutorial).1 parent 0939fdf commit bf8859b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments