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

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


  public void testWallClock() {
    StopWatch watch = new StopWatch();
    gaps.setFitness(new SimpleFitness());
    gaps.setNumIndividuals(NUM_OF_IND);
    watch.start();
    gaps.setAbortCriterion(new WallClockTimeAbort(MILLISECONDS));
    gaps.portfolio(problemDescription);
    watch.stop();
    assertEquals(
        "Test should run " + MILLISECONDS + " but runs "
            + watch.elapsedMilliseconds() + ".", MILLISECONDS,
View Full Code Here


    abortList.addCriterion(new MaxFitnessAbort(MAXIMIZE_FITNESS));

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

    abortList.addCriterion(new WallClockTimeAbort(MILLISECONDS));
    gaps.setAbortCriterion(abortList);
    gaps.portfolio(problemDescription);
    watch.stop();

    assertTrue(
View Full Code Here

TOP

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

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.