Skip to content

Commit 58e8e3d

Browse files
committed
refactor(OptimizationMOI): add the time and the iterations to the stats
1 parent 53b6278 commit 58e8e3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/OptimizationMOI/src/nlp.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ function SciMLBase.__solve(cache::MOIOptimizationNLPCache)
559559
minimum = NaN
560560
opt_ret = SciMLBase.ReturnCode.Default
561561
end
562-
stats = Optimization.OptimizationStats()
562+
stats = Optimization.OptimizationStats(time = MOI.get(opt_setup, MOI.SolveTimeSec()),
563+
iterations = MOI.get(opt_setup, MOI.BarrierIterations()))
563564
return SciMLBase.build_solution(cache,
564565
cache.opt,
565566
minimizer,

0 commit comments

Comments
 (0)