11using SimplexTableaux, SimpleDrawing, Plots, SimpleDrawingObjects, Clines
22
33"""
4- dog_food()
4+ dog_food()
55
66A,b,c for chapter 3 dogfood problem
77"""
@@ -13,7 +13,7 @@ function dog_food()
1313end
1414
1515"""
16- peanut_butter()
16+ peanut_butter()
1717
1818A,b,c for peanut butter manufacturing problem in chapter 3
1919"""
@@ -25,7 +25,7 @@ function peanut_butter()
2525end
2626
2727"""
28- fishkind4()
28+ fishkind4()
2929
3030DEF's example for chapter 4.
3131"""
@@ -37,7 +37,7 @@ function fishkind4()
3737end
3838
3939"""
40- fishkind400()
40+ fishkind400()
4141
4242An example that fails the big-M method for small M.
4343"""
@@ -49,7 +49,7 @@ function fishkind400()
4949end
5050
5151"""
52- small_example()
52+ small_example()
5353
5454Small example for section 4.4
5555"""
@@ -217,4 +217,28 @@ function phase_one_trouble()
217217 return Tableau(A, b, c, false )
218218end
219219
220+ """
221+ dual_infeasible()
222+
223+ Return an LP that is infeasible and whose dual is infeasible.
224+ """
225+ function dual_infeasible()
226+ A = [- 1 - 2 0 0 ; - 3 - 4 0 0 ; 0 0 1 2 ; 0 0 3 4 ]
227+ b = [2 , 2 , 4 , 5 ]
228+ c = [2 , 3 , - 4 , - 7 ]
229+ return Tableau(A, b, c)
230+ end
231+
232+ """
233+ small_dual_infeasible()
234+
235+ Return an LP that is infeasible and whose dual is infeasible.
236+ """
237+ function small_dual_infeasible()
238+ A = [- 1 0 ; 0 1 ]
239+ b = [1 , 1 ]
240+ c = [1 , - 1 ]
241+ return Tableau(A, b, c)
242+ end
243+
220244nothing
0 commit comments