Opened 12 years ago
Closed 11 years ago
#454 closed enhancement (done)
Insufficient checking for feasibility in min cost flow algorithms
Reported by: | Peter Kovacs | Owned by: | Peter Kovacs |
---|---|---|---|
Priority: | minor | Milestone: | LEMON 1.3 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
Pierre Chardaire reported this issue on the lemon-devel mailing list.
Attachments (2)
Change History (8)
Changed 12 years ago by
Attachment: | 454-daa8c50a0371.patch added |
---|
comment:1 follow-up: 2 Changed 12 years ago by
Status: | new → assigned |
---|
comment:2 Changed 12 years ago by
There was a discussion about this issue on the lemon-devel mailing list. The conclusion is that we consider the lower>upper case as an invalid input instead of a valid but infeasible one (similarly to other network flow algorithms), mainly because the Hoffman condition does not work for that. Thus the proposed patch won't be applied.
Other suggestions:
- Make this requirement more visible in the doc.
- Introduce a validity checker function for the min cost flow algorithms, e.g.
if (ns.checkValidity() && ns.run() == NetworkSimplex::OPTIMAL) {...}
. Note that it is not the same as #292, since it would check the validity of the input, not the correctness of the results. This idea would also apply to other algorithms, e.g. Circulation.
comment:3 Changed 12 years ago by
Milestone: | LEMON 1.3 release → LEMON 1.4 release |
---|
comment:4 Changed 12 years ago by
The attached new patch [ee9bac10f58e] uses the LEMON_DEBUG
macro in the min cost flow algorithms to check if lower <= upper holds for each arcs (just like Circulation
class does). Such checkings are disabled by default as they may have performance overhead, but they can be enabled by defining LEMON_ENABLE_DEBUG
. For more information, see the doc.
Changed 12 years ago by
Attachment: | 454-ee9bac10f58e-debug-checking.patch added |
---|
comment:5 Changed 12 years ago by
Milestone: | LEMON 1.4 release → LEMON 1.3 release |
---|---|
Priority: | major → minor |
Type: | defect → enhancement |
comment:6 Changed 11 years ago by
Resolution: | → done |
---|---|
Status: | assigned → closed |
[ee9bac10f58e] has been merged to the main branch
The attached patch [daa8c50a0371] fixes this issue and extends
min_cost_flow_test.cc
with corresponding test cases.