static void Main(string[] args) { if (args.Length == 0 || args[0].Equals("-help") || args[0].Equals("-h")) { ShowHelp(); } else { string fileName = args[0]; double?t = null; double?f = null; double?r = null; for (int i = 1; i < args.Length; i++) { if (args[i].Equals("-t")) { t = Double.Parse(args[i + 1]); } if (args[i].Equals("-f")) { f = Double.Parse(args[i + 1]); } if (args[i].Equals("-r")) { r = Double.Parse(args[i + 1]); } } TSP tsp = new TSP(); tsp.GetCitiesInfo(fileName); //tsp.GetBestTourInfo(@"..\..\Lib\eil51.opt.tour"); SA sa = new SA(tsp); Run(sa, t, f, r); //sa.DisPlayBestTour(); } #if DEBUG WriteLine("Press any key for closing..."); ReadKey(); #endif }