@@ -92,6 +92,8 @@ function test_only_bounds()
9292 JuMP. index (LowerBoundRef (x)),
9393 1.0 ,
9494 )
95+ @test ModelAnalyzer. constraint (ret[], model) == LowerBoundRef (x)
96+ @test ModelAnalyzer. value (ret[]) == 1.0
9597 ret = ModelAnalyzer. list_of_issues (
9698 data,
9799 ModelAnalyzer. Feasibility. ComplemetarityViolation,
@@ -100,11 +102,14 @@ function test_only_bounds()
100102 JuMP. index (LowerBoundRef (x)),
101103 - 1.0 ,
102104 )
105+ @test ModelAnalyzer. constraint (ret[], model) == LowerBoundRef (x)
106+ @test ModelAnalyzer. value (ret[]) == - 1.0
103107 ret = ModelAnalyzer. list_of_issues (
104108 data,
105109 ModelAnalyzer. Feasibility. PrimalDualMismatch,
106110 )
107111 @test ret[] == ModelAnalyzer. Feasibility. PrimalDualMismatch (- 1.0 , 0.0 )
112+ # @test ModelAnalyzer.values(ret[]) == [-1.0, 0.0]
108113
109114 data = ModelAnalyzer. analyze (
110115 ModelAnalyzer. Feasibility. Analyzer (),
@@ -125,6 +130,8 @@ function test_only_bounds()
125130 JuMP. index (LowerBoundRef (x)),
126131 1.0 ,
127132 )
133+ @test ModelAnalyzer. constraint (ret[], model) == LowerBoundRef (x)
134+ @test ModelAnalyzer. value (ret[]) == 1.0
128135 ret = ModelAnalyzer. list_of_issues (
129136 data,
130137 ModelAnalyzer. Feasibility. PrimalDualMismatch,
@@ -150,6 +157,8 @@ function test_only_bounds()
150157 )
151158 @test ret[] ==
152159 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 2.0 )
160+ @test ModelAnalyzer. variable (ret[], model) == x
161+ @test ModelAnalyzer. value (ret[]) == 2.0
153162 ret = ModelAnalyzer. list_of_issues (
154163 data,
155164 ModelAnalyzer. Feasibility. DualConstrainedVariableViolation,
@@ -158,6 +167,8 @@ function test_only_bounds()
158167 JuMP. index (LowerBoundRef (x)),
159168 1.0 ,
160169 )
170+ @test ModelAnalyzer. constraint (ret[], model) == LowerBoundRef (x)
171+ @test ModelAnalyzer. value (ret[]) == 1.0
161172 ret = ModelAnalyzer. list_of_issues (
162173 data,
163174 ModelAnalyzer. Feasibility. ComplemetarityViolation,
@@ -166,6 +177,8 @@ function test_only_bounds()
166177 JuMP. index (LowerBoundRef (x)),
167178 - 1.0 ,
168179 )
180+ @test ModelAnalyzer. constraint (ret[], model) == LowerBoundRef (x)
181+ @test ModelAnalyzer. value (ret[]) == - 1.0
169182 ret = ModelAnalyzer. list_of_issues (
170183 data,
171184 ModelAnalyzer. Feasibility. PrimalDualMismatch,
@@ -213,12 +226,16 @@ function test_no_lb()
213226 ModelAnalyzer. Feasibility. PrimalViolation,
214227 )
215228 @test ret[] == ModelAnalyzer. Feasibility. PrimalViolation (JuMP. index (c), 1.0 )
229+ @test ModelAnalyzer. constraint (ret[], model) == c
230+ @test ModelAnalyzer. value (ret[]) == 1.0
216231 ret = ModelAnalyzer. list_of_issues (
217232 data,
218233 ModelAnalyzer. Feasibility. ComplemetarityViolation,
219234 )
220235 @test ret[] ==
221236 ModelAnalyzer. Feasibility. ComplemetarityViolation (JuMP. index (c), - 1.0 )
237+ @test ModelAnalyzer. constraint (ret[], model) == c
238+ @test ModelAnalyzer. value (ret[]) == - 1.0
222239 ret = ModelAnalyzer. list_of_issues (
223240 data,
224241 ModelAnalyzer. Feasibility. PrimalDualMismatch,
@@ -242,6 +259,8 @@ function test_no_lb()
242259 )
243260 @test ret[] ==
244261 ModelAnalyzer. Feasibility. ComplemetarityViolation (JuMP. index (c), 1.0 )
262+ @test ModelAnalyzer. constraint (ret[], model) == c
263+ @test ModelAnalyzer. value (ret[]) == 1.0
245264 ret = ModelAnalyzer. list_of_issues (
246265 data,
247266 ModelAnalyzer. Feasibility. PrimalDualMismatch,
@@ -267,6 +286,8 @@ function test_no_lb()
267286 )
268287 @test ret[] ==
269288 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 2.0 )
289+ @test ModelAnalyzer. variable (ret[], model) == x
290+ @test ModelAnalyzer. value (ret[]) == 2.0
270291 ret = ModelAnalyzer. list_of_issues (
271292 data,
272293 ModelAnalyzer. Feasibility. DualConstrainedVariableViolation,
@@ -275,12 +296,16 @@ function test_no_lb()
275296 JuMP. index (c),
276297 1.0 ,
277298 )
299+ @test ModelAnalyzer. constraint (ret[], model) == c
300+ @test ModelAnalyzer. value (ret[]) == 1.0
278301 ret = ModelAnalyzer. list_of_issues (
279302 data,
280303 ModelAnalyzer. Feasibility. ComplemetarityViolation,
281304 )
282305 @test ret[] ==
283306 ModelAnalyzer. Feasibility. ComplemetarityViolation (JuMP. index (c), - 1.0 )
307+ @test ModelAnalyzer. constraint (ret[], model) == c
308+ @test ModelAnalyzer. value (ret[]) == - 1.0
284309 ret = ModelAnalyzer. list_of_issues (
285310 data,
286311 ModelAnalyzer. Feasibility. PrimalDualMismatch,
@@ -329,6 +354,8 @@ function test_lb0()
329354 )
330355 @test ret[] ==
331356 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 2.3 )
357+ @test ModelAnalyzer. variable (ret[], model) == x
358+ @test ModelAnalyzer. value (ret[]) == 2.3
332359
333360 data = ModelAnalyzer. analyze (
334361 ModelAnalyzer. Feasibility. Analyzer (),
@@ -351,6 +378,8 @@ function test_lb0()
351378 )
352379 @test ret[] ==
353380 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 4.3 )
381+ @test ModelAnalyzer. variable (ret[], model) == x
382+ @test ModelAnalyzer. value (ret[]) == 4.3
354383 ret = ModelAnalyzer. list_of_issues (
355384 data,
356385 ModelAnalyzer. Feasibility. DualConstrainedVariableViolation,
@@ -359,6 +388,9 @@ function test_lb0()
359388 JuMP. index (c),
360389 3.3 ,
361390 )
391+ @test ModelAnalyzer. constraint (ret[], model) == c
392+ @test ModelAnalyzer. value (ret[]) == 3.3
393+ return
362394end
363395
364396function test_lb2 ()
@@ -398,6 +430,8 @@ function test_lb2()
398430 )
399431 @test ret[] ==
400432 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 2.3 )
433+ @test ModelAnalyzer. variable (ret[], model) == x
434+ @test ModelAnalyzer. value (ret[]) == 2.3
401435
402436 data = ModelAnalyzer. analyze (
403437 ModelAnalyzer. Feasibility. Analyzer (),
@@ -422,6 +456,8 @@ function test_lb2()
422456 JuMP. index (c),
423457 3.3 ,
424458 )
459+ @test ModelAnalyzer. constraint (ret[], model) == c
460+ @test ModelAnalyzer. value (ret[]) == 3.3
425461
426462 data = ModelAnalyzer. analyze (
427463 ModelAnalyzer. Feasibility. Analyzer (),
@@ -446,10 +482,14 @@ function test_lb2()
446482 JuMP. index (c),
447483 3.3 ,
448484 )
485+ @test ModelAnalyzer. constraint (ret[1 ], model) == c
486+ @test ModelAnalyzer. value (ret[1 ]) == 3.3
449487 @test ret[2 ] == ModelAnalyzer. Feasibility. DualConstrainedVariableViolation (
450488 JuMP. index (LowerBoundRef (x)),
451489 1.0 ,
452490 )
491+ @test ModelAnalyzer. constraint (ret[2 ], model) == LowerBoundRef (x)
492+ @test ModelAnalyzer. value (ret[2 ]) == 1.0
453493
454494 data = ModelAnalyzer. analyze (
455495 ModelAnalyzer. Feasibility. Analyzer (),
@@ -470,6 +510,8 @@ function test_lb2()
470510 JuMP. index (c),
471511 3.3 ,
472512 )
513+ @test ModelAnalyzer. constraint (ret[], model) == c
514+ @test ModelAnalyzer. value (ret[]) == 3.3
473515 return
474516end
475517
@@ -613,6 +655,8 @@ function test_analyse_no_opt()
613655 @test length (list) == 1
614656 ret = ModelAnalyzer. list_of_issues (data, list[1 ])
615657 @test ret[] == ModelAnalyzer. Feasibility. PrimalViolation (JuMP. index (c), 1.0 )
658+ @test ModelAnalyzer. constraint (ret[], model) == c
659+ @test ModelAnalyzer. value (ret[]) == 1.0
616660
617661 data = ModelAnalyzer. analyze (
618662 ModelAnalyzer. Feasibility. Analyzer (),
@@ -625,6 +669,8 @@ function test_analyse_no_opt()
625669 ret = ModelAnalyzer. list_of_issues (data, list[1 ])
626670 @test ret[1 ] ==
627671 ModelAnalyzer. Feasibility. ComplemetarityViolation (JuMP. index (c), 1.0 )
672+ @test ModelAnalyzer. constraint (ret[1 ], model) == c
673+ @test ModelAnalyzer. value (ret[1 ]) == 1.0
628674 ret = ModelAnalyzer. list_of_issues (data, list[2 ])
629675 @test ret[1 ] == ModelAnalyzer. Feasibility. PrimalDualMismatch (1.0 , 0.0 )
630676
@@ -648,12 +694,18 @@ function test_analyse_no_opt()
648694 ret = ModelAnalyzer. list_of_issues (data, list[1 ])
649695 @test ret[1 ] ==
650696 ModelAnalyzer. Feasibility. PrimalViolation (JuMP. index (c), 1.0 )
697+ @test ModelAnalyzer. constraint (ret[1 ], model) == c
698+ @test ModelAnalyzer. value (ret[1 ]) == 1.0
651699 ret = ModelAnalyzer. list_of_issues (data, list[2 ])
652700 @test ret[1 ] ==
653701 ModelAnalyzer. Feasibility. DualConstraintViolation (JuMP. index (x), 1.0 )
702+ @test ModelAnalyzer. variable (ret[1 ], model) == x
703+ @test ModelAnalyzer. value (ret[1 ]) == 1.0
654704 ret = ModelAnalyzer. list_of_issues (data, list[3 ])
655705 @test ret[1 ] ==
656706 ModelAnalyzer. Feasibility. ComplemetarityViolation (JuMP. index (c), - 2.0 )
707+ @test ModelAnalyzer. constraint (ret[1 ], model) == c
708+ @test ModelAnalyzer. value (ret[1 ]) == - 2.0
657709 ret = ModelAnalyzer. list_of_issues (data, list[4 ])
658710 @test ret[1 ] == ModelAnalyzer. Feasibility. PrimalDualMismatch (- 1.0 , 0.0 )
659711
0 commit comments