diff --git a/Project.toml b/Project.toml index f92b685..18e3ff0 100644 --- a/Project.toml +++ b/Project.toml @@ -8,7 +8,7 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [compat] -JuMP = "1.13 - 1.22.1" +JuMP = "1.13" MacroTools = "^0.5" MathOptInterface = "^1" julia = "^1.6" diff --git a/src/LinearFractional.jl b/src/LinearFractional.jl index 3899ae3..bf55969 100644 --- a/src/LinearFractional.jl +++ b/src/LinearFractional.jl @@ -189,11 +189,14 @@ end function JuMP.delete(model::LinearFractionalModel, vref::LinearFractionalVariableRef) JuMP.delete(model.model, vref.vref) end + function JuMP.is_valid(model::LinearFractionalModel, vref::LinearFractionalVariableRef) - return (model === vref.model && - is_valid(model.model, vref.vref)) + return model === vref.model && is_valid(model.model, vref) end +function JuMP.is_valid(model::JuMP.GenericModel, vref::LinearFractionalVariableRef) + return is_valid(model, vref.vref) +end # Internal functions