Exemplo n.º 1
0
        public Dictionary <EdgePair, Double> Solve(FCTPGraph graph)
        {
            Dictionary <EdgePair, Double> ep = new Dictionary <EdgePair, Double>();

            ep = solver.Solve(graph);
            return(ep);
        }
Exemplo n.º 2
0
        /**
         * Use an external solver to compute the flows based on the transportation
         * problem
         */
        private Dictionary <EdgePair, Double> solveTP(Dictionary <EdgePair, Double> values)
        {
            List <Edge> edges = makeEdgesFromBids(values);
            FCTPGraph   Gcap  = new FCTPGraph(G.Name);

            Gcap.AddAllSources(G.Sources);
            Gcap.AddAllSinks(G.Sinks);
            Gcap.AddAllEdges(edges);
            Dictionary <EdgePair, Double> flow = solver.Solve(Gcap);

            return(flow);
        }