You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the code, it computes the correct optimal solution, but then I get the error when querying the objective value. The code works fine when using Ipopt, so I'm not sure if this is an issue with JuMP or with CPLEX.jl
Status: OPTIMAL
(x,y)=2.9999999996524593 -2.0000000000011937
ERROR: LoadError: type ObjectiveValue has no field resultindex
Stacktrace:
[1] getproperty(::Any, ::Symbol) at ./Base.jl:20
[2] get(::CPLEX.Optimizer, ::MathOptInterface.ObjectiveValue) at /homes/bcdandurand/.julia/packages/LinQuadOptInterface/ZMx9f/src/solve.jl:107
[3] get(::MathOptInterface.Bridges.LazyBridgeOptimizer{CPLEX.Optimizer}, ::MathOptInterface.ObjectiveValue) at /homes/bcdandurand/.julia/packages/MathOptInterface/016Ol/src/Bridges/bridge_optimizer.jl:444
[4] get(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, ::MathOptInterface.ObjectiveValue) at /homes/bcdandurand/.julia/packages/MathOptInterface/016Ol/src/Utilities/cachingoptimizer.jl:449
[5] _moi_get_result(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, ::MathOptInterface.ObjectiveValue) at /homes/bcdandurand/.julia/packages/JuMP/iGamg/src/JuMP.jl:605
[6] get(::Model, ::MathOptInterface.ObjectiveValue) at /homes/bcdandurand/.julia/packages/JuMP/iGamg/src/JuMP.jl:618
[7] objective_value(::Model) at /homes/bcdandurand/.julia/packages/JuMP/iGamg/src/objective.jl:25
[8] top-level scope at /nfs2/bcdandurand/OPF-VID/test_opt.jl:14
[9] include at ./boot.jl:328 [inlined]
[10] include_relative(::Module, ::String) at ./loading.jl:1094
[11] include(::Module, ::String) at ./Base.jl:31
[12] exec_options(::Base.JLOptions) at ./client.jl:295
[13] _start() at ./client.jl:464
in expression starting at /nfs2/bcdandurand/OPF-VID/test_opt.jl:14
The text was updated successfully, but these errors were encountered:
CPLEX has not been updated to MOI v0.9 yet, which is the version of the interface used by JuMP, it is currently been updated here: jump-dev/CPLEX.jl#250
I'm using the current version of JuMP, v0.20.0
I have the following simple code snippet where both CPLEX and Ipopt can be used:
When I run the code, it computes the correct optimal solution, but then I get the error when querying the objective value. The code works fine when using Ipopt, so I'm not sure if this is an issue with JuMP or with CPLEX.jl
The text was updated successfully, but these errors were encountered: