@Override
    public void run()
    {
        try
        {
            while(run)
            {
                testCase.update();
                if(testCase.getAvgFitness() == Double.POSITIVE_INFINITY)
                {
                    correctSolutions++;
                    totalGenerations += testCase.getGeneration();
                    testCase.reinitialize();
                }

                if(testCase.getGeneration() == settings.getInt("nonConvergingGenCount"))
                {
                    nonConverging++;
                    totalGenerations += testCase.getGeneration();
                    if(settings.getBool("verbose"))
                    {
                        System.out.println(number + ": Did not converge, #" + nonConverging + " / " + (nonConverging + correctSolutions));
                    }
                    testCase.reinitialize();
                }

                if(settings.getBool("runToTarget") && correctSolutions + nonConverging == settings.getInt("solutionTarget"))
                {
                    run = false;
                }
            }
        }
        catch(Exception e)
        {
            System.out.println("Tests terminated: '" + e.getMessage() + "'");
            run = false;
        }
    }