Package jsprit.core.problem.solution.route.activity

Examples of jsprit.core.problem.solution.route.activity.PickupActivity


    }

    @Test
    public void whenNewActInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(0);
        double iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.);
        assertEquals(0.,iCosts,0.01);
View Full Code Here


    }

    @Test
    public void whenNewActWithTWInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(0);
        double iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.);
        assertEquals(0.,iCosts,0.01);
View Full Code Here

    }

    @Test
    public void whenNewActWithTWAndServiceTimeInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setServiceTime(10.).setTimeWindow(TimeWindow.newInstance(5.,5.)).build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(0);
        double iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.);
        double expectedTransportCosts = 0.;
View Full Code Here

    }

    @Test
    public void whenNewActWithTWAndServiceTimeInBetweenFirstAndSecond_and_forwardLookingIs3_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setServiceTime(10.).setTimeWindow(TimeWindow.newInstance(5.,5.)).build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(3);
        double iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.);
        double expectedTransportCosts = 0.;
View Full Code Here

    }

    @Test
    public void whenNewActInBetweenSecondAndThird_and_forwardLookingIs0_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(0);
        double iCosts =
                estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.);
View Full Code Here

    }

    @Test
    public void whenNewActInBetweenSecondAndThird_and_forwardLookingIs3_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(3);
        double iCosts =
                estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.);
View Full Code Here

    }

    @Test
    public void whenNewActWithTWInBetweenSecondAndThird_and_forwardLookingIs3_itShouldReturnCorrectCosts(){
        Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build();
        PickupActivity pickupService = new PickupService(s4);
        JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.);
        RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager);
        estimator.setForwardLooking(3);
        double iCosts =
                estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.);
View Full Code Here

TOP

Related Classes of jsprit.core.problem.solution.route.activity.PickupActivity

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.