File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -161,23 +161,14 @@ function test_lp()
161161 x = MOI. add_variables (model, 2 )
162162 MOI. add_constraint (model, x[1 ], MOI. GreaterThan (0.0 ))
163163 MOI. add_constraint (model, x[2 ], MOI. Interval (0.0 , 3.0 ))
164- C = Float64[
165- 3 1
166- - 1 - 2
167- ]
168- f = MOI. VectorAffineFunction (
169- [
170- MOI. VectorAffineTerm (i, MOI. ScalarAffineTerm (C[i, j], x[j])) for
171- i in 1 : 2 for j in 1 : 2
172- ],
173- fill (0.0 , 2 ),
174- )
175164 MOI. add_constraint (model, 3.0 * x[1 ] - 1.0 * x[2 ], MOI. LessThan (6.0 ))
176- MOI. set (model, MOA. Algorithm (), MOA. DominguezRios ())
177165 MOI. set (model, MOI. ObjectiveSense (), MOI. MIN_SENSE)
166+ f = MOI. Utilities. vectorize ([3.0 1.0 ; - 1.0 - 2.0 ] * x)
178167 MOI. set (model, MOI. ObjectiveFunction {typeof(f)} (), f)
179168 MOI. optimize! (model)
180169 @test MOI. get (model, MOI. TerminationStatus ()) == MOI. OPTIMAL
170+ @test MOI. get (model, MOI. ResultCount ()) > 1
171+ return
181172end
182173
183174end # module TestDominguezRios
You can’t perform that action at this time.
0 commit comments