We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3641ea commit 2dadbbdCopy full SHA for 2dadbbd
test/algorithms/DominguezRios.jl
@@ -158,10 +158,9 @@ function test_lp()
158
end
159
MOI.set(model, MOA.Algorithm(), MOA.DominguezRios())
160
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))
+ x = MOI.add_variables(model, 2)
+ MOI.add_constraint(model, x[1], MOI.GreaterThan(0.0))
+ MOI.add_constraint(model, x[2], MOI.Interval(0.0, 3.0))
165
C = Float64[
166
3 1
167
-1 -2
@@ -173,7 +172,7 @@ function test_lp()
173
172
],
174
fill(0.0, 2),
175
)
176
- MOI.add_constraint(model, 3.0 * x1 - 1.0 * x2, MOI.LessThan(6.0))
+ MOI.add_constraint(model, 3.0 * x[1] - 1.0 * x[2], MOI.LessThan(6.0))
177
178
MOI.set(model, MOI.ObjectiveSense(), MOI.MIN_SENSE)
179
MOI.set(model, MOI.ObjectiveFunction{typeof(f)}(), f)
0 commit comments