Skip to content

Commit 79c52bb

Browse files
authored
Replace solve by minimize in README (#122)
* Replace `solve` by `minimize` in README
1 parent 066d704 commit 79c52bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ using JSOSuite
3333
# Rosenbrock
3434
x0 = [-1.2; 1.0]
3535
f = x -> 100 * (x[2] - x[1]^2)^2 + (x[1] - 1)^2
36-
stats = solve(f, x0)
36+
stats = minimize(f, x0)
3737

38-
# Constrained problem
39-
c = x -> [x[1] * x[2] - 1]
40-
stats = solve(f, x0, c, [0.0], [0.0])
38+
# Unconstrained problem in Float32
39+
stats = minimize(f, Float32.(x0))
4140

42-
# Constrained problem in Float32
43-
stats = solve(f, Float32.(x0), c, Float32[0.0], Float32[0.0])
41+
# Constrained problem
42+
c = x -> [x[1] + x[2] - 1]
43+
stats = minimize(f, x0, c, [0.0], [0.0])
4444
```
4545

4646
# Bug reports and discussions

0 commit comments

Comments
 (0)