Run a benchmark with OptimizationProblems.jl

In this more advanced tutorial, we use the problems from OptimizationProblems to run a benchmark for unconstrained problems. The tutorial will use:

  • JSOSolvers: This package provides optimization solvers in pure Julia for unconstrained and bound-constrained optimization.
  • NLPModelsJuMP: This package convert JuMP model in NLPModel format.
  • SolverBenchmark: This package provides general tools for benchmarking solvers.
using JSOSolvers, NLPModels, NLPModelsJuMP, OptimizationProblems, SolverBenchmark
using OptimizationProblems.PureJuMP

We select the problems from PureJuMP submodule of OptimizationProblems converted in NLPModels using NLPModelsJuMP.

problems = (MathOptNLPModel(OptimizationProblems.PureJuMP.eval(Meta.parse(problem))(), name=problem) for problem ∈ OptimizationProblems.meta[!, :name])
Base.Generator{Vector{String}, Main.var"#2#3"}(Main.var"#2#3"(), ["AMPGO02", "AMPGO03", "AMPGO04", "AMPGO05", "AMPGO06", "AMPGO07", "AMPGO08", "AMPGO09", "AMPGO10", "AMPGO11"  …  "triangle_deer", "triangle_pacman", "triangle_turtle", "tridia", "vardim", "variational", "vibrbeam", "watson", "woods", "zangwil3"])

The same can be achieved using OptimizationProblems.ADNLPProblems instead of OptimizationProblems.PureJuMP as follows:

using ADNLPModels
using OptimizationProblems.ADNLPProblems
ad_problems = (OptimizationProblems.ADNLPProblems.eval(Meta.parse(problem))() for problem ∈ OptimizationProblems.meta[!, :name])
Base.Generator{Vector{String}, Main.var"#5#6"}(Main.var"#5#6"(), ["AMPGO02", "AMPGO03", "AMPGO04", "AMPGO05", "AMPGO06", "AMPGO07", "AMPGO08", "AMPGO09", "AMPGO10", "AMPGO11"  …  "triangle_deer", "triangle_pacman", "triangle_turtle", "tridia", "vardim", "variational", "vibrbeam", "watson", "woods", "zangwil3"])

We also define a dictionary of solvers that will be used for our benchmark. We consider here JSOSolvers.lbfgs and JSOSolvers.trunk.

solvers = Dict(
  :lbfgs => model -> lbfgs(model, mem=5, atol=1e-5, rtol=0.0),
  :trunk => model -> trunk(model, atol=1e-5, rtol=0.0),
)
Dict{Symbol, Function} with 2 entries:
  :trunk => #11
  :lbfgs => #9

The function SolverBenchmark.bmak_solvers will run all the problems on the specified solvers and store the results in a DataFrame. At this stage, we discard the problems that have constraints or bounds using !unconstrained(prob), and those that are too large or too small with get_nvar(prob) > 100 || get_nvar(prob) < 5.

stats = bmark_solvers(
  solvers, problems,
  skipif=prob -> (!unconstrained(prob) || get_nvar(prob) > 100 || get_nvar(prob) < 5),
)
Dict{Symbol, DataFrames.DataFrame} with 2 entries:
  :trunk => 114×40 DataFrame…
  :lbfgs => 114×40 DataFrame

We can explore the results solver by solver in stats[:lbfgs] and stats[:trunk], or get a profile wall using SolverBenchmark.profile_solvers.

cols = [:id, :name, :nvar, :objective, :dual_feas, :neval_obj, :neval_grad, :neval_hess, :iter, :elapsed_time, :status]
header = Dict(
  :nvar => "n",
  :objective => "f(x)",
  :dual_feas => "‖∇f(x)‖",
  :neval_obj => "# f",
  :neval_grad => "# ∇f",
  :neval_hess => "# ∇²f",
  :elapsed_time => "t",
)

for solver ∈ keys(solvers)
  pretty_stats(stats[solver][!, cols], hdr_override=header)
