Package org.jamesii.asf.portfolios.ga.abort

Examples of org.jamesii.asf.portfolios.ga.abort.GenerationCountAbort


          new PortfolioProblemDescription(
              new PortfolioPerformanceData[] { portPerfData }, ACCEPTABLE_RISK,
              new boolean[] { false }, MIN_PORTFOLIO_SIZE, MAX_PORTFOLIO_SIZE);
      GeneticAlgorithmPortfolioSelector gaps =
          new GeneticAlgorithmPortfolioSelector();
      gaps.setAbortCriterion(new GenerationCountAbort(NUM_GENERATIONS));
      gaps.setFitness(new ASRFitness());
      gaps.setNumIndividuals(NUM_INDIVIDUALS);
      gaps.setMutationRate(0.001);
      gaps.setIndividualFactory(new ListIndividualFactory());
View Full Code Here


   * Check whether: the (@link GenerationCountAbort) is working correctly; the
   * number of generated Individuals in the final pool is correct; each
   * individual in the final pool is meets the MIN_SIZE-MAX_SIZE-Criterion.
   */
  public void testSimple() {
    gaps.setAbortCriterion(new GenerationCountAbort(GEN_COUNT));
    gaps.setFitness(new SimpleFitness());
    gaps.setNumIndividuals(NUM_OF_IND);
    gaps.portfolio(problemDescription);
    gaps.setIndividualFactory(FACTORY_INDIVIDUAL);

View Full Code Here

        if ((int) (rng.nextDouble() * 100) < NULL_PERCENTAGE) {
          problemMatrixNull[i][j] = null;
        }
      }
    }
    gaps.setAbortCriterion(new GenerationCountAbort(GEN_COUNT));
    gaps.setFitness(NULL_FITNESS);
    gaps.setNumIndividuals(NUM_OF_IND);

    gaps.portfolio(new PortfolioProblemDescription(
        new PortfolioPerformanceData(problemMatrixNull), 0, true, MIN_SIZE,
View Full Code Here

   */
  public void testListOrAbort() {
    gaps.setFitness(TEST_FITNESS_MAX);
    gaps.setNumIndividuals(NUM_OF_IND);
    ListOrAbort abortList = new ListOrAbort();
    abortList.addCriterion(new GenerationCountAbort(GEN_COUNT));
    abortList.addCriterion(new MaxFitnessAbort(MAXIMIZE_FITNESS));

    StopWatch watch = new StopWatch();
    watch.start();

View Full Code Here

TOP

Related Classes of org.jamesii.asf.portfolios.ga.abort.GenerationCountAbort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.