Package jsprit.core.problem.vehicle

Examples of jsprit.core.problem.vehicle.VehicleImpl$NoVehicle


    @Test
    public void whenWritingVehicles_vehShouldHave2Skills(){
        Builder builder = VehicleRoutingProblem.Builder.newInstance();
        VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
        VehicleImpl v = VehicleImpl.Builder.newInstance("v1").addSkill("SKILL5").addSkill("skill1").addSkill("Skill2").setStartLocationId("loc").setType(type1).build();
        builder.addVehicle(v);

        VehicleRoutingProblem vrp = builder.build();
        new VrpXMLWriter(vrp, null).write(infileName);
View Full Code Here


    @Test
    public void whenWritingVehicles_vehShouldContain_skill5(){
        Builder builder = VehicleRoutingProblem.Builder.newInstance();
        VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
        VehicleImpl v = VehicleImpl.Builder.newInstance("v1").addSkill("SKILL5").addSkill("skill1").addSkill("Skill2").setStartLocationId("loc").setType(type1).build();
        builder.addVehicle(v);

        VehicleRoutingProblem vrp = builder.build();
        new VrpXMLWriter(vrp, null).write(infileName);
View Full Code Here

    @Test
    public void whenWritingVehicles_vehShouldContain_skill1(){
        Builder builder = VehicleRoutingProblem.Builder.newInstance();
        VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
        VehicleImpl v = VehicleImpl.Builder.newInstance("v1").addSkill("SKILL5").addSkill("skill1").addSkill("Skill2").setStartLocationId("loc").setType(type1).build();
        builder.addVehicle(v);

        VehicleRoutingProblem vrp = builder.build();
        new VrpXMLWriter(vrp, null).write(infileName);
View Full Code Here

    @Test
    public void whenWritingVehicles_vehShouldContain_skill2(){
        Builder builder = VehicleRoutingProblem.Builder.newInstance();
        VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
        VehicleImpl v = VehicleImpl.Builder.newInstance("v1").addSkill("SKILL5").addSkill("skill1").addSkill("Skill2").setStartLocationId("loc").setType(type1).build();
        builder.addVehicle(v);

        VehicleRoutingProblem vrp = builder.build();
        new VrpXMLWriter(vrp, null).write(infileName);
View Full Code Here

    @Test
    public void whenWritingVehicles_vehShouldHave0Skills(){
        Builder builder = VehicleRoutingProblem.Builder.newInstance();
        VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
        VehicleImpl v = VehicleImpl.Builder.newInstance("v1").setStartLocationId("loc").setType(type1).build();
        builder.addVehicle(v);

        VehicleRoutingProblem vrp = builder.build();
        new VrpXMLWriter(vrp, null).write(infileName);
View Full Code Here

  public void whenWritingShipments_readingThemAgainMustReturnTheWrittenLocationCoordOfS1(){
    Builder builder = VehicleRoutingProblem.Builder.newInstance();
   
    VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
    VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setStartLocationId("loc").setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocationId("loc").setType(type2).build();
   
    builder.addVehicle(v1);
    builder.addVehicle(v2);
   
    Shipment s1 = Shipment.Builder.newInstance("1").addSizeDimension(0, 10).setPickupCoord(Coordinate.newInstance(1, 2)).setDeliveryCoord(Coordinate.newInstance(5, 6)).setDeliveryLocationId("delLoc").setPickupTimeWindow(TimeWindow.newInstance(1, 2))
View Full Code Here

  public void whenWritingVehicleV1_itsStartLocationMustBeWrittenCorrectly(){
    Builder builder = VehicleRoutingProblem.Builder.newInstance();
   
    VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
    VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setStartLocationId("loc").setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocationId("loc").setType(type2).build();
   
    builder.addVehicle(v1);
    builder.addVehicle(v2);
   
    Service s1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setLocationId("loc").setServiceTime(2.0).build();
View Full Code Here

  public void whenWritingVehicleV1_itDoesNotReturnToDepotMustBeWrittenCorrectly(){
    Builder builder = VehicleRoutingProblem.Builder.newInstance();
   
    VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
    VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setReturnToDepot(false).setStartLocationId("loc").setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocationId("loc").setType(type2).build();
   
    builder.addVehicle(v1);
    builder.addVehicle(v2);
   
    Service s1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setLocationId("loc").setServiceTime(2.0).build();
View Full Code Here

  public void whenWritingVehicleV1_readingAgainAssignsCorrectType(){
    Builder builder = VehicleRoutingProblem.Builder.newInstance();
   
    VehicleTypeImpl type1 = VehicleTypeImpl.Builder.newInstance("vehType").addCapacityDimension(0, 20).build();
    VehicleTypeImpl type2 = VehicleTypeImpl.Builder.newInstance("vehType2").addCapacityDimension(0, 200).build();
        VehicleImpl v1 = VehicleImpl.Builder.newInstance("v1").setReturnToDepot(false).setStartLocationId("loc").setType(type1).build();
        VehicleImpl v2 = VehicleImpl.Builder.newInstance("v2").setStartLocationId("loc").setType(type2).build();
   
    builder.addVehicle(v1);
    builder.addVehicle(v2);
   
    Service s1 = Service.Builder.newInstance("1").addSizeDimension(0, 1).setLocationId("loc").setServiceTime(2.0).build();
View Full Code Here

        if(counter == 10){
          VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("solomonType").addCapacityDimension(0, vehicleCapacity);
          typeBuilder.setCostPerDistance(1.0*variableCostProjectionFactor).setFixedCost(fixedCostPerVehicle);
          VehicleTypeImpl vehicleType = typeBuilder.build();

          VehicleImpl vehicle = VehicleImpl.Builder.newInstance("solomonVehicle").setEarliestStart(start).setLatestArrival(end)
              .setStartLocationId(customerId).setStartLocationCoordinate(coord).setType(vehicleType).build();
          vrpBuilder.addVehicle(vehicle);
         
        }
        else{
View Full Code Here

TOP

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

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.