Skip to content

Commit c192c66

Browse files
committed
Small fixes
1 parent 8570338 commit c192c66

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tutorials/creating-a-jso-compliant-solver/index.jmd

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function newton(nlp :: AbstractNLPModel)
208208

209209
status = :first_order
210210

211-
return GenericExecutionStats(status, nlp)
211+
return GenericExecutionStats(nlp, status=status)
212212

213213
end
214214
```
@@ -268,7 +268,7 @@ function newton(nlp :: AbstractNLPModel)
268268
end # hide
269269
status = :first_order # hide
270270

271-
return GenericExecutionStats(status, nlp, solution=x, objective=obj(nlp, x))
271+
return GenericExecutionStats(nlp, status=status, solution=x, objective=obj(nlp, x))
272272
end
273273
```
274274

@@ -358,7 +358,7 @@ function newton(
358358
end
359359
end
360360

361-
return GenericExecutionStats(status, nlp, solution=x, objective=obj(nlp, x), iter=iter, elapsed_time=Δt)
361+
return GenericExecutionStats(nlp, status=status, solution=x, objective=obj(nlp, x), iter=iter, elapsed_time=Δt)
362362
end
363363
```
364364

@@ -530,7 +530,7 @@ function newton2(
530530
end
531531
end
532532

533-
return GenericExecutionStats(status, nlp, solution=x, objective=fx, dual_feas=norm(∇fx), iter=iter, elapsed_time=Δt)
533+
return GenericExecutionStats(nlp, status=status, solution=x, objective=fx, dual_feas=norm(∇fx), iter=iter, elapsed_time=Δt)
534534

535535
end
536536
```
@@ -547,5 +547,3 @@ performance_profile(stats, cost)
547547
[^1]: Technically, it can be defined more generally, but the choice we made has better behaved values. [Wikipedia page: Rosenbrock page, access on 2021/Mar/17.](https://en.wikipedia.org/wiki/Rosenbrock_function#:~:text=In%20mathematical%20optimization%2C%20the%20Rosenbrock,valley%20or%20Rosenbrock%27s%20banana%20function)
548548

549549
[^2]: Dolan, E., Moré, J. Benchmarking optimization software with performance profiles. Math. Program. 91, 201–213 (2002). [doi.org/10.1007/s101070100263](https://doi.org/10.1007/s101070100263)
550-
551-

tutorials/introduction-to-optimizationproblems/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
33
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
44
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
5+
NLPModelsJuMP = "792afdf1-32c1-5681-94e0-d7bf7a5df49e"
56
OptimizationProblems = "5049e819-d29b-5fba-b941-0eee7e64c1c6"
67

78
[compat]
89
ADNLPModels = "0.5"
910
JuMP = "1.1"
1011
NLPModels = "0.19"
12+
NLPModelsJuMP = "0.12"
1113
OptimizationProblems = "0.6"

0 commit comments

Comments
 (0)