GAP and CPUTime in JuMP v0.19


Dear users,
I begin to use the JuMP v0.19 today.
Some functions in previous versions were implemented, for example getobjvalue(model) and getsolvetime(model).
But, this commands are not working in this version!

Please, in v0.19, how can I obtain the GAP and CPU time in MILP?
Thanks a lot.


The solve time can be got with MOI.get(model, MOI.SolveTime()) (see
The objective value can be got with objective_value(model).


Thank you for your response.
The cpu time ok.
But, I have requested about the Gap of integrality.
How can I obtain?
Thanks a Lot.


You can get it with MOI.get(model, MOI.RelativeGap()), see, Query Solution Time and


Hello friend,
I tried to use MOI.get(modelo, MOI.RelativeGap()), but doesn’t work. The error:
ERROR: MethodError: no method matching get_relative_mip_gap(::CPLEX.Optimizer) appears.
How can I solve this problem?

Getting Gap and #Nodes in JuMP v0.19

@angeloaliano1 you have already asked this question and gotten a reply.