Examples of IOptimisationManager


Examples of uk.ac.soton.itinnovation.pes.optimiser.common.IOptimisationManager

     *    4: Full path to the workspace where files can be saved optimiser components
   */
    public static void main(String[] args)
    {
        SampleOptimiserTest testOptimiser = new SampleOptimiserTest();
        IOptimisationManager optimiser = null;
    OptimiserResult optRes = null;

        System.out.println("\n\n");
        System.out.println("==== OPTIMISER TEST ====\n\n");

        if (!testOptimiser.validateArguments(args))
            System.exit(1);

        try
        {
            optimiser = testOptimiser.setUp(args);
        }
    catch (Exception ex)
        {
            System.out.println("[TestFramework] Failed to set up the Optimiser: " + ex.getMessage());
            System.exit(1);
        }

        try {
            optRes = optimiser.getOptimalResources();
            if (optRes != null) {
                System.out.println("\n[TestFramework] Optimisation successful!");
            } else {
                System.out.println("\n[TestFramework] Optimisation failed :(");
            }
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.optimiser.common.IOptimisationManager

        Map<String, List<AttributeType>> aslaParams = null;
        Map<String, Set<Resource>> optimisationSpace = null;
        IOptimisationAlgorithm optAlg = null;
        AModel appModel = null;
        AObjectiveFunction objFunc = null;
    IOptimisationManager opt;
    boolean valid = false;

        //--- Setting up various things required by several components ---//
        optUtil = OptimiserUtil.getInstance();
        classLoader = new PESClassLoader();

        daoFactory = DAOFactory.createInstance(DAOFactory.HIBERNATE);
        estimationResult = new EstimationResult();
        priceCalculator = new SamplePriceCalculator();

        //--- Setting up ASLA parameters and optimisation space ---//
        aslaParams = setUpASLAParams();
        optimisationSpace = setUpOptimisationSpace();

        //--- Setting up optimiser components from XML files ---//
        optAlg = setUpOptAlg(args[optAlgIdx]);
        appModel = setUpAppModel(args[modelIdx], daoFactory);
        objFunc = setUpObjFunc(args[objFuncIdx], appModel, priceCalculator, estimationResult, daoFactory, args[workspaceIdx], aslaParams);

        //--- Creating and initialising the Optimiser ---//
        opt = new OptimisationManager();
        valid = opt.init(optimisationSpace, optAlg, objFunc, priceCalculator, args[workspaceIdx], estimationResult, daoFactory);
        if (!valid)
            throw new RuntimeException("ERROR: Optimiser could not be initialised");

        //--- Disabling caching to allow this to execute stand-alone ---//
        optUtil.disableDBCaching = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.