Skip to content

Commit

Permalink
[docs] fix warmstart example (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 23, 2022
1 parent 7ddd7e4 commit 3898d6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ y = rand(n)
x = Variable(n)

# first solve
lambda = 100
lambda = Variable(Positive())
fix!(lambda, 100)
problem = minimize(sumsquares(y - x) + lambda * sumsquares(x - 10))
@time solve!(problem, SCS.Optimizer)

# now warmstart
# if the solver takes advantage of warmstarts,
# this run will be faster
lambda = 105
fix!(lambda, 105)
@time solve!(problem, SCS.Optimizer, warmstart=true)
```

Expand Down

0 comments on commit 3898d6c

Please sign in to comment.