Package org.globus.workspace.async.pricingmodel

Examples of org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel


    }    
   
    @Test
    public void testGetNextPriceCase5a() {

        MaximizeUtilizationPricingModel pricingModel = new MaximizeUtilizationPricingModel(true);
       
        LinkedList<AsyncRequest> requests = new LinkedList<AsyncRequest>();
        requests.add(new AsyncRequest("a", 2.0, getBindings(5)));
        requests.add(new AsyncRequest("b", 1.0, getBindings(5)));
        requests.add(new AsyncRequest("c", 1.4, getBindings(5)));
       
        Double nextPrice = pricingModel.getNextPrice(15, requests, null);
        assertEquals(new Double(1.0), nextPrice);
        assertTrue(PricingModelTestUtils.checkPricingModelConstraints(pricingModel.getMinPrice(), nextPrice, 15, requests));       
    }
View Full Code Here


    }
   
    @Test
    public void testGetNextPriceCase5b() {

        MaximizeUtilizationPricingModel pricingModel = new MaximizeUtilizationPricingModel(false);
       
        LinkedList<AsyncRequest> requests = new LinkedList<AsyncRequest>();
        requests.add(new AsyncRequest("a", 2.0, getBindings(5)));
        requests.add(new AsyncRequest("b", 1.0, getBindings(5)));
        requests.add(new AsyncRequest("c", 1.4, getBindings(5)));
       
        Double nextPrice = pricingModel.getNextPrice(15, requests, null);
        assertEquals(new Double(1.0), nextPrice);
        assertTrue(PricingModelTestUtils.checkPricingModelConstraints(pricingModel.getMinPrice(), nextPrice, 15, requests));               
    }       
View Full Code Here

    }       
   
    @Test
    public void testGetNextPriceCase6a() {

        MaximizeUtilizationPricingModel pricingModel = new MaximizeUtilizationPricingModel(true);
       
        LinkedList<AsyncRequest> requests = new LinkedList<AsyncRequest>();
        requests.add(new AsyncRequest("a", 200.0, getBindings(1)));
        requests.add(new AsyncRequest("b", 1.0, getBindings(25)));
        requests.add(new AsyncRequest("c", 2.0, getBindings(25)));
        requests.add(new AsyncRequest("d", 3.0, getBindings(25)));
        requests.add(new AsyncRequest("e", 4.0, getBindings(25)));
       
        Double nextPrice = pricingModel.getNextPrice(200, requests, null);
        assertEquals(new Double(pricingModel.getMinPrice()), nextPrice);
        assertTrue(PricingModelTestUtils.checkPricingModelConstraints(pricingModel.getMinPrice(), nextPrice, 200, requests));       
   
View Full Code Here

   
   
    @Test
    public void testGetNextPriceCase6b() {

        MaximizeUtilizationPricingModel pricingModel = new MaximizeUtilizationPricingModel(false);
       
        LinkedList<AsyncRequest> requests = new LinkedList<AsyncRequest>();
        requests.add(new AsyncRequest("a", 200.0, getBindings(1)));
        requests.add(new AsyncRequest("b", 1.0, getBindings(25)));
        requests.add(new AsyncRequest("c", 2.0, getBindings(25)));
        requests.add(new AsyncRequest("d", 3.0, getBindings(25)));
        requests.add(new AsyncRequest("e", 4.0, getBindings(25)));
       
        Double nextPrice = pricingModel.getNextPrice(200, requests, null);
        assertEquals(new Double(1.0), nextPrice);
        assertTrue(PricingModelTestUtils.checkPricingModelConstraints(pricingModel.getMinPrice(), nextPrice, 200, requests));       
    }       
View Full Code Here

TOP

Related Classes of org.globus.workspace.async.pricingmodel.MaximizeUtilizationPricingModel

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.