Skip to content

Commit 2dadbbd

Browse files
committed
Update
1 parent a3641ea commit 2dadbbd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/algorithms/DominguezRios.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,9 @@ function test_lp()
158158
end
159159
MOI.set(model, MOA.Algorithm(), MOA.DominguezRios())
160160
MOI.set(model, MOI.Silent(), true)
161-
x1 = MOI.add_variable(model)
162-
x2 = MOI.add_variable(model)
163-
MOI.add_constraint(model, x1, MOI.GreaterThan(0.0))
164-
MOI.add_constraint(model, x2, MOI.Interval(0.0, 3.0))
161+
x = MOI.add_variables(model, 2)
162+
MOI.add_constraint(model, x[1], MOI.GreaterThan(0.0))
163+
MOI.add_constraint(model, x[2], MOI.Interval(0.0, 3.0))
165164
C = Float64[
166165
3 1
167166
-1 -2
@@ -173,7 +172,7 @@ function test_lp()
173172
],
174173
fill(0.0, 2),
175174
)
176-
MOI.add_constraint(model, 3.0 * x1 - 1.0 * x2, MOI.LessThan(6.0))
175+
MOI.add_constraint(model, 3.0 * x[1] - 1.0 * x[2], MOI.LessThan(6.0))
177176
MOI.set(model, MOA.Algorithm(), MOA.DominguezRios())
178177
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
179178
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)

0 commit comments

Comments
 (0)