From ce5b95d62c5254dc07239bda732211cecdeb51ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 9 Mar 2021 09:18:05 +0100 Subject: [PATCH] Concrete optimizer type in CachingOptimizer --- src/optimizer_interface.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/optimizer_interface.jl b/src/optimizer_interface.jl index f7c6a01fd21..8a623f037b8 100644 --- a/src/optimizer_interface.jl +++ b/src/optimizer_interface.jl @@ -107,7 +107,14 @@ function set_optimizer(model::Model, optimizer_constructor; else optimizer = MOI.instantiate(optimizer_constructor) end - MOIU.reset_optimizer(model, optimizer) + model.moi_backend = MOIU.CachingOptimizer( + model.moi_backend.model_cache, + optimizer, + MOIU.EMPTY_OPTIMIZER, + MOIU.AUTOMATIC, + MOIU.IndexMap(), + MOIU.IndexMap(), + ) end # Deprecation for JuMP v0.18 -> JuMP v0.19 transition