static void run(int number) {

        try {
            System.out.println("================================================");
            DetailsLogger.startNewLog(detailsLogPrefix + "." + number + ".xml");
            DetailsLogger.logParams(prop);

            Individual sampleIndividual = new IntegerIndividual(weights.size(), 0, K);

            Population pop = new Population();
            pop.setPopulationSize(popSize);
            pop.setSampleIndividual(sampleIndividual);
            pop.createRandomInitialPopulation();

            EvolutionaryAlgorithm ea = new EvolutionaryAlgorithm();
            HromadkyFitness fitness = new HromadkyFitness(weights, K);
            ea.setFitnessEvaluator(new ConcurrentInverseFitnessEvaluator(fitness));
            ea.addMatingSelector(new SUSSelector());
            //ea.addMatingSelector(new TournamentSelector());
            ea.addMatingSelector(new BigTournamentSelector());
            ea.addOperator(new OnePtXOver(xoverProb));
            ea.addOperator(new IntegerMutation(mutProb, mutProbPerBit));
            //ea.addOperator(new SwappingMutationOperator(0.1, 0.01));
            ea.addEnvironmentalSelector(new SUSSelector());
            //ea.addEnvironmentalSelector(new TournamentSelector());
            ea.addEnvironmentalSelector(new BigTournamentSelector());  
             
            ea.setElite(eliteSize);
            
            OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(fitnessFilePrefix + "." + number));
            OutputStreamWriter progOut = new OutputStreamWriter(new FileOutputStream(objectiveFilePrefix + "." + number));

            double lastObj = Double.MAX_VALUE;
            long start = System.nanoTime();
            for (int i = 1; i <= maxGen; i++) {
                ea.evolve(pop);
                IntegerIndividual bestInd = (IntegerIndividual)pop.getBestIndividual();
                double diff = bestInd.getObjectiveValue();
                if(i == maxGen || i % 1000 == 0 || diff != lastObj){
                    if(i%1000 == 0){
                        long now = System.nanoTime();
                        double timeDiffSec = (now - start) / 1000000000;
                        System.out.println("SPEED: "+Math.round(i/timeDiffSec)+" gen/s");
                    }
                    lastObj = diff;
                    System.out.println(number + "|" + i + ": " + diff + " " + Arrays.toString(fitness.getBinWeights(bestInd)));
                    best[number] = diff;
                }
                StatsLogger.logFitness(pop, out);
                StatsLogger.logObjective(pop, progOut);

            }

            OutputStreamWriter bestOut = new OutputStreamWriter(new FileOutputStream(bestPrefix + "." + number));

            IntegerIndividual bestInd = (IntegerIndividual)pop.getBestIndividual();

            for (int i = 0; i < bestInd.toIntArray().length; i++) {
                bestOut.write(weights.get(i) + " " + bestInd.toIntArray()[i] + System.getProperty("line.separator"));
            }

            out.close();
            progOut.close();
            bestOut.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

        DetailsLogger.writeLog();
    }