Number of nodes and Relative Gap

Dear users,
I am with Julia 1.0.4, JuMP version 0.19 and using the MathOptInterface to solve a integer model. According to the documentation in http://www.juliaopt.org/MathOptInterface.jl/stable/apireference/ the relative Gap and the number of nodes researched are given by the commands:

GAP = MOI.get(modelo, MOI.NodeCount())
Nodes = MOI.get(modelo, MOI.NodeCount())

but this give the following error message, respectively:

MethodError: no method matching get_node_count(::CPLEX.Optimizer)
Closest candidates are:
  get_node_count(!Matched::LinQuadOptInterface.MockLinQuadOptimizer) at C:\Users\angeloaliano\.juliapro\JuliaPro_v1.0.4.1\packages\LinQuadOptInterface\ZMx9f\src\mockoptimizer.jl:834
get(::CPLEX.Optimizer, ::MathOptInterface.NodeCount) at solve.jl:265
get(::MathOptInterface.Bridges.LazyBridgeOptimizer{CPLEX.Optimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Bridges.AllBridgedConstraints{Float64}}}, ::MathOptInterface.NodeCount) at bridgeoptimizer.jl:189
get(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}, ::MathOptInterface.NodeCount) at cachingoptimizer.jl:438
_moi_get_result(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}, ::MathOptInterface.NodeCount) at JuMP.jl:587
get(::Model, ::MathOptInterface.NodeCount) at JuMP.jl:600
top-level scope at none:0

and

MethodError: no method matching get_node_count(::CPLEX.Optimizer)
Closest candidates are:
  get_node_count(!Matched::LinQuadOptInterface.MockLinQuadOptimizer) at C:\Users\angeloaliano\.juliapro\JuliaPro_v1.0.4.1\packages\LinQuadOptInterface\ZMx9f\src\mockoptimizer.jl:834
get(::CPLEX.Optimizer, ::MathOptInterface.NodeCount) at solve.jl:265
get(::MathOptInterface.Bridges.LazyBridgeOptimizer{CPLEX.Optimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Bridges.AllBridgedConstraints{Float64}}}, ::MathOptInterface.NodeCount) at bridgeoptimizer.jl:189
get(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}, ::MathOptInterface.NodeCount) at cachingoptimizer.jl:438
_moi_get_result(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{JuMP._MOIModel{Float64}}}, ::MathOptInterface.NodeCount) at JuMP.jl:587
get(::Model, ::MathOptInterface.NodeCount) at JuMP.jl:600
top-level scope at none:0

I note that, the command for CPU time

time = MOI.get(modelo, MOI.SolveTime())

works very well.
Could anyone help me please to get this important output of my problem?

This seems to be a bug in the CPLEX wrapper. The CPLEX wrapper is being rewritten from scratch in https://github.com/JuliaOpt/CPLEX.jl/pull/250/files ans NodeCount seems to be implemented there. It’s still a WIP but you can try it out if you’re feeling adventurous.