Thanks for the reply.
using julia 1.2 and tried to set time limit as
set_optimizer_attribute(model2, "bonmin.time_limit", 100)
but get the below error log
ERROR: LoadError: MathOptInterface.UnsupportedAttribute{MathOptInterface.RawParameter}: Attribute MathOptInterface.RawParameter("bonmin.time_limit") is not supported by the model.
Stacktrace:
[1] #throw_set_error_fallback#14(::MathOptInterface.SetAttributeNotAllowed{MathOptInterface.RawParameter}, ::typeof(MathOptInterface.throw_set_error_fallback), ::AmplNLWriter.Model{Float64},
::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\MathOptInterface\ZJFKw\src\attributes.jl:387
[2] throw_set_error_fallback(::AmplNLWriter.Model{Float64}, ::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\MathOptInterface\ZJFKw\src\attributes.jl:384
[3] set(::AmplNLWriter.Model{Float64}, ::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\MathOptInterface\ZJFKw\src\attributes.jl:373
[4] set(::MathOptInterface.Bridges.LazyBridgeOptimizer{AmplNLWriter.Model{Float64}}, ::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\MathOptInterface\ZJFKw\src\Bridges\bridge_optimizer.jl:621
[5] set(::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.AbstractOptimizer,MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, ::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\MathOptInterface\ZJFKw\src\Utilities\cachingoptimizer.jl:665
[6] set(::Model, ::MathOptInterface.RawParameter, ::Int64) at C:\Users\manojkumar.ram\.julia\packages\JuMP\y5vgk\src\JuMP.jl:991``
I meant the latest release of AmplNLWriter. You want version 0.7. I rewrote the latest version, so it is now much faster and better supported. There is no reason to stick with the old version.
My main code is based on 1.2 can’t change it now
Code you write in Julia 1.2 will still work in Julia 1.6. You should also update to the latest Julia version. The latest release is much faster.
Is there any other way to do it.
If you stick with the old version of AmplNLWriter, which I don’t recommend, you can use
model = Model() do
AmplNLWriter.Optimizer("path/to/bonmin", ["bonmin.time_limit=100"])
end