Skip to content

Commit

Permalink
evaluate inplace constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Oct 22, 2023
1 parent 7f6e53e commit a8fe8a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/src/examples/rosenbrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ flexibility of Optimization.jl. This is a gauntlet of many solvers to get a feel
for common workflows of the package and give copy-pastable starting points.

!!! note

This example uses many different solvers of Optimization.jl. Each solver
subpackage needs to be installed separate. For example, for the details on
the installation and usage of OptimizationOptimJL.jl package, see the
Expand Down Expand Up @@ -80,7 +80,9 @@ prob = OptimizationProblem(optf, x0, _p, lcons = [0.5], ucons = [0.5],
sol = solve(prob, IPNewton())
# Notice now that x[1]^2 + x[2]^2 ≈ 0.5:
cons(sol.u, _p)
res = zeros(1)
cons(res, sol.u, _p)
println(res)
```

```@example rosenbrock
Expand Down

0 comments on commit a8fe8a0

Please sign in to comment.