Beispiel #1
0
 public c2opt(cTSP _tsp, byte _algo, bool _show)
 {
     tsp      = _tsp;
     algo     = _algo;
     showprog = _show;
     i        = j = 0;
     ret      = false;
     n2       = tsp.GetN() - 2;
     n1       = n2 + 1;
     diff     = 0;
     _j       = 0;
 }
Beispiel #2
0
        public Graph(cTSP tsp)
        {
            int  i;
            Node n;

            graph = new List <Node>();
            for (i = 0; i < tsp.GetN(); i++)
            {
                n = new Node(tsp.Get_x(i), tsp.Get_y(i), i);
                graph.Add(n);
            }
        }
Beispiel #3
0
        public c3opt(cTSP _tsp, byte _algo, bool _show, int _nn, bool _fast)
        {
            tsp      = _tsp;
            n        = tsp.GetN();
            algo     = _algo;
            showprog = _show;
            nn       = _nn;
            fast     = _fast;

            list_tour = new cTSP_LIST(_tsp);
            l1        = list_tour.First;
        }
Beispiel #4
0
 public cTSP_LIST(cTSP _tsp)
 {
     tsp = _tsp;
     BuildFromTour();
 }