JuMP/CPLEX: problems with submitting heuristic solution

Hi everyone,
I try to submit a solution extracted from a second model to the main model while encountering such error, any idea?

Is there a way to get the CPLEX.Optimizer object from a Model object?

Regards,
Ryao

ERROR: LoadError: MethodError: no method matching submit(::Model, ::MathOptInterface.HeuristicSolution{CPLEX.CallbackContext}, ::Array{MathOptInterface.VariableIndex,1}, ::Array{Float64,1})
Closest candidates are:
  submit(::CPLEX.Optimizer, ::MathOptInterface.HeuristicSolution{CPLEX.CallbackContext}, ::Array{MathOptInterface.VariableIndex,1}, ::Array{Float64,1}) at /home/rax/.julia/packages/CPLEX/tHfWT/src/MOI/MOI_callbacks.jl:315
  submit(::MathOptInterface.Utilities.MockOptimizer, ::MathOptInterface.AbstractSubmittable, ::Any...) at /home/rax/.julia/packages/MathOptInterface/ZJFKw/src/Utilities/mockoptimizer.jl:528
  submit(::MathOptInterface.Utilities.CachingOptimizer, ::MathOptInterface.AbstractSubmittable, ::Any...) at /home/rax/.julia/packages/MathOptInterface/ZJFKw/src/Utilities/cachingoptimizer.jl:763

Please provide a reproducible example. You seem to be mixing JuMP models and MOI variables.

Here is the documentation: Callbacks · JuMP

1 Like