using JuMP, HiGHS
import ParametricOptInterface as POI
model = Model(() -> POI.Optimizer(HiGHS.Optimizer()))
get_attribute(model, MOI.RawOptimizerAttribute("presolve"))
with this error:
ERROR: MathOptInterface.GetAttributeNotAllowed{MathOptInterface.RawOptimizerAttribute}: Getting attribute MathOptInterface.RawOptimizerAttribute("presolve") cannot be performed: ParametricOptInterface.Optimizer{Float64, HiGHS.Optimizer} does not support getting the attribute MathOptInterface.RawOptimizerAttribute("presolve"). You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.
Stacktrace:
[1] get_fallback(model::ParametricOptInterface.Optimizer{Float64, HiGHS.Optimizer}, attr::MathOptInterface.RawOptimizerAttribute)
@ MathOptInterface ~/.julia/packages/MathOptInterface/pgWRA/src/attributes.jl:406
[2] get(::ParametricOptInterface.Optimizer{Float64, HiGHS.Optimizer}, ::MathOptInterface.RawOptimizerAttribute)
@ MathOptInterface ~/.julia/packages/MathOptInterface/pgWRA/src/attributes.jl:390
[3] get(b::MathOptInterface.Bridges.LazyBridgeOptimizer{ParametricOptInterface.Optimizer{Float64, HiGHS.Optimizer}}, attr::MathOptInterface.RawOptimizerAttribute)
@ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/pgWRA/src/Bridges/bridge_optimizer.jl:893
[4] get(model::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{ParametricOptInterface.Optimizer{Float64, HiGHS.Optimizer}}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}}, attr::MathOptInterface.RawOptimizerAttribute)
@ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/pgWRA/src/Utilities/cachingoptimizer.jl:1068
[5] get(model::Model, attr::MathOptInterface.RawOptimizerAttribute)
@ JuMP ~/.julia/packages/JuMP/ToPd2/src/optimizer_interface.jl:630
[6] top-level scope
@ ~/path/to/julia/file.jl:85
which also makes the pre-2.0 get_optimizer_attribute(model, "presolve") fail, and - as far as I understand - comes from a missing implementation for something like this:
The following currently fails
with this error:
which also makes the pre-2.0
get_optimizer_attribute(model, "presolve")
fail, and - as far as I understand - comes from a missing implementation for something like this:Unfortunately I don't really understand the specifics good enough to open a PR :disappointed: