[pgrouting-users] possible bug in pgr_maxFlowPushRelabel

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[pgrouting-users] possible bug in pgr_maxFlowPushRelabel

davep
I was just looking at Many to one version, the example reads
SELECT * FROM pgr_maxFlowPushRelabel(
    'SELECT id,
            source,
            target,
            c1.capacity as capacity,
            c2.capacity as reverse_capacity
    FROM edge_table JOIN categories AS c1 USING(category_id), categories AS c2
    WHERE edge_table.reverse_category_id = c2.category_id
    ORDER BY id'
    , ARRAY[6, 8, 12], 11
);
ie get the max flow from nodes 6 8 and 12 to 11
The listed result sets says  
 seq | edge_id | source | target | flow | residual_capacity 
-----+---------+--------+--------+------+-------------------
   1 |      10 |      5 |     10 |  100 |                30
   2 |       8 |      6 |      5 |  100 |                30
   3 |      11 |      6 |     11 |  130 |                 0
   4 |      12 |     10 |     11 |  100 |                 0
   5 |      13 |     12 |     11 |   50 |                 0
The results list includes reference from 6 and 12 BUT NOTHING from 8

if I remove the ORDER BY id clause I get 

 seq | edge_id | source | target | flow | residual_capacity 
-----+---------+--------+--------+------+-------------------
   1 |      10 |      5 |     10 |  100 |                30
   2 |      11 |      6 |     11 |  130 |                 0
   3 |       8 |      6 |      5 |   50 |                80
   4 |       7 |      8 |      5 |   50 |                 0
   5 |      12 |     10 |     11 |  100 |                 0
   6 |      13 |     12 |     11 |   50 |                 0
ie the result for node 8 is included, is the order by a requirment? is this a bug ?
regards

Dave.

_______________________________________________
Pgrouting-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pgrouting-users