Hi Jeremy,

The graph data I uses is the same as the one in ~\BGL\boost_1_25_1\libs\graph\example\max_flow.dat. The data is packaged as a TclTk list
like the following:
 set a  {{0 20 20 0 0 0 3 0}  {20 0 0 20 0 1 0 0}  {20 0 0 20 4 0 0 0}  {0 20 20 0 0 0 0 5}  {0 0 0 0 0 20 20 0}  {0 0 0 0 20 0 0 20}  {0 0 0 0 20 0 0 20}  {0 0 0 0 0 20 20
                0}  }

I have a TclTk script to read in and parse the data and pass it to graph library. Enclosed is the code that sets up the graph class and calls the
"push_relabel_max_flow" function.  Am I missing something ?

Thanks for your help.

Yihung







Jeremy Siek <jsiek@osl.iu.edu>
Sent by: boost-bounces@lists.boost.org

07/10/2002 12:33 PM
Please respond to boost

       
        To:        boost@lists.boost.org
        cc:        (bcc: Yihung Chen/CLE/MS/PHILIPS)
        Subject:        Re: [boost] maximum Flow runtime error

        Classification:        




Hi Yihung,

Could you send the data file so I can try to reproduce the error.

Thanks,
Jeremy

On Tue, 9 Jul 2002 yihung.chen@philips.com wrote:

yihung> Hi,
yihung>
yihung>  I try to use  "edmunds_karp_max_flow" and "push_relabel_max_flow"
yihung> routines in my applicaton. Both routines receives the same set of
yihung> parameters (g, src, sink, cap, res, rev) which is similar to the examples in  edmunds-karp-eg.cpp and push-relabel-eg.cpp.  The edmunds_karp_max_flow routine run through and output correct result.
yihung> But  the push_relabel_max_flow ran into an error as follows:
yihung>
yihung> Unhandled exception in test.exe: 0xC00000005: Access violation.
yihung>
yihung> VS debugger points to the eigth line
yihung>
yihung>      FlowValue maximum_preflow()
yihung>       {
yihung>         work_since_last_update = 0;
yihung>
yihung>         while (max_active >= min_active) { // "main" loop
yihung>
yihung>           Layer& layer = layers[max_active];
yihung> ---->  list_iterator u_iter = layer.active_vertices.begin();
yihung>
yihung>           if (u_iter == layer.active_vertices.end())
yihung>             --max_active;
yihung>           else {
yihung>             vertex_descriptor u = *u_iter;
yihung>             remove_from_active_list(u);
yihung>
yihung>             discharge(u);
yihung>
yihung>             if (work_since_last_update * global_update_frequency() > nm) {
yihung>               global_distance_update();
yihung>               work_since_last_update = 0;
yihung>             }
yihung>           }
yihung>         } // while (max_active >= min_active)
yihung>
yihung>         return excess_flow[sink];
yihung>       } // maximum_preflow()
yihung>
yihung>
yihung>
yihung> Can anyone give me some advice on this. Thanks.
yihung>
yihung>
yihung> Yihung Chen
yihung>

----------------------------------------------------------------------
Jeremy Siek                          http://php.indiana.edu/~jsiek/
Ph.D. Student, Indiana Univ. B'ton   email: jsiek@osl.iu.edu
C++ Booster (http://www.boost.org)   office phone: (812) 855-3608
----------------------------------------------------------------------


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost