Skip to content

Commit

Permalink
Fix duplicated function in test/test_MOI_wrapper.jl (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Mar 11, 2024
1 parent 676aa6b commit 52875fd
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions test/test_MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,11 @@ end

function callback_simple_model()
model = Xpress.Optimizer(;
HEURSTRATEGY = 0, # before v41
PRESOLVE = 0,
CUTSTRATEGY = 0,
HEUREMPHASIS = 0,
HEURSTRATEGY = 0,
SYMMETRY = 0,
OUTPUTLOG = 0,
)
MOI.Utilities.loadfromstring!(
Expand Down Expand Up @@ -1634,30 +1637,6 @@ function test_callback_lazy_constraint_dual_reductions()
return
end

function callback_simple_model()
model = Xpress.Optimizer(;
PRESOLVE = 0,
CUTSTRATEGY = 0,
HEURSTRATEGY = 0,
SYMMETRY = 0,
OUTPUTLOG = 0,
)
MOI.Utilities.loadfromstring!(
model,
"""
variables: x, y
maxobjective: y
c1: x in Integer()
c2: y in Integer()
c3: x in Interval(0.0, 2.5)
c4: y in Interval(0.0, 2.5)
""",
)
x = MOI.get(model, MOI.VariableIndex, "x")
y = MOI.get(model, MOI.VariableIndex, "y")
return model, x, y
end

function test_callback_preintsol()
model, x, y = callback_simple_model()
data = 1.0 * LinearAlgebra.I(3)
Expand Down

0 comments on commit 52875fd

Please sign in to comment.