end
┌────────┬───────────────┬────────┬───────────┬───────────┬────────┬────────┬────────┬────────┬───────────┬───────────┐
│     id │          name │      n │      f(x) │   ‖∇f(x)‖ │    # f │   # ∇f │  # ∇²f │   iter │         t │    status │
├────────┼───────────────┼────────┼───────────┼───────────┼────────┼────────┼────────┼────────┼───────────┼───────────┤
│     25 │          NZF1 │     91 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     38 │       arglina │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     39 │       arglinb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     40 │       arglinc │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     41 │       argtrig │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     42 │       arwhead │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     43 │        auglag │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     46 │       bdqrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     51 │        biggs6 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     53 │      boundary │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     57 │       brownal │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     60 │     browngen1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     61 │     browngen2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     62 │     broyden3d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     63 │     broyden7d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     64 │      broydn7d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     65 │        brybnd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     71 │      chainwoo │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     73 │  chnrosnb_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     78 │      clplatea │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     79 │      clplateb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     80 │      clplatec │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     82 │        cosine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     83 │      cragglvy │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     84 │     cragglvy2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     85 │         curly │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     86 │       curly10 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     87 │       curly20 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     88 │       curly30 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     90 │      dixmaane │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     91 │      dixmaanf │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     92 │      dixmaang │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     93 │      dixmaanh │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     94 │      dixmaani │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     95 │      dixmaanj │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     96 │      dixmaank │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     97 │      dixmaanl │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     98 │      dixmaanm │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     99 │      dixmaann │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    100 │      dixmaano │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    101 │      dixmaanp │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    102 │      dixon3dq │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    103 │       dqdrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    104 │        dqrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    106 │       edensch │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    107 │           eg2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    109 │       engval1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    110 │          enso │      9 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    111 │  errinros_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    112 │      extrosnb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    113 │      fletcbv2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    114 │  fletcbv3_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    115 │      fletchcr │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    116 │      fminsrf2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    117 │      freuroth │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    119 │        gauss1 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    120 │        gauss2 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    121 │        gauss3 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    123 │   genbroydenb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    124 │ genbroydentri │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    125 │      genhumps │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    126 │       genrose │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    127 │  genrose_nash │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    130 │         hahn1 │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    297 │     indef_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    298 │      integreq │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    300 │        kirby2 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    302 │      lanczos1 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    303 │      lanczos2 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    304 │      lanczos3 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    305 │       liarwhd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    314 │         mgh17 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    320 │        morebv │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    322 │      nazareth │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    323 │         ncb20 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    324 │        ncb20b │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    326 │      noncvxu2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    327 │      noncvxun │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    328 │        nondia │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    329 │      nondquar │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    330 │      osborne1 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    331 │      osborne2 │     11 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    332 │      palmer1c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    333 │      palmer1d │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    334 │      palmer2c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    335 │      palmer3c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    336 │      palmer4c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    337 │      palmer5c │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    339 │      palmer6c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    340 │      palmer7c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    341 │      palmer8c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    342 │      penalty1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    343 │      penalty2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    344 │      penalty3 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    351 │      powellsg │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    352 │         power │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    353 │        quartc │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    360 │       sbrybnd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    361 │      schmvett │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    362 │       scosine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    363 │       sinquad │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    364 │      sparsine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    365 │      sparsqur │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    366 │      spmsrtls │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    367 │      srosenbr │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    378 │       thurber │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    379 │      tointgss │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    381 │      tquartic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    386 │        tridia │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    387 │        vardim │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    388 │   variational │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    389 │      vibrbeam │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    390 │        watson │     31 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    391 │         woods │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
└────────┴───────────────┴────────┴───────────┴───────────┴────────┴────────┴────────┴────────┴───────────┴───────────┘
┌────────┬───────────────┬────────┬───────────┬───────────┬────────┬────────┬────────┬────────┬───────────┬───────────┐
│     id │          name │      n │      f(x) │   ‖∇f(x)‖ │    # f │   # ∇f │  # ∇²f │   iter │         t │    status │
├────────┼───────────────┼────────┼───────────┼───────────┼────────┼────────┼────────┼────────┼───────────┼───────────┤
│     25 │          NZF1 │     91 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     38 │       arglina │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     39 │       arglinb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     40 │       arglinc │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     41 │       argtrig │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     42 │       arwhead │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     43 │        auglag │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     46 │       bdqrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     51 │        biggs6 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     53 │      boundary │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     57 │       brownal │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     60 │     browngen1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     61 │     browngen2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     62 │     broyden3d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     63 │     broyden7d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     64 │      broydn7d │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     65 │        brybnd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     71 │      chainwoo │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     73 │  chnrosnb_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     78 │      clplatea │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     79 │      clplateb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     80 │      clplatec │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     82 │        cosine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     83 │      cragglvy │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     84 │     cragglvy2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     85 │         curly │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     86 │       curly10 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     87 │       curly20 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     88 │       curly30 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     90 │      dixmaane │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     91 │      dixmaanf │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     92 │      dixmaang │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     93 │      dixmaanh │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     94 │      dixmaani │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     95 │      dixmaanj │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     96 │      dixmaank │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     97 │      dixmaanl │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     98 │      dixmaanm │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│     99 │      dixmaann │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    100 │      dixmaano │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    101 │      dixmaanp │     99 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    102 │      dixon3dq │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    103 │       dqdrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    104 │        dqrtic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    106 │       edensch │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    107 │           eg2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    109 │       engval1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    110 │          enso │      9 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    111 │  errinros_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    112 │      extrosnb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    113 │      fletcbv2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    114 │  fletcbv3_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    115 │      fletchcr │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    116 │      fminsrf2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    117 │      freuroth │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    119 │        gauss1 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    120 │        gauss2 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    121 │        gauss3 │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    123 │   genbroydenb │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    124 │ genbroydentri │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    125 │      genhumps │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    126 │       genrose │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    127 │  genrose_nash │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    130 │         hahn1 │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    297 │     indef_mod │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    298 │      integreq │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    300 │        kirby2 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    302 │      lanczos1 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    303 │      lanczos2 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    304 │      lanczos3 │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    305 │       liarwhd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    314 │         mgh17 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    320 │        morebv │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    322 │      nazareth │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    323 │         ncb20 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    324 │        ncb20b │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    326 │      noncvxu2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    327 │      noncvxun │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    328 │        nondia │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    329 │      nondquar │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    330 │      osborne1 │      5 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    331 │      osborne2 │     11 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    332 │      palmer1c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    333 │      palmer1d │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    334 │      palmer2c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    335 │      palmer3c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    336 │      palmer4c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    337 │      palmer5c │      6 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    339 │      palmer6c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    340 │      palmer7c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    341 │      palmer8c │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    342 │      penalty1 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    343 │      penalty2 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    344 │      penalty3 │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    351 │      powellsg │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    352 │         power │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    353 │        quartc │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    360 │       sbrybnd │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    361 │      schmvett │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    362 │       scosine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    363 │       sinquad │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    364 │      sparsine │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    365 │      sparsqur │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    366 │      spmsrtls │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    367 │      srosenbr │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    378 │       thurber │      7 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    379 │      tointgss │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    381 │      tquartic │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    386 │        tridia │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    387 │        vardim │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    388 │   variational │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    389 │      vibrbeam │      8 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    390 │        watson │     31 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
│    391 │         woods │    100 │       Inf │       Inf │      0 │      0 │      0 │      0 │       Inf │ exception │
└────────┴───────────────┴────────┴───────────┴───────────┴────────┴────────┴────────┴────────┴───────────┴───────────┘
first_order(df) = df.status .== :first_order
unbounded(df) = df.status .== :unbounded
solved(df) = first_order(df) .| unbounded(df)
costnames = ["time", "obj + grad + hess"]
costs = [
  df -> .!solved(df) .* Inf .+ df.elapsed_time,
  df -> .!solved(df) .* Inf .+ df.neval_obj .+ df.neval_grad .+ df.neval_hess,
]

using Plots
gr()

profile_solvers(stats, costs, costnames)
Example block output

It is also possible to select problems when initializing the problem list by filtering OptimizationProblems.meta:

meta = OptimizationProblems.meta
problem_list = meta[(meta.ncon .== 0) .& .!meta.has_bounds .& (5 .<= meta.nvar .<= 100), :name]
problems = (MathOptNLPModel(eval(Meta.parse(problem))(), name=problem) for problem ∈ problem_list)