demo/digraph.lgf
author Peter Kovacs <kpeter@inf.elte.hu>
Wed, 29 Apr 2009 03:15:24 +0200
changeset 640 6c408d864fa1
permissions -rw-r--r--
Support negative costs and bounds in NetworkSimplex (#270)

* The interface is reworked to support negative costs and bounds.
- ProblemType and problemType() are renamed to
SupplyType and supplyType(), see also #234.
- ProblemType type is introduced similarly to the LP interface.
- 'bool run()' is replaced by 'ProblemType run()' to handle
unbounded problem instances, as well.
- Add INF public member constant similarly to the LP interface.
* Remove capacityMap() and boundMaps(), see also #266.
* Update the problem definition in the MCF module.
* Remove the usage of Circulation (and adaptors) for checking feasibility.
Check feasibility by examining the artifical arcs instead (after solving
the problem).
* Additional check for unbounded negative cycles found during the
algorithm (it is possible now, since negative costs are allowed).
* Fix in the constructor (the value types needn't be integer any more),
see also #254.
* Improve and extend the doc.
* Rework the test file and add test cases for negative costs and bounds.
     1 @nodes
     2 label
     3 0
     4 1
     5 2
     6 3
     7 4
     8 5
     9 6
    10 7
    11 @arcs
    12 		label capacity
    13 0 	1 	0  	  16
    14 0 	2 	1 	  12
    15 0 	3 	2 	  20
    16 1 	2 	3 	  10
    17 1 	4 	4 	  10
    18 1 	5 	5 	  13
    19 2 	3 	6 	  10
    20 2 	4 	7 	  8
    21 2 	6 	8 	  8
    22 5 	3 	9 	  20
    23 3 	6 	10 	  25
    24 4 	7 	11 	  15
    25 5 	7 	12 	  15
    26 6 	7 	13 	  18
    27 @attributes
    28 source 0
    29 target 7