Ejemplo n.º 1
0
        private static void TSPIterativeBitMaskTestMethod()
        {
            int[,] adjmatrix = new int[, ] {
                { 0, 20, 42 },
                { 20, 0, 30 },
                { 42, 30, 0 }
            };
            TSPIterativeBitMask <int> tsp = new TSPIterativeBitMask <int>(adjmatrix);


            //LoadGraph loader = new LoadGraph();
            //double[,] adjmatrix = loader.LoadAdjacencyMatrixGraph(@"data\tsp.txt");

            //TSPIterativeBitMask<double> tsp = new TSPIterativeBitMask<double>(adjmatrix);
            Console.WriteLine(tsp.tsp());
        }
Ejemplo n.º 2
0
        private static void TSPDynamicPrgTestMethod()
        {
            //double[,] adjmatrix = new double[,]{
            //    {0,20,42},
            //     {20,0,30},
            //      {42,30,0}

            //};
            LoadGraph loader = new LoadGraph();

            double[,] adjmatrix = loader.LoadAdjacencyMatrixGraph(@"data\tsp.txt");

            TSPIterativeBitMask <double> tsp = new TSPIterativeBitMask <double>(adjmatrix);

            TSPDynamicPrg obj = new TSPDynamicPrg(adjmatrix);

            Console.WriteLine(obj.tsp());
        }