From 5eaa355c4791ca56db442cfa793fb1289fa763e5 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 5 Aug 2025 10:41:16 +1200 Subject: [PATCH] Disable warning in PenaltyRelaxation --- Project.toml | 2 +- src/solver.jl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 08003ed..6cfb1a8 100644 --- a/Project.toml +++ b/Project.toml @@ -6,5 +6,5 @@ version = "0.1.0" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [compat] -MathOptInterface = "1.37.0" +MathOptInterface = "1.42.0" julia = "1.6" diff --git a/src/solver.jl b/src/solver.jl index 6fb5647..952a11e 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -62,8 +62,10 @@ function _elastic_filter(optimizer::Optimizer) base_obj_type = MOI.get(model, MOI.ObjectiveFunctionType()) base_obj_func = MOI.get(model, MOI.ObjectiveFunction{base_obj_type}()) - constraint_to_affine = - MOI.modify(model, MOI.Utilities.PenaltyRelaxation(default = one(T))) + constraint_to_affine = MOI.modify( + model, + MOI.Utilities.PenaltyRelaxation(; default = one(T), warn = false), + ) # all slack variables added are of type ">= 0" # might need to do something related to integers / binary relaxed_obj_type = MOI.get(model, MOI.ObjectiveFunctionType())