How to use interior point algorithm in GLPK

What param and value to use to set GLPK to use interior point.
via set_optimizer_attribute

Thanks
Manoj

Hi!

[EDIT: I spoke too fast]

By the looks of it, looks like the simplex/interior-point method must be chosen when instantiating the GLPK.Optimizer object.

Thus, you should create the model as

using JuMP
using GLPK

model = Model(() -> GLPK.Optimizer(method=GLPK.INTERIOR))
3 Likes

Thanks

I edited my previous answer, can you check whether this works for you?

Hi Thanks,

I am getting the below errors while solving problem with GLPK with SIMPLEX/Interior.
Any suggestions on how to proceed

LoadError: Result index of attribute MathOptInterface.VariablePrimal(1) out of bounds. There are currently 0 solution(s) in the model.
in expression starting at C:\Users\manojkumar.ram\Dev julia project\Dev julia project\mono_working.jl:475
check_result_index_bounds at attributes.jl:133 [inlined]
get(::GLPK.Optimizer, ::MathOptInterface.VariablePrimal, ::MathOptInterface.VariableIndex) at MOI_wrapper.jl:1667
get(::MathOptInterface.Bridges.LazyBridgeOptimizer{GLPK.Optimizer}, ::MathOptInterface.VariablePrimal, ::MathOptInterface.VariableIndex) at bridge_optimizer.jl:808
get(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, ::MathOptInterface.VariablePrimal, ::MathOptInterface.VariableIndex) at cachingoptimizer.jl:605
_moi_get_result(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, ::MathOptInterface.VariablePrimal, ::Vararg{Any,N} where N) at JuMP.jl:946
get(::Model, ::MathOptInterface.VariablePrimal, ::VariableRef) at JuMP.jl:976
#value#30(::Int64, ::typeof(value), ::VariableRef) at variables.jl:766
value at variables.jl:766 [inlined]
_broadcast_getindex_evalf at broadcast.jl:625 [inlined]
_broadcast_getindex at broadcast.jl:598 [inlined]
getindex at broadcast.jl:558 [inlined]
copy at broadcast.jl:808 [inlined]
materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0},Nothing,typeof(value),Tuple{Base.RefValue{VariableRef}}}) at broadcast.jl:798
top-level scope at mono_working.jl:475'

Can you provide a reproducible example, e.g., following the instructions in this post?

2 Likes