Ejemplo n.º 1
0
        public void LoadsBestKnownResults()
        {
            var bestResults = new BestResultsLoader();
            var results     = bestResults.LoadBestResults("../../../../instances/best_known_results");

            Assert.Equal(27, results.Count);
        }
Ejemplo n.º 2
0
        public void AssignsBestKnownResults()
        {
            var bestResults = new BestResultsLoader();
            var results     = bestResults.LoadBestResults("../../../best_results");

            Assert.Equal(1, results.Count);

            var instance           = GetInstance();
            var instanceBestResult = bestResults.GetBestResultForInstance(instance.Name);

            Assert.Equal(100u, instanceBestResult);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var resultsSaver = new CSVOneFileResultSaver()
            {
                SaveDirectory = "results"
            };

            var bestResults = new BestResultsLoader();

            bestResults.LoadBestResults($"../instances/{bestInstancesFilename}");

            var instances = new []
            {
                "br17",
                "ft53",
                "ft70",
                "ftv33",
                // "ftv170",
                "kro124p",
                // "rbg323",
                // "rbg443",
                "ry48p"
            };

            instances.ToList()
            .AsParallel()
            .ForAll(x =>
            {
                new Program()
                .UseInstance(x)
                .UseBestResults(bestResults)
                .PrepareExperiments()
                .RunExperiments()
                .CompareSolutions()
                .SaveResults(resultsSaver);
            }
                    );

            Program.PrepareRaport(resultsSaver.SaveDirectory, resultsSaver.Extension, "../Raport/plots");
        }