File tree Expand file tree Collapse file tree 4 files changed +30
-2
lines changed
Expand file tree Collapse file tree 4 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1- ### 0.2.9 (Upcoming Release)
1+ ### 0.2.10 (Upcoming Release)
2+
3+
4+ ### 0.2.9
25
36- Fix documentation of simplex
47- Add tests for Simplex
8+ - Add unbounded problem check for the Simplex routines.
59
610
711### 0.2.8
Original file line number Diff line number Diff line change 11name = " OperationsResearchModels"
22uuid = " 8042aa49-e599-49ec-a8f7-b5b80cc82a88"
33authors = [" Mehmet Hakan Satman <mhsatman@gmail.com>" ]
4- version = " 0.2.8 "
4+ version = " 0.2.9 "
55
66[deps ]
77HiGHS = " 87dc4568-4c63-4d18-b0c0-bb2238e4078b"
Original file line number Diff line number Diff line change @@ -407,6 +407,11 @@ function singleiteration!(s::SimplexProblem)
407407 end
408408
409409 exitingvariableindex = getexitingvariableindex (s, enteringvariableindex)
410+
411+ if isnothing (exitingvariableindex)
412+ error (" Can not find exiting variable index. The problem is unbounded. Did you forget to add constraints?" )
413+ end
414+
410415 rowindex = s. basicvariableindex[exitingvariableindex]
411416
412417 update! (s, enteringvariableindex, rowindex)
Original file line number Diff line number Diff line change 216216 end
217217
218218
219+ @testset " Unbounded Problem - Should throw an error" begin
220+
221+ # Maximize z = 3x + 4y
222+ # subject to
223+ # x + 2y >= 100
224+ # 3x + y >= 200
225+ # x, y >= 0
226+
227+ problem = createsimplexproblem (
228+ Float64[3 , 4 ],
229+ Float64[1 2 ; 3 1 ],
230+ Float64[100 , 200 ],
231+ [GE, GE],
232+ Maximize)
233+
234+
235+ @test_throws ErrorException solve! (problem)
236+
237+ end
219238
220239end # end of test set Simplex
You can’t perform that action at this time.
0 commit comments