GAP and CPUTime in JuMP v0.19

#1

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.

#2

The solve time can be got with MOI.get(model, MOI.SolveTime()) (see https://github.com/JuliaOpt/JuMP.jl/issues/1891).
The objective value can be got with objective_value(model).

#3

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.

#4

You can get it with MOI.get(model, MOI.RelativeGap()), see http://www.juliaopt.org/MathOptInterface.jl/stable/apireference/#MathOptInterface.RelativeGap, Query Solution Time and https://github.com/JuliaOpt/MathOptInterface.jl/issues/590.

#6

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?
Hugs,

Getting Gap and #Nodes in JuMP v0.19
#7

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