Package jsprit.core.problem.vehicle

Examples of jsprit.core.problem.vehicle.VehicleImpl


     * the first two do need to return to depot
     */
    Builder vehicleBuilder1 = VehicleImpl.Builder.newInstance("vehicles@[10,10]");
    vehicleBuilder1.setStartLocationCoordinate(Coordinate.newInstance(10, 10)).setReturnToDepot(false);
    vehicleBuilder1.setType(vehicleType);
    VehicleImpl vehicle1 = vehicleBuilder1.build();
   
    Builder vehicleBuilder2 = VehicleImpl.Builder.newInstance("vehicles@[30,30]");
    vehicleBuilder2.setStartLocationCoordinate(Coordinate.newInstance(30, 30)).setReturnToDepot(false);
    vehicleBuilder2.setType(vehicleType);
    VehicleImpl vehicle2 = vehicleBuilder2.build();
   
    Builder vehicleBuilder3 = VehicleImpl.Builder.newInstance("vehicles@[10,30]");
    vehicleBuilder3.setStartLocationCoordinate(Coordinate.newInstance(10, 30));
    vehicleBuilder3.setType(vehicleType);
    VehicleImpl vehicle3 = vehicleBuilder3.build();
   
    Builder vehicleBuilder4 = VehicleImpl.Builder.newInstance("vehicles@[30,10]");
    vehicleBuilder4.setStartLocationCoordinate(Coordinate.newInstance(30, 10));
    vehicleBuilder4.setType(vehicleType);
    VehicleImpl vehicle4 = vehicleBuilder4.build();
   
    /*
     * build shipments at the required locations, each with a capacity-demand of 1.

     */
 
View Full Code Here


        //two vehicles: v1 - skill1 #5; v2 - skill2 #6
        Vehicle solomonVehicle = vrp.getVehicles().iterator().next();
        VehicleType newType = solomonVehicle.getType();
        VehicleRoutingProblem.Builder skillProblemBuilder = VehicleRoutingProblem.Builder.newInstance();
        for(int i=0;i<5;i++) {
            VehicleImpl skill1Vehicle = VehicleImpl.Builder.newInstance("skill1_vehicle_"+i).addSkill("skill1")
                    .setStartLocationCoordinate(solomonVehicle.getStartLocationCoordinate()).setStartLocationId(solomonVehicle.getStartLocationId())
                    .setEarliestStart(solomonVehicle.getEarliestDeparture())
                    .setType(newType).build();
            VehicleImpl skill2Vehicle = VehicleImpl.Builder.newInstance("skill2_vehicle_"+i).addSkill("skill2")
                    .setStartLocationCoordinate(solomonVehicle.getStartLocationCoordinate()).setStartLocationId(solomonVehicle.getStartLocationId())
                    .setEarliestStart(solomonVehicle.getEarliestDeparture())
                    .setType(newType).build();
            skillProblemBuilder.addVehicle(skill1Vehicle).addVehicle(skill2Vehicle);
        }
View Full Code Here

     * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType"
     */
    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
    vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder.setType(vehicleType);
    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build shipments at the required locations, each with a capacity-demand of 1.
     * 4 shipments
     * 1: (5,7)->(6,9)
View Full Code Here

     * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType"
     */
    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
    vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder.setType(vehicleType);
    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build services at the required locations, each with a capacity-demand of 1.
     */
    Service service1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 7)).build();
View Full Code Here

    }

    public static void main(String[] args) {

        VehicleImpl driver1 = VehicleImpl.Builder.newInstance("driver1")
                .addSkill("driver1")
                .setStartLocationCoordinate(Coordinate.newInstance(0, 0)).setReturnToDepot(false).build();

        VehicleImpl driver3 = VehicleImpl.Builder.newInstance("driver3")
                .addSkill("driver3")
                .setStartLocationCoordinate(Coordinate.newInstance(-3, 5)).setReturnToDepot(true).build();

        Service s1 = Service.Builder.newInstance("s1")
                .addRequiredSkill("driver1")
View Full Code Here

     * define two depots, i.e. two vehicle locations ([10,10],[50,50]) and equip them with an infinite number of vehicles of type 'vehicleType'
     */
    Builder vehicleBuilder1 = VehicleImpl.Builder.newInstance("vehicles@[10,10]");
    vehicleBuilder1.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder1.setType(vehicleType);
    VehicleImpl vehicle1 = vehicleBuilder1.build();
   
    Builder vehicleBuilder2 = VehicleImpl.Builder.newInstance("vehicles@[50,50]");
    vehicleBuilder2.setStartLocationCoordinate(Coordinate.newInstance(50, 50));
    vehicleBuilder2.setType(vehicleType);
    VehicleImpl vehicle2 = vehicleBuilder2.build();
   
   
    /*
     * build shipments at the required locations, each with a capacity-demand of 1.
     * 4 shipments
View Full Code Here

    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
    vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder.setType(vehicleType);
    vehicleBuilder.setReturnToDepot(false);
   
    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build services at the required locations, each with a capacity-demand of 1.
     */
    Service service1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setCoord(Coordinate.newInstance(5, 7)).build();
View Full Code Here

     */
    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
    vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder.setType(vehicleType);
    vehicleBuilder.setReturnToDepot(false);
    VehicleImpl vehicle = vehicleBuilder.build();
   
    /*
     * build shipments at the required locations, each with a capacity-demand of 1.
     * 4 shipments
     * 1: (5,7)->(6,9)
View Full Code Here

     * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType"
     */
    Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle");
    vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
    vehicleBuilder.setType(vehicleType);
    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();
View Full Code Here

TOP

Related Classes of jsprit.core.problem.vehicle.VehicleImpl

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.