public static void finalTestAfter(TSP[] problems, int[] populationSizes, int[] generationNums)
        {
            string line;
            var    file = new System.IO.StreamWriter(@"/Users/aggami/Library/Mobile Documents/com~apple~CloudDocs/Studia/Semestr 6/SIiIW/" + "finalTestAfter2.txt");

            file.AutoFlush = true;

            string startLine = "ProblemName; Popsize; numOfGen; TNMSize; Crossover Prob; Mutation Prob;Best;Worst;Avg;Std;";

            file.WriteLine(startLine);

            for (int i = 0; i < problems.Length; i++)
            {
                Console.WriteLine(problems[i].Name);
                float   best      = Single.MaxValue;
                float   worst     = 0;
                float   avg       = 0;
                float   div       = 0;
                float[] solutions = new float[10];
                double  cp        = 0.8;
                double  mp        = 0.4;
                int     ts        = 20;

                for (int j = 0; j < 10; j++)
                {
                    Console.WriteLine("Run " + j);
                    AlgorytmEwolucyjny alg = new AlgorytmEwolucyjny(problems[i], populationSizes[i], generationNums[i], "TNM");
                    alg.CrossoverProb  = cp;
                    alg.MutationProb   = mp;
                    alg.TournamentSize = ts;

                    float temp = alg.runAlgorithmWithGreedy().fitness();
                    solutions[j] = temp;
                    if (temp > worst)
                    {
                        worst = temp;
                    }
                    if (temp < best)
                    {
                        best = temp;
                    }
                    avg += temp;
                }
                avg = avg / 10;

                for (int j = 0; j < 10; j++)
                {
                    div += (solutions[i] - avg) * (solutions[j] - avg);
                }
                div = div / 10;
                div = Convert.ToSingle(Math.Sqrt(div));

                line = problems[i].Name + "; " + populationSizes[i] + "; " + generationNums[i] + "; " + ts + "; " + cp + "; " + mp + "; " + best + "; " + worst + "; " + avg + "; " + div + "; ";


                file.WriteLine(line);
            }
        }