jmetalsp-algorithm/src/main/java/org/uma/jmetalsp/algorithm/nsgaii/DynamicNSGAII.java
public static void main(String[] args) {
        String topicName = "prueba-solutionlist-topic-from-main";

        DynamicProblem<DoubleSolution, ObservedValue<Integer>> problem = new FDA2();

        // STEP 2. Create the algorithm
        CrossoverOperator<DoubleSolution> crossover = new SBXCrossover(0.9, 20.0);
        MutationOperator<DoubleSolution> mutation =
                new PolynomialMutation(1.0 / problem.getNumberOfVariables(), 20.0);
        SelectionOperator<List<DoubleSolution>, DoubleSolution> selection = new BinaryTournamentSelection<DoubleSolution>();
        ;
        InvertedGenerationalDistance<PointSolution> igd =
                new InvertedGenerationalDistance<>();
        CoverageFront<PointSolution> coverageFront = new CoverageFront<>(0.005, igd);
        DynamicAlgorithm<List<DoubleSolution>, AlgorithmObservedData> algorithm =
                new DynamicNSGAIIBuilder<>(crossover, mutation, new KafkaObservable<>(topicName, new AlgorithmObservedData()), coverageFront)
                        .setMaxEvaluations(50000)
                        .setPopulationSize(100)
                        .build(problem);

        algorithm.setRestartStrategy(new RestartStrategy<>(
                //new RemoveFirstNSolutions<>(50),
                //new RemoveNSolutionsAccordingToTheHypervolumeContribution<>(50),
                //new RemoveNSolutionsAccordingToTheCrowdingDistance<>(50),
                new RemoveNRandomSolutions(15),
                new CreateNRandomSolutions<DoubleSolution>()));

        //KafkaBasedConsumer<ObservedValue<Integer>> problemKafkaBasedConsumer =
        //        new KafkaBasedConsumer<>("prueba-int-topic-from-main", problem, new ObservedValue<>()) ;

        KafkaBasedConsumer<ObservedValue<Integer>> problemKafkaBasedConsumer =
                new KafkaBasedConsumer<>("prueba-tsp-topic-from-main", problem, new ObservedValue<>(), "avsc/TSPMatrixData.avsc");
        problemKafkaBasedConsumer.start();

        algorithm.run();
    }
/**
     * main() method to run the algorithm as a process
     *
     * @param args
     */
main() method to run the algorithm as a process
@param args
main () method to run the algorithm as a process @param args
public static void main(String[] args) {
        String topicName = "prueba-solutionlist-topic-from-main";
        DynamicProblem<DoubleSolution, ObservedValue<Integer>> problem = new FDA2();
        CrossoverOperator<DoubleSolution> crossover = new SBXCrossover(0.9, 20.0);
        MutationOperator<DoubleSolution> mutation =
                new PolynomialMutation(1.0 / problem.getNumberOfVariables(), 20.0);
        SelectionOperator<List<DoubleSolution>, DoubleSolution> selection = new BinaryTournamentSelection<DoubleSolution>();
        ;
        InvertedGenerationalDistance<PointSolution> igd =
                new InvertedGenerationalDistance<>();
        CoverageFront<PointSolution> coverageFront = new CoverageFront<>(0.005, igd);
        DynamicAlgorithm<List<DoubleSolution>, AlgorithmObservedData> algorithm =
                new DynamicNSGAIIBuilder<>(crossover, mutation, new KafkaObservable<>(topicName, new AlgorithmObservedData()), coverageFront)
                        .setMaxEvaluations(50000)
                        .setPopulationSize(100)
                        .build(problem);
        algorithm.setRestartStrategy(new RestartStrategy<>(
                new RemoveNRandomSolutions(15),
                new CreateNRandomSolutions<DoubleSolution>()));
        KafkaBasedConsumer<ObservedValue<Integer>> problemKafkaBasedConsumer =
                new KafkaBasedConsumer<>("prueba-tsp-topic-from-main", problem, new ObservedValue<>(), "avsc/TSPMatrixData.avsc");
        problemKafkaBasedConsumer.start();
        algorithm.run();
    }
public static void main ( String [ ] args ) { String topicName = "prueba-solutionlist-topic-from-main" ; DynamicProblem < DoubleSolution , ObservedValue < Integer > > problem = new FDA2 ( ) ; CrossoverOperator < DoubleSolution > crossover = new SBXCrossover ( 0.9 , 20.0 ) ; MutationOperator < DoubleSolution > mutation = new PolynomialMutation ( 1.0 / problem . getNumberOfVariables ( ) , 20.0 ) ; SelectionOperator < List < DoubleSolution > , DoubleSolution > selection = new BinaryTournamentSelection < DoubleSolution > ( ) ; ; InvertedGenerationalDistance < PointSolution > igd = new InvertedGenerationalDistance < > ( ) ; CoverageFront < PointSolution > coverageFront = new CoverageFront < > ( 0.005 , igd ) ; DynamicAlgorithm < List < DoubleSolution > , AlgorithmObservedData > algorithm = new DynamicNSGAIIBuilder < > ( crossover , mutation , new KafkaObservable < > ( topicName , new AlgorithmObservedData ( ) ) , coverageFront ) . setMaxEvaluations ( 50000 ) . setPopulationSize ( 100 ) . build ( problem ) ; algorithm . setRestartStrategy ( new RestartStrategy < > ( new RemoveNRandomSolutions ( 15 ) , new CreateNRandomSolutions < DoubleSolution > ( ) ) ) ; KafkaBasedConsumer < ObservedValue < Integer > > problemKafkaBasedConsumer = new KafkaBasedConsumer < > ( "prueba-tsp-topic-from-main" , problem , new ObservedValue < > ( ) , "avsc/TSPMatrixData.avsc" ) ; problemKafkaBasedConsumer . start ( ) ; algorithm . run ( ) ; }
main() method to run the algorithm as a process
 @param args
main () method to run the algorithm as a process @param args
// STEP 2. Create the algorithm //new RemoveFirstNSolutions<>(50), //new RemoveNSolutionsAccordingToTheHypervolumeContribution<>(50), //new RemoveNSolutionsAccordingToTheCrowdingDistance<>(50), //KafkaBasedConsumer<ObservedValue<Integer>> problemKafkaBasedConsumer = //        new KafkaBasedConsumer<>("prueba-int-topic-from-main", problem, new ObservedValue<>()) ;