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

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


   * Check the AbortionCriterion (@link MaxFitnessAbort) and the function of the
   * maximize-flag. To complete the test, the achieved best fitness has to be >=
   * MAXIMIZE_FITNESS. The maximize Flag is set.
   */
  public void testFixFitnessMaximize() {
    gaps.setAbortCriterion(new MaxFitnessAbort(MAXIMIZE_FITNESS));
    gaps.setFitness(TEST_FITNESS_MAX);
    gaps.setNumIndividuals(NUM_OF_IND);
    gaps.portfolio(problemDescription);

    assertTrue("Best Fitness should be " + MAXIMIZE_FITNESS + " but it is "
View Full Code Here


  /**
   * To complete the test, the achieved best fitness has to be >=
   * MINIMIZE_FITNESS. The maximize Flag is not set.
   */
  public void testFixFitnessMinimize() {
    gaps.setAbortCriterion(new MaxFitnessAbort(MINIMIZE_FITNESS));
    gaps.setFitness(TEST_FITNESS_MIN);
    gaps.setNumIndividuals(NUM_OF_IND);
    gaps.portfolio(new PortfolioProblemDescription(
        new PortfolioPerformanceData(problemMatrix), 0, false, MIN_SIZE,
        MAX_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();

    abortList.addCriterion(new WallClockTimeAbort(MILLISECONDS));
View Full Code Here

TOP

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

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.