Opened 15 years ago
Closed 15 years ago
#347 closed enhancement (done)
Computing the total flow cost in DIMACS solver
Reported by: | Peter Kovacs | Owned by: | Peter Kovacs |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.2 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
The DIMACS solver tool is usually tested by users who would like to get initial information about the performance of LEMON. "Bad results" were reported sometimes for min. cost flow problems. These were overflow problems (using int
, the default value type) but just when the total flow cost is calculated, not in the algorithm itself. Of course, the used number type can be changed with command line arguments, but it is not clear for the users that this might be the problem. On the other hand, using e.g. long long
instead of int
makes the algorihtm slower although it would not be necessary.
However, the min cost flow solvers provide a template variant of totalCost()
. The attached patch calls this template function with long long
if the values type is int
. This avoids such overflow problems and so helps making the initial impressions of some users better.
Attachments (1)
Change History (5)
Changed 15 years ago by
Attachment: | 347-9d380bf27194.patch added |
---|
comment:1 follow-up: 4 Changed 15 years ago by
Status: | new → assigned |
---|
comment:2 follow-up: 3 Changed 15 years ago by
Btw. why do we use cerr
instead of cout
to report the results in the dimacs solver?
comment:3 Changed 15 years ago by
Replying to kpeter:
Btw. why do we use
cerr
instead ofcout
to report the results in the dimacs solver?
Probably because the solver may also want to output the solution, which could go to stdout bu default. I'm not sure if it really makes sense.
comment:4 Changed 15 years ago by
Resolution: | → done |
---|---|
Status: | assigned → closed |
See the patch [9d380bf27194] attached.