Examples of copyAndGetActivities()


Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        route = VehicleRoute.Builder.newInstance(vehicle).setJobActivityFactory(new JobActivityFactory() {

            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return vrp.copyAndGetActivities(job);
            }

        }).addService(service).addService(service2).addService(service3).build();

        stateManager = new StateManager(vrp);
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        route = VehicleRoute.Builder.newInstance(vehicle).setJobActivityFactory(new JobActivityFactory() {

            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return vrp.copyAndGetActivities(job);
            }

        }).addService(service).addService(service2).addService(service3).build();

        stateManager = new StateManager(vrp);
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        VehicleRoute.Builder shipmentRouteBuilder = VehicleRoute.Builder.newInstance(vehicle);
        shipmentRouteBuilder.setJobActivityFactory(new JobActivityFactory() {
            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return shipmentProblem.copyAndGetActivities(job);
            }
        });
        shipment_route = shipmentRouteBuilder.addPickup(shipment1).addPickup(shipment2).addDelivery(shipment2).addDelivery(shipment1).build();

        stateManager = new StateManager(mock(VehicleRoutingProblem.class));
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        inserter.insertJob(delivery, new InsertionData(0,0,0,vehicle,null), route);

        JobActivityFactory activityFactory = new JobActivityFactory() {
            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return vrp.copyAndGetActivities(job);
            }
        };

    StateManager stateManager = new StateManager(vrp);
    stateManager.updateLoadStates();
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        VehicleRoute.Builder shipmentRouteBuilder = VehicleRoute.Builder.newInstance(vehicle);
        shipmentRouteBuilder.setJobActivityFactory(new JobActivityFactory() {
            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return shipmentProblem.copyAndGetActivities(job);
            }
        });
        shipment_route = shipmentRouteBuilder.addPickup(shipment1).addPickup(shipment2).addDelivery(shipment2).addDelivery(shipment1).build();

        stateManager = new StateManager(mock(VehicleRoutingProblem.class));
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        final VehicleRoutingProblem vrp = vrpBuilder.addJob(pickup).addJob(pickup2).addJob(delivery).build();

    route = VehicleRoute.Builder.newInstance(vehicle, mock(Driver.class)).setJobActivityFactory(new JobActivityFactory() {
            @Override
            public List<AbstractActivity> createActivities(Job job) {
                return vrp.copyAndGetActivities(job);
            }
        })
    .addService(pickup).addService(delivery).addService(pickup2).build();
   
    reverseActivityVisitor.visit(route);
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

        VehicleRoutingProblem vehicleRoutingProblem = mock(VehicleRoutingProblem.class);
        List<AbstractActivity> acts = new ArrayList<AbstractActivity>();
        PickupService act = new PickupService(serviceToInsert);
        acts.add(act);
        when(vehicleRoutingProblem.copyAndGetActivities(serviceToInsert)).thenReturn(acts);
    Inserter inserter = new Inserter(mock(InsertionListeners.class), vehicleRoutingProblem);
    inserter.insertJob(serviceToInsert, iData, route);
   
    assertEquals(2,route.getTourActivities().getActivities().size());
    assertEquals(route.getTourActivities().getActivities().get(1).getLocationId(),serviceToInsert.getLocationId());
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

    InsertionData iData = mock(InsertionData.class);
    when(iData.getDeliveryInsertionIndex()).thenReturn(1);
    when(iData.getSelectedVehicle()).thenReturn(vehicle);

        VehicleRoutingProblem vehicleRoutingProblem = mock(VehicleRoutingProblem.class);
        when(vehicleRoutingProblem.copyAndGetActivities(serviceToInsert)).thenReturn(getTourActivities(serviceToInsert));

    Inserter inserter = new Inserter(mock(InsertionListeners.class),vehicleRoutingProblem);
    inserter.insertJob(serviceToInsert, iData, route);
   
    assertEquals(2,route.getTourActivities().getActivities().size());
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

    when(iData.getPickupInsertionIndex()).thenReturn(2);
    when(iData.getDeliveryInsertionIndex()).thenReturn(2);
    when(iData.getSelectedVehicle()).thenReturn(vehicle);

        VehicleRoutingProblem vehicleRoutingProblem = mock(VehicleRoutingProblem.class);
        when(vehicleRoutingProblem.copyAndGetActivities(shipmentToInsert)).thenReturn(getTourActivities(shipmentToInsert));
    Inserter inserter = new Inserter(mock(InsertionListeners.class), vehicleRoutingProblem);
    inserter.insertJob(shipmentToInsert, iData, route);
   
    assertEquals(4,route.getTourActivities().getActivities().size());
    assertEquals(route.getTourActivities().getActivities().get(2).getLocationId(),shipmentToInsert.getPickupLocationId());
View Full Code Here

Examples of jsprit.core.problem.VehicleRoutingProblem.copyAndGetActivities()

    when(iData.getPickupInsertionIndex()).thenReturn(2);
    when(iData.getDeliveryInsertionIndex()).thenReturn(2);
    when(iData.getSelectedVehicle()).thenReturn(vehicle);

        VehicleRoutingProblem vehicleRoutingProblem = mock(VehicleRoutingProblem.class);
        when(vehicleRoutingProblem.copyAndGetActivities(shipmentToInsert)).thenReturn(getTourActivities(shipmentToInsert));
    Inserter inserter = new Inserter(mock(InsertionListeners.class), vehicleRoutingProblem);
    inserter.insertJob(shipmentToInsert, iData, route);
   
    assertEquals(4,route.getTourActivities().getActivities().size());
    assertEquals(route.getTourActivities().getActivities().get(2).getLocationId(),shipmentToInsert.getPickupLocationId());
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.