Package jsprit.core.problem.job

Examples of jsprit.core.problem.job.Pickup


            }
            String[] lineTokens = line.split(",");
      /*
       * build service
       */
            Pickup service = (Pickup) Pickup.Builder.newInstance(lineTokens[0]).addSizeDimension(0, Integer.parseInt(lineTokens[1])).setLocationId(lineTokens[0]).build();
      /*
       * and add it to problem
       */
            vrpBuilder.addJob(service);
        }
View Full Code Here


    switcher.put(Pickup.class, serviceInsertionCalc);
    switcher.put(Service.class, serviceInsertionCalc);
    switcher.put(Shipment.class, insertionCalculator);
   
//    Service service = Service.Builder.newInstance("pick", 1).setLocationId("5,5").build();
    Pickup service = (Pickup)Pickup.Builder.newInstance("pick").addSizeDimension(0, 1).setLocationId("5,5").build();

        JobActivityFactory activityFactory = mock(JobActivityFactory.class);
        List<AbstractActivity> activities = new ArrayList<AbstractActivity>();
        activities.add(new PickupService(service));
        when(activityFactory.createActivities(service)).thenReturn(activities);
View Full Code Here

    stateManager = new StateManager(mock(VehicleRoutingProblem.class));
   
    reverseActivityVisitor = new ReverseRouteActivityVisitor();
    reverseActivityVisitor.addActivityVisitor(new UpdatePracticalTimeWindows(stateManager, routingCosts));
   
    Pickup pickup = (Pickup) Pickup.Builder.newInstance("pick").setLocationId("0,20").setTimeWindow(TimeWindow.newInstance(0, 30)).build();
    Delivery delivery = (Delivery) Delivery.Builder.newInstance("del").setLocationId("20,20").setTimeWindow(TimeWindow.newInstance(10, 40)).build();
    Pickup pickup2 = (Pickup) Pickup.Builder.newInstance("pick2").setLocationId("20,0").setTimeWindow(TimeWindow.newInstance(20, 50)).build();

    Vehicle vehicle = VehicleImpl.Builder.newInstance("v").setStartLocationId("0,0").setType(mock(VehicleType.class)).build();

        VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
        final VehicleRoutingProblem vrp = vrpBuilder.addJob(pickup).addJob(pickup2).addJob(delivery).build();
View Full Code Here

    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build pickups and deliveries at the required locations, each with a capacity-demand of 1.
     */
    Pickup pickup1 = (Pickup) Pickup.Builder.newInstance("1").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 7)).build();
    Delivery delivery1 = (Delivery) Delivery.Builder.newInstance("2").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 13)).build();
   
    Pickup pickup2 = (Pickup) Pickup.Builder.newInstance("3").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(15, 7)).build();
    Delivery delivery2 = (Delivery) Delivery.Builder.newInstance("4").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(15, 13)).build();
   
   
    VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
    vrpBuilder.addVehicle(vehicle);
View Full Code Here

    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build pickups and deliveries at the required locations, each with a capacity-demand of 1.
     */
    Pickup pickup1 = (Pickup) Pickup.Builder.newInstance("1").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 7)).build();
    Delivery delivery1 = (Delivery) Delivery.Builder.newInstance("2").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 13)).build();
   
    Pickup pickup2 = (Pickup) Pickup.Builder.newInstance("3").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(15, 7)).build();
    Delivery delivery2 = (Delivery) Delivery.Builder.newInstance("4").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(15, 13)).build();
   
   
    VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
    vrpBuilder.addVehicle(vehicle);
View Full Code Here

TOP

Related Classes of jsprit.core.problem.job.Pickup

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.